Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If FFmpeg reports Broken pipe, first determine whether the failure is on the HTTP input or the output. For an HTTP input, FFmpeg has reconnect options that can retry a dropped connection; they do not guarantee that YouTube will resume the same playlist item or position. The settings below help reconnect to a resource, not reconstruct a YouTube queue after a process restart.

First identify which side of FFmpeg failed

“Broken pipe” is not enough by itself to choose a fix. FFmpeg reads from an input and writes to an output, and reconnect controls discussed here apply to HTTP input handling.

  • Input-side failure: the log shows an error while opening or reading the HTTP source. Consider the input reconnect options below, matching them to the specific failure and whether the input is seekable.
  • Output-side failure: the log shows a write or muxing error. Input reconnect flags may not help; inspect the destination, downstream consumer, and output error instead.

For diagnosis, retain the complete command with sensitive URL tokens removed, the output of ffmpeg -version, the input protocol or manifest type, and log lines immediately before and after the error. Also clarify what “playlist” means in this setup: a YouTube queue, HLS/DASH manifest, local concat list, or a sequence managed by a wrapper.

Choose the reconnect option for the failure

FFmpeg’s HTTP protocol options have distinct triggers. They are not interchangeable, and you should not retry every HTTP error without considering its cause. The FFmpeg Protocols Documentation describes these options; availability and behavior can depend on the installed build.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
  • Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized
Option What it addresses When to consider it
-reconnect 1 Reconnects after a disconnect before EOF. The HTTP connection drops while FFmpeg is reading and the source has not reached end-of-file.
-reconnect_at_eof 1 Treats EOF as an error and reconnects. A live or endless source signals EOF during an interruption. The documentation describes this as useful for live/endless streams; it does not mean “resume the playlist where it left off.”
-reconnect_on_network_error 1 Retries network errors during connection, including TCP/TLS errors. The connection attempt itself fails at the network or transport layer.
-reconnect_on_http_error 4xx,5xx Retries selected HTTP response codes; the option accepts status codes or groups such as 4xx and 5xx. Only when retrying the relevant response makes sense. Authentication failures, unavailable media, or an invalid URL may persist and will not necessarily be fixed by retrying.
-reconnect_streamed 1 Allows reconnects for streamed or non-seekable inputs. The input cannot be resumed through ordinary seeking and you want FFmpeg to attempt a reconnect anyway.

For HTTP 429 or 503 responses, the documentation says FFmpeg honors a server-provided Retry-After delay by default when one is supplied. The -respect_retry_after 1 option controls that behavior.

Apply input options before the HTTP input

FFmpeg options are position-sensitive. Put HTTP input options before the affected -i URL. This illustrative command is a starting shape, not a tested command or a universal fix:

ffmpeg -reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 30 -i "$INPUT_URL" ...

Use -reconnect_at_eof 1 when the live/endless source signals EOF during an interruption. Add -reconnect_on_network_error 1 for connection-time TCP/TLS failures. Select -reconnect_on_http_error only for response codes you intend to retry; narrow the set where possible. Check that your installed FFmpeg build supports each option.

Rank #2
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
  • Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

Set a deliberate retry budget

Retries can keep a process waiting, but unbounded retrying can also leave a failed job running indefinitely. Configure and verify the relevant limits for your use case:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • -reconnect_delay_max N bounds the maximum delay between attempts.
  • -reconnect_max_retries N bounds the number of retries; do not assume an unlimited setting is appropriate for a managed service.
  • -reconnect_delay_total_max N bounds total delay spent retrying.

The FFmpeg trunk HTTP implementation currently lists defaults of 120 seconds for maximum delay, -1 (unlimited) retries, and 256 seconds for total delay. These are version-specific trunk defaults, not universal recommendations or guaranteed defaults for an installed release. See the FFmpeg trunk HTTP implementation and check your own build before relying on a default.

Why reconnect may not preserve the playlist position

Reconnection is conditional. FFmpeg’s HTTP implementation tracks a target offset and attempts to seek back to it; streamed or non-seekable inputs have a separate opt-in reconnect control. The server may still reject a resumed request or fail to honor it. Consequently, successful reconnection to an HTTP resource is not proof that the same content item or playback position was restored.

Rank #3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
  • CanaKit Raspberry Pi 5 Essentials Starter Kit

The FFmpeg documentation covers reconnecting an HTTP resource. It does not establish a general mechanism for rebuilding a YouTube queue or resuming a playlist after the FFmpeg process itself restarts. The outcome depends on what kind of playlist is involved, the input URL and service behavior, and the FFmpeg build. If preserving item and position is essential, identify which component owns the sequence and its resume state; do not treat an input reconnect flag as a playlist checkpoint.

Troubleshoot by symptom

It disconnects before the source reaches EOF

Use -reconnect 1 for an HTTP input and choose a retry budget. If the input is streamed or non-seekable, consider -reconnect_streamed 1. Resuming at the same offset remains dependent on server support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The source reports EOF during a live interruption

Consider -reconnect_at_eof 1 for a live or endless HTTP source. This tells FFmpeg to treat EOF as an error and attempt reconnection; it does not promise to recover a playlist item or position.

Rank #4
SANOOV Raspberry Pi 5 4GB Kit, 4GB RAM Single Board Computer with Active Cooler and ABS Case, Complete Raspberry Pi 5 Starter Kit for IoT Robotics Retro Gaming
  • All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
  • Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
  • Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
  • Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
  • Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online

The connection fails before HTTP content is read

For TCP/TLS connection errors, consider -reconnect_on_network_error 1. Check the surrounding logs to distinguish a connection failure from a later read failure.

The server returns an HTTP error

Use -reconnect_on_http_error only for statuses that may be transient. A persistent authorization, missing-resource, or malformed-URL problem needs correction rather than repeated requests. For 429/503, account for a supplied Retry-After delay.

FFmpeg reconnects, but playback restarts or changes item

This may reflect the source’s seekability, server behavior, or the sequence manager rather than a missing retry flag. Establish whether the URL is a direct resource, manifest, queue, or wrapper-managed list, and identify which component tracks the current item and offset.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
RasTech Raspberry Pi 5 8GB Kit with Active Cooler and Pi5 Case
  • 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
  • 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
  • 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
  • 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
  • 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.

The error remains after adding flags

Confirm the options precede the correct -i, verify support in the installed FFmpeg build, and determine whether the broken pipe is actually on the output side. Retry behavior cannot repair a failed destination or guarantee server-side resume support.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If your goal is a continuous YouTube stream from uploaded recordings rather than a custom FFmpeg reconnect setup, StreamNeo runs the loop in the cloud: upload a recording or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; each slot streams uploaded content at its original quality up to 4K 60fps for one flat price, and StreamNeo automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly billing is $9.99 per month. Start your free day with StreamNeo.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$259.95
Bestseller No. 2
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$419.99
Bestseller No. 3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
CanaKit Raspberry Pi 5 Essentials Starter Kit
$189.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.