A “Broken pipe” message means FFmpeg could not write to its YouTube output; by itself, it does not identify why. The cause may be a network interruption, YouTube closing the connection, a stale or incorrect ingest URL or stream key, a rejected stream configuration, or an upstream problem. Check the FFmpeg log and YouTube Live Control Room before changing encoder flags.
What “Broken pipe” means—and what to check first
FFmpeg reports a broken pipe when a write to its output fails because the receiving end of the connection is no longer accepting data. In a YouTube live stream, that describes the failed write, not its cause. It does not prove that YouTube is down or that a particular bitrate, codec, or network device is responsible.
- Save the full FFmpeg output. Inspect the lines before the first error, not just the final “Broken pipe” text. Note whether the error occurs while opening the output or after streaming has been underway, and whether FFmpeg’s input continues advancing.
- Check YouTube Live Control Room at the same time. Look at stream health, the stream state, and timestamped errors. YouTube distinguishes critical errors from moderate quality problems; unresolved errors continue to appear. See YouTube’s guide to fixing live stream errors.
- Record the exact endpoint and configuration in use. Confirm the selected ingest URL, protocol, resolution, bitrate, frame rate, and codec without sharing your stream key.
A log and Live Control Room status from the same moment help distinguish a connection failure from a configuration or session problem. No command line or log is available here, so the exact failure layer cannot be identified from the symptom alone. If you ask for help, share a redacted command and the surrounding log; remove stream keys, credentials, and private URLs first.
Verify the YouTube ingest URL and stream key
In YouTube Live Control Room, open the stream’s settings and confirm the current server URL and stream key. If you changed the key or stream configuration, update FFmpeg to use the current values. A copied URL or key from an older setup may no longer match the stream you intend to publish.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
If you use RTMPS
Copy the RTMPS URL from the lock icon in YouTube’s Stream settings instead of trying to turn an RTMP URL into RTMPS by editing it. YouTube’s RTMPS troubleshooting guidance says to check that both the protocol and server use rtmps, and to confirm that the encoder supports RTMPS. If YouTube reports an SSL error and the URL appears correct, its guidance suggests trying port 443. Those checks address RTMPS connection and SSL errors; they are not a universal fix for every broken pipe.
YouTube recommends RTMPS for encrypted transport, but choosing it does not repair a failed route or guarantee that a stream reconnects. Use the matching URL and a protocol your FFmpeg build supports.
Match FFmpeg’s stream settings to YouTube’s ingest guidance
Compare the actual output with the selected ingest configuration and YouTube’s current encoder guidance. Do not copy a preset without checking the resolution and bitrate YouTube expects for that stream. YouTube’s error guide lists problems such as unsupported codecs or profiles, unsupported audio, incorrect resolution or bitrate, missing or multiple audio/video streams, and frame-rate or keyframe issues. Correct the mismatch shown by Live Control Room, then test again.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- Transport: YouTube supports RTMP/RTMPS ingest. For RTMPS, use the exact server URL from Stream settings and verify encoder support.
- Video codec and frame rate: YouTube’s current settings guidance lists H.264, H.265, and AV1, with frame rates up to 60 fps. Confirm that your chosen ingest configuration and FFmpeg build support the combination you are sending.
- Keyframes: YouTube recommends a two-second keyframe interval and says not to exceed four seconds.
- Rate control: YouTube recommends constant bitrate (CBR).
- Audio and stream layout: Check the Live Control Room error details if YouTube flags unsupported audio or an unexpected number of audio or video streams.
For H.264, YouTube’s current bitrate guidance gives these examples:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →| H.264 output | Minimum bitrate | Recommended bitrate |
|---|---|---|
| 720p at 30 fps | 3 Mbps | 8 Mbps |
| 1080p at 30 fps | 5 Mbps | 14 Mbps |
These are YouTube-published encoder settings, not a measurement of the upload capacity available to your encoder. Bitrate recommendations vary by resolution, frame rate, and codec. Consult YouTube’s encoder settings, bitrates, and resolutions for the configuration you are using; YouTube’s accessed guidance pages do not state a publication date, and the settings may change.
Check whether the connection can sustain the stream
A connection that cannot reliably carry the selected output can contribute to a stream interruption. YouTube recommends testing upload bitrate and choosing a quality that is reliable on the available connection. Compare the sustainable upload capacity—not just a brief peak—with the stream’s bitrate, and account for other traffic using the connection.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Run an upload speed test under conditions similar to the planned stream.
- Test with representative video motion and audio; a static image alone may not reveal the load of the real content.
- If upload capacity is insufficient or varies, lower the resolution or bitrate and test again.
- Watch YouTube’s stream health during the test and note whether its warnings line up with FFmpeg’s first output error.
YouTube says, “We recommend running a speed test to test your upload bitrate,” and, “Make sure to test before you start your live stream.” See its live encoder settings guidance. A speed test does not prove that a connection will remain stable throughout a live event, so monitor stream health while publishing.
FFmpeg’s TCP protocol documentation describes tcp_keepalive, disabled by default. It enables the operating system’s basic SO_KEEPALIVE behavior, which can help detect dead peers and is most relevant to idle-connection detection. It does not repair a broken network route or guarantee recovery. See the FFmpeg protocols documentation.
Use FFmpeg FIFO recovery only for transient output failures
If the input keeps advancing while the network output fails temporarily, FFmpeg’s FIFO pseudo-muxer can queue packets and run the actual muxer in a separate thread. Its attempt_recovery option can retry the output after a failure. This can help with transient write failures; it does not show that the network or YouTube is healthy, and it does not guarantee that the same live session will resume seamlessly.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The following adapts FFmpeg’s documented network-streaming example. Replace the illustrative input and endpoint with your own values, and keep the stream key private:
ffmpeg -re -i INPUT
-c:v libx264 -c:a aac
-f fifo -fifo_format flv
-drop_pkts_on_overflow 1
-attempt_recovery 1
-recovery_wait_time 1
-map 0:v -map 0:a
'rtmp://YOUR_CURRENT_YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'
Check the options supported by your installed FFmpeg build in its formats documentation. In particular, verify FIFO options and the muxer syntax against the build you run. The command assumes the input contains both video and audio streams; adjust the mappings and encoders if it does not. Use the current ingest URL and key copied from YouTube rather than leaving the illustrative endpoint in place.
Know the recovery trade-offs
attempt_recoverydefaults to false. The command enables it.- The documented default
recovery_wait_timeis five seconds; the example uses one second. A shorter wait does not make YouTube accept a connection that it has rejected. max_recovery_attemptsdefaults to zero, meaning unlimited attempts. For a production service, consider a finite limit and supervise or restart the process deliberately.- The FIFO queue defaults to 60 packets. A larger queue can buffer more packets but also holds more queued media; it cannot fix a prolonged outage.
drop_pkts_on_overflow 1lets the encoder continue rather than block when the queue fills, but packets are omitted. That can create a visible or audible gap. Without dropping, a full queue can block processing instead.- The FIFO documentation includes
restart_with_keyframefor waiting for a keyframe after recovery. Consider whether that behavior suits your stream, and test it before relying on it live.
Use recovery deliberately: a controlled test can show how your specific input and YouTube session behave. If the stream was intentionally stopped, the key is invalid, YouTube rejects the configuration, or the session is no longer accepting output, retrying alone may not restore the event. Check Live Control Room before assuming a reconnect preserves the session.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Choose between direct output, FIFO recovery, and lower quality
| Choice | Useful when | Trade-off |
|---|---|---|
| Direct output | You want the simpler output path and will handle a failed process or connection separately. | It does not add FIFO’s packet queue or recovery attempts. |
| FIFO output with recovery | The input continues and you want FFmpeg to try recovering from temporary output failures. | Recovery is not session-continuity insurance; queueing, blocking, or dropping packets has consequences. |
| Lower resolution or bitrate | The connection cannot reliably sustain the current stream target. | The stream uses less bandwidth but also a lower output target; choose using YouTube’s settings and your actual upload stability. |
| RTMPS instead of RTMP | You want encrypted transport and your encoder supports RTMPS. | It requires the correct RTMPS endpoint and compatible encoder support; it is not a blanket broken-pipe fix. |
Common failure patterns and what to do
- It fails immediately while connecting: Re-copy the current server URL and key from Live Control Room. Check the protocol, endpoint, and whether the encoder supports the selected transport.
- It starts, then fails during output: Compare the failure timestamp with YouTube’s health messages and inspect whether the input is still advancing. Investigate connection stability and output configuration before adding retries.
- YouTube reports an encoder or stream-configuration error: Fix the specific codec, audio, resolution, bitrate, frame-rate, or keyframe mismatch it identifies; then test again.
- Upload capacity is marginal or variable: Reduce resolution or bitrate and repeat a representative test while monitoring stream health.
- RTMPS produces an SSL error: Confirm both server and protocol use
rtmps, verify encoder support, and follow YouTube’s port guidance if the URL appears correct. - Retries do not restore publishing: Check whether the stream is still accepting output in Live Control Room. A stale key, rejected configuration, or ended session may require correction or a new publishing session rather than repeated attempts.
Or let it run in the cloud
If your goal is to keep a YouTube channel playing uploaded video around the clock, StreamNeo is an alternative to supervising an FFmpeg process on your own machine. It plays uploaded videos to YouTube, not live camera feeds. The setup is three steps:
- Upload a recording or build a playlist.
- Add your YouTube stream key once.
- Go live; StreamNeo loops the video from the cloud.
- Your computer and home connection do not have to stay on.
- Uploaded video streams as made, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers.
- StreamNeo automatically recovers if YouTube drops the stream.
- The first day is free with no card, one free day per account.
The monthly option is $9.99 per month. See StreamNeo or its pricing page for details. Start your free day with StreamNeo.
Quick Recap
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.




