Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallTo loop a prerecorded video into a YouTube Live broadcast, put -stream_loop -1 before the input file’s -i option, and use -re to read the file at its native frame rate. This H.264/AAC example is a practical starting point for a local file with video and audio:
ffmpeg -re -stream_loop -1 -i input.mp4
-c:v libx264 -preset veryfast
-b:v 5M -maxrate 5M -bufsize 10M
-pix_fmt yuv420p -g 60
-c:a aac -b:a 128k -ar 44100
-f flv "rtmp://YOUR_SERVER/YOUR_STREAM_KEY"
Replace input.mp4 with the file path on your computer, and replace the destination with the exact ingest URL and stream key shown in YouTube Live Control Room. Prefer YouTube’s RTMPS URL when your FFmpeg build and destination settings support it. Keep the key private. This is a template, not a tested or universal command: match its encoding settings to the video, audio, computer, upload capacity, and current YouTube stream settings.
What the command does
FFmpeg reads the prerecorded file at its native rate, repeats it indefinitely, encodes video as H.264 and audio as AAC, then sends the result to YouTube’s ingest server. The loop applies to the input file; it does not supervise FFmpeg or guarantee that a broadcast will stay connected if the process, computer, or network fails.
| Option | Purpose | Important detail |
|---|---|---|
-re |
Reads the file at its native frame rate to simulate a live input. | FFmpeg documents it as equivalent to -readrate 1. Use it for prerecorded files, not indiscriminately with a real capture device or live input: a low read rate on a live source can cause packet loss. FFmpeg documentation |
-stream_loop -1 |
Repeats the input indefinitely. | It is an input option and must precede the corresponding -i. FFmpeg options apply to the next input or output, so order matters. FFmpeg documentation |
-i input.mp4 |
Selects the file FFmpeg reads. | Use a valid local path; quote paths that contain spaces if your shell requires it. |
-c:v libx264 |
Encodes video with H.264. | The example chooses a broadly supported format, not the only format YouTube accepts. YouTube lists H.264, H.265, and AV1 for RTMP/RTMPS ingestion. YouTube encoder settings |
-preset veryfast |
Sets an x264 speed/efficiency trade-off. | This illustrative, compatibility-oriented preset can use different amounts of CPU and produce different results depending on the computer and content. |
-b:v 5M -maxrate 5M -bufsize 10M |
Sets an example video bitrate, rate ceiling, and buffer size. | These are not universal settings. Choose a rate for the codec, resolution, and frame rate from YouTube’s current guidance, and leave upload headroom. |
-pix_fmt yuv420p |
Requests a commonly compatible pixel format. | It is part of this H.264 example, not a claim that all YouTube ingest combinations require it. |
-g 60 |
Sets the GOP/keyframe interval in frames. | At 30 fps, 60 frames equal two seconds. At 60 fps, use -g 120 for two seconds. YouTube recommends a two-second keyframe frequency and says not to exceed four seconds. YouTube encoder settings |
-c:a aac -b:a 128k -ar 44100 |
Encodes AAC stereo audio at the example bitrate and sample rate. | YouTube recommends 128 Kbps and 44.1 kHz for stereo; its settings list 384 Kbps and 48 kHz for 5.1 audio. YouTube also accepts MP3 audio. YouTube encoder settings |
-f flv |
Specifies the output container for this common FFmpeg RTMP pattern. | The official YouTube pages cited here describe RTMP/RTMPS ingest but do not establish FLV as a universal requirement. |
rtmp://YOUR_SERVER/YOUR_STREAM_KEY |
Provides the ingest destination and secret key. | Use the exact URL and key from Live Control Room. Prefer RTMPS where supported. |
Choose bitrate and keyframes for your video
Bitrate depends on resolution, frame rate, and codec
Do not treat the command’s 5 Mbps video bitrate as the best rate for every stream. YouTube Help’s settings page, accessed in 2026, recommends H.264 at 5 Mbps for 1080p at 30 fps and 8 Mbps for 720p at 60 fps; the page gives distinct rates by codec, resolution, and frame rate. Check the current table for your exact target rather than extrapolating those examples. YouTube recommends testing upload capacity and representative audio and video motion; its guidance says, “We recommend running a speed test to test your upload bitrate.” YouTube encoder settings
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Set the GOP in frames, not seconds
The -g value is a number of frames. For a two-second interval, multiply the input frames per second by two: use -g 60 at 30 fps or -g 120 at 60 fps. YouTube recommends two seconds and says not to exceed four; make sure the chosen value matches the actual output frame rate. YouTube encoder settings
Check audio before going live
The example assumes the file contains audio and targets stereo AAC. If the input has no audio, the example may fail because it asks FFmpeg to encode an audio stream that is not present; inspect the file and adapt the mapping or command rather than assuming every video has audio. YouTube’s recommended stereo sample rate is 44.1 kHz and its recommended stereo audio bitrate is 128 Kbps. For 5.1 audio, the settings page lists 48 kHz and 384 Kbps. YouTube encoder settings
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Get the YouTube destination and start the broadcast
- Check your FFmpeg build. Run
ffmpeg -versionin a terminal and confirm the installed build supports the options and encoder you plan to use. FFmpeg’s nightly documentation may differ from an older installed version; useffmpeg -hor the relevant local help if an option is unavailable. - Open YouTube Live Control Room. In the stream’s settings, reveal the server URL and stream key. YouTube’s RTMPS instructions identify the secure URL with a lock icon; copy the URL and key exactly. RTMPS is RTMP over TLS/SSL. YouTube RTMPS help
- Keep the key confidential. Do not publish it, include it in screenshots, or share it. Anyone who obtains the key may be able to send a stream to that destination.
- Replace the example destination. Paste the exact ingest URL and key into the command. Use YouTube’s RTMPS URL if your FFmpeg build supports the connection and the selected destination configuration.
- Start FFmpeg and check the preview. Watch the terminal for connection or encoding errors, then confirm YouTube receives the video and audio in Live Control Room. For a scheduled stream, YouTube’s encoder setup instructions say to click Go live in Live Control Room after the encoder preview appears. YouTube encoder setup
- Stop deliberately. End the FFmpeg process when you want to stop sending the loop, and use YouTube’s controls as appropriate for the stream. YouTube Help says streams under 12 hours are automatically archived; do not assume that archive behavior applies to longer broadcasts. YouTube encoder setup
Use stream copy only when the source is suitable
Re-encoding with libx264 and AAC gives you control over codec, bitrate, pixel format, and keyframe interval, but it uses CPU resources and can affect quality. Stream copy can avoid re-encoding, but whether it works depends on the source codecs, timestamps, and YouTube ingest requirements. There is no universal copy command established for every file in this workflow, so do not assume that adding -c copy will make any input suitable.
Plan for failures during a long stream
-stream_loop -1 repeats the file while FFmpeg is running; it is not a process supervisor. It does not restart FFmpeg after a crash or automatically restore a failed network connection. A long broadcast therefore needs someone or something to monitor FFmpeg and YouTube stream health and a separate restart/supervision plan. Test the full setup before relying on it for an unattended broadcast.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Common problems and fixes
- FFmpeg says it cannot open the file: check the path, spelling, permissions, and quoting. Confirm that the file plays locally and that the input option is before the intended
-i. - The stream connects but YouTube shows no preview: verify that the server URL and key came from the correct Live Control Room stream, then inspect FFmpeg’s output for connection or encoder errors.
- An SSL or TLS connection error occurs: verify that you used the RTMPS scheme and server from YouTube. YouTube also suggests specifying port 443 if needed. YouTube RTMPS help
- The broadcast stutters or drops frames: compare the selected bitrate with available upload capacity, lower the target if necessary, and test representative motion and audio. YouTube recommends a speed test; leave headroom rather than using all measured upload bandwidth. YouTube encoder settings
- FFmpeg reports that
libx264is unavailable: the installed build may not include that encoder. Checkffmpeg -versionand local encoder help, then use a build and encoder compatible with your system and chosen YouTube settings. - The stream stops when the computer or network goes off: the local FFmpeg process depends on that computer and its connection. Arrange an always-on host and independent supervision, or use a cloud service that runs the loop remotely.
Check rights and YouTube policies before looping
Use video and audio you have the rights to broadcast, including music, visuals, and any third-party material in the recording. Repeating content does not grant permission to use it. Review YouTube’s current copyright and live-stream policies for your situation before broadcasting; a stream key and technically valid FFmpeg command do not establish that a video is authorized or eligible for monetization.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or let it run in the cloud
StreamNeo is a YouTube-only cloud service for keeping a channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the uploaded video in the cloud, so nothing has to stay on at home. The same flat price per slot applies to any uploaded quality up to 4K 60fps, with no re-encode or quality tiers; it also automatically recovers if YouTube drops the stream. The first day is free with no card, one free day per account. Monthly is $9.99 per month.
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
See StreamNeo or compare plans. Start your free day.
Quick Recap
Best Value
- [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
- 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
- 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
- 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
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.

