Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsFirst find out which connection failed: FFmpeg’s documented reconnect flags apply to HTTP input retrieval, not automatically to the RTMP or RTMPS output used to publish to YouTube. If the music source stopped loading, configure input retries for that source; if YouTube ingest disconnected, verify the RTMPS URL and stream key, then handle output recovery separately.
1. Identify whether the input or output failed
FFmpeg can be reading a media source while publishing a separate connection to YouTube. A failure on one side is not fixed by retry options for the other. Inspect the log around the first error and determine whether FFmpeg failed while opening or reading the input, or while opening or writing the output. FFmpeg documents the reconnect options below for HTTP; its RTMP protocol documentation is separate. See FFmpeg’s protocol documentation.
- Input failure: The source URL could not be opened, stopped responding, disconnected, returned an HTTP error, or reached EOF. Investigate the source protocol and retry behavior.
- Output failure: FFmpeg could not connect to or continue writing to YouTube. Check the publishing endpoint, key, network path, and whether the FFmpeg process exits; HTTP input retry flags do not provide a general RTMPS-output fix.
EOF is distinct from a network disconnect: it means the input reached its end. If a file is intended to play repeatedly, make sure the FFmpeg command actually loops that input; retrying an HTTP source at EOF is relevant to an endless or live HTTP source, not a substitute for configuring a local file playlist or loop.
2. Apply reconnect options only to an HTTP source
FFmpeg’s HTTP protocol options cover different conditions. Their availability and behavior can vary by installed build, so check the documentation and option help for the FFmpeg version actually running before relying on a default or a command copied from elsewhere.
#1 Best Overall
- Pro performance with great pre-amps - Achieve a brighter recording thanks to the high performing mic pre-amps of the Scarlett 3rd Gen. A switchable Air mode will add extra clarity to your acoustic instruments when recording with your Solo 3rd Gen
- Get the perfect guitar and vocal take with - With two high-headroom instrument inputs to plug in your guitar or bass so that they shine through. Capture your voice and instruments without any unwanted clipping or distortion thanks to our Gain Halos
- Studio quality recording for your music & podcasts - Achieve pro sounding recordings with Scarlett 3rd Gen’s high-performance converters enabling you to record and mix at up to 24-bit/192kHz. Your recordings will retain all of their sonic qualities
- Low-noise for crystal clear listening - 2 low-noise balanced outputs provide clean audio playback with 3rd Gen. Hear all the nuances of your tracks or music from Spotify, Apple & Amazon Music. Plug-in headphones for private listening in high-fidelity
- Everything in the box: Includes Pro Tools Intro+, Ableton Live Lite, Cubase LE, and Hitmaker Expansion: a suite of essential effects, powerful software instruments, and easy-to-use mastering tools
| Option | What it addresses |
|---|---|
reconnect |
Retries automatically after a disconnection that occurs before EOF. |
reconnect_at_eof |
Treats EOF as an error and retries. FFmpeg describes this as useful for “live / endless streams.” |
reconnect_on_network_error |
Retries TCP or TLS errors during connection setup. |
reconnect_on_http_error |
Retries for configured HTTP status codes. Specify the status codes appropriate to the source; this is not a catch-all for every response. |
reconnect_streamed |
Allows retry on errors for streamed or non-seekable inputs. |
These are HTTP protocol options, not universal reconnect switches. FFmpeg’s documentation also describes reconnect_delay_max, reconnect_max_retries, and reconnect_delay_total_max for bounding retry delay, attempt count, or total retry time. Check the installed version’s documented defaults rather than assuming they are the same across versions.
Put the options on the input they govern
In a command with an HTTP source and a YouTube publishing output, place HTTP options before that input’s -i argument. For example, the structure is:
Rank #2
- The new generation of the songwriter's interface: Plug in your mic and guitar and let Scarlett Solo 4th Gen bring big studio sound to wherever you make music
- Studio-quality sound: With a huge 120dB dynamic range, the newest generation of Scarlett uses the same converters as Focusrite’s flagship interfaces, found in the world's biggest studios
- Find your signature sound: Scarlett 4th Gen's improved Air mode lifts vocals and guitars to the front of the mix, adding musical presence and rich harmonic drive to your recordings
- All you need to record, mix and master your music: Includes industry-leading recording software and a full collection of record-making plugins
- Everything in the box: Includes Pro Tools Intro+, Ableton Live Lite, Cubase LE, and Hitmaker Expansion: a suite of essential effects, powerful software instruments, and easy-to-use mastering tools
ffmpeg [HTTP input options] -i "SOURCE_URL" -f flv "RTMPS_URL/STREAM_KEY"
This is a command structure, not a complete production command: preserve the input’s required media options and the output format/settings for your actual source and broadcast. Replace the quoted values locally, and never paste a real stream key into a public command, log, screenshot, or support post.
Rank #3
- PLUG IN AND HEAR SOUND IN SECONDS - USB Type-A connector with a 3.5mm stereo headphone output and a separate 3.5mm mono microphone input. No drivers, no software, no external power - the adapter is USB bus-powered and is recognized as a standard USB audio device.
- WORKS ON WINDOWS, MAC AND LINUX - Driverless on Windows 98SE/ME/2000/XP/Server 2003/Vista/7/8, Linux and Mac OSX, and compliant with the USB Audio Device Class 1.0 specification, so any system that supports class-compliant USB audio will see it. Select it as the sound output and input device after plugging it in.
- TWO JACKS, TWO JOBS - The green jack is stereo OUT for headphones or powered speakers; the pink jack is mono microphone IN for a 3.5mm mic. It does NOT support 4-pole headsets on a single combo plug, it does NOT power passive speakers, and it does NOT add surround sound - it is a stereo 2-channel adapter.
- FOR LAPTOPS AND DESKTOPS THAT NEED AN AUDIO PORT BACK - Adds a headphone and mic port to a laptop, desktop, or mini PC whose onboard jack has failed or was never there. Managed and work-issued computers can block new USB audio devices by policy - check with your IT department before ordering for a company machine.
- SABRENT SUPPORT AND WARRANTY - What is in the box: one USB audio sound adapter. Backed by a 1-year limited warranty, extended to 2 years when you register within 90 days on the manufacturer's website.
For an HTTP source that should reconnect at end-of-file, the relevant input-option pattern is -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 before -i. Add network-error or HTTP-status retry options only if those are the failure conditions you need to handle. A retry is an attempt to fetch again; it does not guarantee that the source server permits it or that playback resumes at the same position.
3. If YouTube publishing failed, verify RTMPS settings
- Open YouTube Live Control Room and retrieve the RTMPS ingest URL shown for the intended broadcast. YouTube describes RTMPS as RTMP carried over TLS/SSL; see YouTube’s RTMPS setup guidance and Google’s RTMPS ingest overview.
- Confirm FFmpeg is publishing to that URL and using the associated stream key. Check for accidental whitespace, a stale key, or a URL copied from another broadcast.
- Confirm the stream key belongs to the intended broadcast and has not been exposed. If it may have been exposed, replace or reset it in YouTube’s controls before publishing again.
- Read the FFmpeg output error at the point it writes to the publishing output. Do not add HTTP input flags merely because the YouTube output disconnected.
The sources document the RTMPS setup but do not establish one FFmpeg command that guarantees recovery from every RTMPS output failure. Check whether your FFmpeg process exits or remains alive after the failure. If it exits, an operator or a separate process supervisor must restart it; if it remains alive, determine whether it is still attempting output or is stalled. Plan how repeated failures will be detected, and test the behavior on your actual FFmpeg build and YouTube setup before depending on it for continuous operation.
Rank #4
- Podcast, Record, Live Stream, This Portable Audio Interface Covers it All - USB sound card for Mac or PC delivers 48kHz audio resolution for pristine recording every time
- Be ready for anything with this versatile M-AUDIO interface - Record guitar, vocals or line input signals with two combo XLR / Line / Instrument Inputs with phantom power
- Everything you Demand from an Audio Interface for Fuss-Free Monitoring - 1/4" headphone output and stereo 1/4" outputs for total monitoring flexibility; USB/Direct switch for zero latency monitoring
- Get the best out of your Microphones - M-Track Duo’s transparent Crystal Preamps guarantee optimal sound from all your microphones including condenser mics
- The MPC Production Experience - Includes MPC Beats Software complete with the essential production tools from Akai Professional
4. Troubleshoot by symptom
| Symptom | Likely distinction | What to check or change |
|---|---|---|
| HTTP source disconnects before it ends | Input connection failure | Use the input’s HTTP reconnect behavior, including reconnect; check whether the source supports retries. |
| HTTP input reaches EOF but should be endless | Input ended, rather than a publishing disconnect | For a live/endless HTTP source, consider reconnect_at_eof. For a finite file intended to repeat, configure looping separately. |
| TCP/TLS connection to an HTTP source fails | Input connection setup error | Consider reconnect_on_network_error and confirm the source URL and network reachability. |
| HTTP server returns an error response | Input received an HTTP status | Use reconnect_on_http_error only for the status codes you intend to retry; investigate authorization, availability, or URL issues as well. |
| Non-seekable or streamed HTTP source errors | Input may not support seeking | Consider reconnect_streamed; do not assume the retried source resumes seamlessly. |
| YouTube output cannot connect or stops accepting the stream | RTMP/RTMPS publishing failure | Recheck the Live Control Room RTMPS URL and associated key. Treat process restart and failure monitoring as separate recovery tasks. |
| Retries continue too long or stop too soon | Retry policy does not fit the intended recovery window | Review reconnect_delay_max, reconnect_max_retries, and reconnect_delay_total_max for the installed FFmpeg version. |
5. Test recovery before relying on a 24/7 stream
- Record which connection failed, the protocol, and the triggering condition: disconnect, EOF, network setup error, HTTP response, or publishing write failure.
- Test HTTP-input retry behavior independently from interruption of the YouTube output.
- Observe whether FFmpeg retries, exits, or remains running after each test, and confirm how an operator or supervisor detects repeated failures.
- Confirm the YouTube broadcast receives the intended source after recovery. Do not assume a retry resumes at the same media position or that an output interruption is seamless.
- Keep real stream keys out of test reports and logs shared with others.
Or let it run in the cloud
If your goal is a continuous YouTube stream from uploaded music recordings, StreamNeo is an alternative to maintaining an FFmpeg process and recovery setup yourself. Upload a recording or build a playlist, add your YouTube stream key once, and go live; StreamNeo loops the uploaded video from the cloud. Your home computer does not have to stay on, and it does not stream from a camera.
Quick Recap
Best Value
- The new generation of the artist's interface: Connect your mic to Scarlett's 4th Gen mic pres. Plug in your guitar. Fire up the included software. Start making your first big hit
- Studio-quality sound: With a huge 120dB dynamic range, the newest generation of Scarlett uses the same converters as Focusrite’s flagship interfaces, found in the world's biggest studios
- Never lose a great take: Scarlett 4th Gen's Auto Gain sets the perfect level for your mic or guitar, and Clip Safe prevents clipping, so you can focus on the music
- Find your signature sound: Air mode lifts vocals and guitars to the front of the mix, adding musical presence and rich harmonic drive to your recordings
- With Scarlett 4th Gen, you have all you need to record, mix and master your music: Includes industry-leading recording software and a full collection of record-making plugins
- Nothing has to stay running at home; the stream runs in the cloud.
- One flat price per slot for any quality up to 4K 60fps, streamed as uploaded without re-encoding or quality tiers.
- Automatic recovery if YouTube drops the stream.
- The first day is free with no card required, one free day per account.
- Monthly: $9.99 per month.
See StreamNeo or start the free first day.
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.
Recommended Free Tools

