If your FFmpeg YouTube live stream keeps stopping, first find out whether FFmpeg has exited or is still running while YouTube receives too little or invalid video. Those two situations can look similar in the player but require different fixes.
Note the time the stream stopped, save the complete FFmpeg stderr output, and open YouTube Live Control Room at the same time. Match the local log timestamps with YouTube’s timestamped health messages before changing bitrate, codecs or hardware.
Preserve the evidence before restarting
A restart may make the stream look healthy again while removing the evidence that would have shown what failed. Before launching FFmpeg again, record the approximate time at which the picture stopped, whether the terminal process is still present, and the last lines printed by FFmpeg.
Save the exact command you used, including the input path, video filters, audio settings, output URL and any reconnect options. If you run FFmpeg from a script, save the script as well. A command copied from memory can omit the one option that explains the interruption.
In Live Control Room, open the stream’s health information and note the wording and time of each error. YouTube says an error remains visible while it is unresolved, so an old message may still be present when you inspect the dashboard. Do not assume that the latest visible message caused the original interruption unless its timestamp matches.
This evidence separates four useful possibilities:
- FFmpeg stopped because its input ended, failed or produced an error.
- FFmpeg is still reading the file but cannot deliver the output connection.
- FFmpeg is running and sending data, but the data does not meet YouTube’s expected format or rate.
- YouTube is receiving an intermittent or insufficient video signal, even though the local process appears busy.
For a longer-running channel, the go-always-live checklist is useful before the next test. For this particular fault, however, the logs and health messages should decide the next step.
Check whether FFmpeg actually exited
Look at the terminal, service manager or process monitor where FFmpeg is running. If the process has disappeared, start with FFmpeg’s final error and exit status. The final line may identify an unreadable input, an end-of-file condition, a broken output connection, an encoder error or a permission problem. It may also show a clean end if the input file simply finished.
A pre-recorded file is not automatically an endless source. If FFmpeg is reading one video without a loop or another deliberate continuation method, it can reach the end and exit normally. That is different from a stream dropping because the network failed. Check the input duration and whether the command is intended to repeat it.
If FFmpeg is still running, do not treat a frozen YouTube picture as proof that the encoder has stopped. Check whether the log continues to show input progress, frame counts, timestamps and output activity. A process can remain alive while its input is stalled, its output is blocked, or its generated video is not acceptable to YouTube.
The direction of the last changing timestamps matters. If input timestamps stop first, investigate the source or a read problem. If input continues but output delivery reports an error, investigate the publishing connection. If local output continues while YouTube reports starvation or format problems, inspect the encoded stream and the health message rather than restarting repeatedly.
An FFmpeg option beginning with -reconnect is not a universal answer to a YouTube publishing failure. FFmpeg documents these options in its HTTP protocol section. They cover cases such as reconnecting an HTTP input after a network error, treating input EOF as an error, and retrying selected HTTP requests. The documentation does not establish them as general recovery for an RTMP or RTMPS output to YouTube. Use the actual output error and the output protocol documentation to diagnose a failed publishing connection.
Compare stderr timestamps with YouTube health errors
Write the events on a simple timeline. For example:
| Observation | What it tells you to check next |
|---|---|
| FFmpeg exits at the same time YouTube reports an interruption | Read the final FFmpeg error first, then confirm whether YouTube reports a related ingestion problem |
| FFmpeg keeps printing progress while YouTube reports insufficient video | Check input movement, output bitrate, frame production and network delivery |
| YouTube reports a format error before the picture appears frozen | Check codec, stream count, resolution, frame rate, audio and keyframe settings |
| YouTube’s last error predates the apparent freeze | Do not assume that old health message explains the current event |
This comparison is more reliable than changing several settings at once. If you lower the resolution, replace the input and add reconnect flags together, you may get a working stream but lose the ability to identify the original fault.
YouTube’s health display is not a substitute for FFmpeg’s local log. It describes what YouTube received or expected to receive. FFmpeg’s stderr shows what the local process attempted to read, encode and publish. A disagreement between them is useful evidence, not a reason to choose one source blindly.
If the timestamps are in different time zones or one display uses a different clock, compare the sequence rather than relying on the displayed second. You can still establish whether FFmpeg stopped before YouTube reported a health issue, or whether YouTube detected a problem while FFmpeg continued running.
Read red and yellow errors differently
YouTube classifies red health errors as critical and yellow errors as moderate. They should not be treated as equivalent. A red error deserves immediate attention to the named condition; a yellow warning may indicate a risk or degradation that has not yet stopped delivery.
Read the message literally. If it names an incorrect stream format, check the format. If it names bitrate, check the rate against the selected resolution, frame rate, codec and available upload connection. If it names audio, confirm that an audio stream exists and uses a supported format. Avoid replacing a specific message with the vague conclusion that “YouTube is unstable”.
YouTube’s published health categories include issues involving format, bitrate, audio, video, keyframe frequency, resolution and primary or backup stream mismatches. The Live Streaming API describes these more precisely. For example, videoIngestionStarved means YouTube is not receiving enough video to maintain smooth streaming. noAudioStream means the ingestion stream has no audio, while openGop indicates an open GOP where YouTube expects a closed GOP.
Other API health conditions include high or low bitrate, high frame rate, unsupported codec, a long GOP and mismatched backup-stream settings. These labels point to different checks. A low bitrate problem is not fixed in the same way as a missing audio stream, and a keyframe warning is not evidence that your internet connection is the cause.
Use the current YouTube Live Control Room health guidance to interpret the message shown for your stream. The wording and accepted settings can change, so do not rely on a copied list from an old tutorial.
Check the source media and input behaviour
Start at the input, especially if FFmpeg remains active but frame production has stopped. Confirm that the file exists, can be read from beginning to end, and contains the audio and video streams your command expects. A file may play in a desktop player while still causing trouble in a long-running FFmpeg job because of a damaged section, unusual timestamps or an input that reaches EOF.
Check whether the source is a file, a live HTTP input, a playlist or a generated filter. Each behaves differently. A file has a natural end unless you loop it. A live input may pause or disconnect. A playlist may reach an empty item or fail to advance. A filter chain may continue running while producing no usable frames if one of its inputs is unavailable.
Read the progress lines around the fault. If the input timestamp stops advancing, focus on the source. If frames continue to be read but the encoded output does not move, inspect the encoder or filter chain. If encoded frames continue but the YouTube dashboard reports starvation, inspect the delivery path and output rate.
For a channel built from recorded programmes, keep the media properties consistent across test files. A short, ordinary test clip can hide a problem that only appears in a long file, a variable frame rate source or a section with a different audio layout. Test with representative motion and audio before relying on the command overnight.
If your concern is mainly looping behaviour, compare the command with the practical guidance in how to keep an OBS media source looping. The tool differs from FFmpeg, but the diagnostic question is the same: did the source continue producing media, or did the playback layer wait at its end?
Inspect output format and delivery
Once the input is moving, inspect what FFmpeg creates for YouTube. Confirm the output protocol, video codec, audio codec, resolution, frame rate, bitrate, stream count and keyframe behaviour. YouTube’s current encoder guidance covers RTMP or RTMPS, H.264, H.265 or HEVC and AV1, with AAC or MP3 audio, but the exact accepted combination and the health message for your stream still matter.
YouTube recommends constant bitrate, or CBR, for encoder settings. It also recommends a keyframe frequency of two seconds and says not to exceed four seconds. Its guidance says the GOP should be closed for optimal transcoding. A keyframe interval is tied to frame rate: at 30 frames per second, a two-second interval represents 60 frames.
Do not use one bitrate for every stream. YouTube’s table varies by ingestion resolution, frame rate and codec. As an example from the current table, for 1080p at 30 frames per second it lists H.264 with a 5 Mbps minimum and 14 Mbps recommended rate, while AV1 or H.265 is listed with a 4 Mbps minimum and 10 Mbps recommended rate. These are YouTube’s guidance values, not a guarantee that your connection can sustain them.
Compare the chosen profile with your actual upload capacity. YouTube recommends testing upload bitrate and selecting a quality that is reliable for the connection. If the connection cannot support the selected resolution, lower the resolution rather than assuming that a higher nominal bitrate will make the stream more stable. Check the current YouTube encoder settings and bitrate table before making the change.
Audio deserves its own check. A stream can have a picture while still triggering a missing-audio or unsupported-audio condition. Confirm that FFmpeg maps the intended audio stream and that the output contains one supported audio stream. If you are troubleshooting an audio delay rather than a stopped stream, the guide to fixing audio out of sync in an OBS pre-recorded YouTube stream covers a related but separate problem.
If you use primary and backup streams, their settings need to match for failover, including resolution, codec, bitrate, frame rate, keyframe frequency and audio settings. A backup that differs in a material way can introduce its own health issue instead of providing a clean continuation.
Check the network without guessing at hardware
A stream can look stopped because delivery is intermittent. Compare FFmpeg’s output messages with YouTube’s health timeline and measure upload capacity from the same connection and at a representative time. A speed-test result is evidence about available capacity at that moment, not a permanent promise about an overnight stream.
Bitrate, resolution, frame rate and codec must be considered together. A high-resolution, high-frame-rate output gives the connection more work to sustain. If health messages report high bitrate or the API reports video starvation, first compare the configured output with YouTube’s current table and the measured upload path.
Do not buy a router, capture card or replacement computer solely because the stream froze. The official guidance points to encoder settings, upload testing and Live Control Room diagnostics; it does not identify a physical product that fixes this class of problem. Consider hardware only when a separate measurement shows a relevant CPU, memory, disk, thermal or network-device bottleneck.
For a 24/7 channel, also check whether another device starts a large upload or backup at the time of the interruption. A local connection may be adequate for a short test but fluctuate when other traffic shares it. This is why a representative test should include the same resolution, frame rate, audio and approximate output bitrate as the planned broadcast.
If the computer is the unreliable part of the arrangement, moving the work away from an overnight desktop can remove the need to keep that machine powered and watched. StreamNeo is designed for the specific case where you upload the video once, provide the YouTube stream key, and need the broadcast to continue without your computer running, with automatic monitoring and restart when the stream drops.
Make one targeted correction and retest
Choose the correction that matches the evidence. If FFmpeg exited at EOF, correct the input continuation method. If the input stopped advancing, repair or replace the source and test it from start to finish. If YouTube reports no audio, fix stream mapping or the audio format. If it reports an unsupported codec or format, change the output profile according to the current official guidance.
If the message concerns bitrate or starvation, reduce the pressure on the connection by selecting a suitable resolution or frame rate and then checking the bitrate table. Do not change the codec, resolution and keyframe interval together unless the health message requires all three. One deliberate change makes the next log easier to interpret.
If the output connection failed, record the exact FFmpeg error before trying again. Do not assume that HTTP input reconnect flags repair a YouTube RTMP or RTMPS publishing session. Examine the output protocol error, confirm the stream key and destination, and test the connection separately where possible.
For keyframes, use the two-second recommendation as the starting point and remain within YouTube’s four-second maximum. Confirm that the GOP is closed and that the encoder is actually applying the requested interval. A setting in a wrapper script is not proof that the encoded output has that setting.
Run the revised command with representative media and watch both sides. YouTube’s guidance says to monitor stream health and review messages during the event. Let the test run long enough to expose the original behaviour, then save the new stderr output and the health timeline. If the stream fails again, compare the new evidence with the first run rather than repeating unrelated changes.
For readers choosing between a command-line workflow and a simpler pre-recorded streaming tool, the software comparison for streaming pre-recorded videos to YouTube Live sets out the operational trade-offs. FFmpeg gives you precise control, but that control also means you must maintain the input, output and monitoring path.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Why does my YouTube live stream keep stopping when FFmpeg is still running?
FFmpeg can remain active while its input is stalled, its output is blocked, or YouTube receives too little or invalid video. Check whether local input and output timestamps continue, then compare them with the timestamped health message in Live Control Room.
Are YouTube yellow warnings the same as red errors?
No. YouTube classifies red errors as critical and yellow errors as moderate. Read the named condition and respond to its category rather than treating every warning as proof that the stream has stopped.
Will FFmpeg reconnect options fix a broken YouTube stream?
Not necessarily. FFmpeg documents the cited reconnect options for HTTP protocol behaviour, particularly live HTTP inputs and selected connection errors; that documentation does not make them a general repair for RTMP or RTMPS publishing to YouTube.
What bitrate should I use for an FFmpeg YouTube stream?
There is no single bitrate that suits every output. Compare resolution, frame rate and codec with YouTube’s current bitrate table and your measured upload capacity, then lower the resolution if the connection cannot reliably sustain the chosen profile.