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

To loop prepared MP4 files into a 24/7 YouTube Live stream with FFmpeg, create a YouTube broadcast, put compatible files in an FFmpeg concat playlist, and send the looped input to YouTube over RTMPS. The encoder must keep running and the connection must remain healthy; the command alone does not guarantee an uninterrupted broadcast.

What you need before you start

  • MP4 files you have the right to stream.
  • FFmpeg installed on a computer or server that can stay powered on and connected to the internet.
  • Live streaming access and a configured broadcast in YouTube Studio.
  • A reliable upload connection with headroom above your chosen video and audio bitrate, including protocol overhead.

YouTube Live has two related parts: a broadcast, which represents the event in YouTube, and an incoming stream, which is the encoder feed associated with that broadcast. Create or select the broadcast in Live Control Room, then use the ingest settings shown there in FFmpeg. Keep the stream key secret; anyone who obtains it may be able to send video to your channel. See Google’s explanation of broadcasts and streams.

Prepare the MP4 files and playlist

Check whether the files are compatible

The concat demuxer joins inputs at the packet level rather than decoding and rebuilding them. Its listed files need the same streams and compatible codecs and time bases. Differences in dimensions, frame rates, pixel formats, sample rates, or other stream properties can also cause trouble in a practical workflow. If the files do not match, normalize them first or use FFmpeg’s concat filter and re-encode to a consistent output; that is more flexible but uses more CPU.

The concat demuxer also relies on file durations to place later files. Unequal stream lengths can produce gaps, and inaccurate duration metadata can cause timestamp artifacts. Do not assume that a playlist will join every transition seamlessly. The FFmpeg concat demuxer documentation describes its requirements and behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Nulaxy 54W Bluetooth 5.3 Car Adapter, FM Transmitter 4-Port Fast Charging
  • 54W High Power Fast Charging, 4-Port Synchronous Charging: Nulaxy Bluetooth car adapter integrates PD36W and QC18W, offering a high-speed and efficient charging solution. Its innovative four-port design supports parallel charging of multiple devices, effortlessly overcoming battery anxiety and enhancing charging efficiency.
  • Technological Leadership, Revolutionary Bluetooth 5.3: The iphone fm transmitter for car radio uses the latest Bluetooth 5.3 technology, significantly improving connection speed and data transmission efficiency. Enhanced sound quality ensures rapid and stable connections, providing a clearer, smoother experience for both calls and music playback.
  • Stunning Bass, Colorful Lighting Effects: One-touch activation of stunning bass effects reproduces the true texture of music, offering an unparalleled musical experience. The five-color lighting design provides accurate perception at night, ensuring easy and safe operation, making nighttime driving more relaxed.
  • Voice Commands and Precise Touch Control: Our bluetooth cigarette lighter adapter supports smart voice navigation from your phone for truly hands-free driving. Its unique raised button design provides precise, sightless control, ensuring safety and convenience while driving.
  • Comprehensive Safety Assurance and Wide Compatibility: FM modulator bluetooth for car provides all-around safety protection, including over-current, over-voltage, overheating, and short-circuit protection, ensuring the safety of you and your devices. Its wide compatibility supports 12V to 24V vehicle voltages, suitable for most cars. Nulaxy continues to innovate, offering industry-leading car Bluetooth adapter that ensure safety and compatibility. (Please compare the size between the transmitter and your car cigarette lighter )

Write the concat playlist

Create a plain-text file named playlist.ffconcat. The signature must be the first line, exactly as shown:

ffconcat version 1.0
file '/media/radio/track-001.mp4'
file '/media/radio/track-002.mp4'
file '/media/radio/track-003.mp4'

Replace the example paths with your files, in the order you want them played. Quote or escape paths containing spaces or special characters correctly. The concat demuxer’s safe option defaults to 1 and rejects unsafe paths or directives. Prefer relative, portable paths where possible. Use -safe 0 only when you trust the playlist file and need absolute paths or other paths the default safety check rejects.

Configure YouTube Live

  1. Open YouTube Studio and go to the Live Control Room.
  2. Create or select the broadcast you intend to use. Confirm that Live streaming is available for the account and that the broadcast is in the state you expect; FFmpeg does not create or schedule it for you.
  3. Choose the encoder connection settings shown in the current Control Room interface. Select RTMPS when available, and note the ingest URL and stream key.
  4. Keep the key private. Do not put it in a public script repository, share it in a screenshot, or include it in logs that others can access.

YouTube recommends RTMPS, which carries RTMP over an SSL connection. For an ordinary FFmpeg encoder setup, use the RTMPS destination displayed for your broadcast rather than guessing an endpoint. See Google’s RTMPS ingestion guide.

Rank #2
Sale
LENCENT FM Transmitter, Bluetooth FM Transmitter Wireless Radio Adapter Car
  • Crystal Clear Music Streaming: LENCENT T25 is anti- statics designed, and equipped with noise and wind suppressed by CVC technology that can achieve full duplex sound quality. You can stream music on your car stereo via Bluetooth/ USB Flash Drive (≤32GB) / microSD Card (≤32GB). WMA MP3 WAV APE FLAC music formats are all supported
  • Intelligent Dual USB Ports & Safe Charging: Coming with 2 USB ports(5V-2.4A and 5V-1A), you can charge two devices simultaneously. Built-in over-current protection, over-voltage protection, intelligent temperature control, short circuit protection, it will effectively ensure safe charging
  • Hands-Free Calling & Voice Navigation: Bluetooth provides a stable connection, while Noise Suppression (CVC) technology and echo-cancellation grants an amazing hands-free calling experience. Besides, you can also get clear voice navigation from your phone’s app, which means driving will be more safely
  • Car Battery Voltage Detection & Blue Ambient Light: The FM transmitter will display car’s voltage when plugged into the cigarette lighter. Keep abreast of car battery health at all times to avoid problems when driving. With the circle of blue backlight around this car charger, it will greatly simplify your operation for safer driving. (Please compare the size between the transmitter and your car cigarette lighter )
  • Wider Range & Compatibility: This Bluetooth transmitter is well compatible with most of the smartphones and more devices that equipped with bluetooth function. It will automatically connect to its memorized paired Bluetooth device when power on. Also, with the wider range from 88.1MHz - 107.9 MHz, you can get more stable and consequent music experience without interference

Run FFmpeg and choose the output settings

This schematic command loops a homogeneous playlist and encodes H.264 video with AAC audio. It is a starting point, not a tested universal command: replace the destination with the current values from YouTube, and select output settings to match your media, frame rate, and connection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat 
  -c:v libx264 -preset veryfast -pix_fmt yuv420p 
  -b:v 4500k -maxrate 4500k -bufsize 9000k -g 60 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://YOUR_CURRENT_INGEST_URL/YOUR_STREAM_KEY'

Input options belong before their corresponding -i. Here, -re paces file reading in real time, -stream_loop -1 requests infinite looping of the input, and -f concat selects the concat demuxer. FFmpeg documents -stream_loop in its command-line documentation. Check the manual for your installed build, since builds and option behavior can differ.

Match bitrate, resolution, and keyframes to the source

YouTube’s encoder guidance recommends constant bitrate (CBR), supported codecs, and a keyframe interval of two seconds, not exceeding four seconds. The example’s -g 60 is a 60-frame GOP: at 30 fps that approximates two seconds. Set the GOP to suit your actual frame rate; for example, use a frame count corresponding to two seconds of output. The example’s -b:v 4500k is not a universal bitrate recommendation. Choose bitrate, resolution, and frame rate from YouTube’s current table for your intended output, then test using representative motion and audio. YouTube also advises testing upload bitrate and choosing a quality that the connection can sustain.

Rank #3
BaseWish 7W 1W Long Range FM Transmitter with LCD & 3.5mm Audio Cable - Ideal for Drive-in Church, School & Supermarket Events, Light Shows & Fireworks Display - Black
  • FCC Certified(FCC ID: 2ASVO05B7CT200) with two power modes (1W and 7W).
  • High Stability with next-generation integrated NC FM stereo radio transmitter chip BH1415, built-in PLL advanced modulation system, audio pre-emphasis, limiter and low pass filter circuit.
  • Clear Stereo Sound with AT89C2051 and AT24C02 control panel, three power amplifiers (two 2SC3355 and one 2SC2053) to ensure great sound quality output effect.
  • Excellent Heat Dissipation with high quality aluminum alloy material, lightweight and excellent heat dissipation.
  • Easy to Use with LCD display to show transmission frequency, easy to adjust and intuitive.

The example encodes H.264 video and AAC audio, formats listed in YouTube’s encoder guidance. It sets AAC audio to 128 kbps, which YouTube lists for stereo, and a 44.1 kHz sample rate. Do not treat that sample rate as a surround-sound setting: YouTube lists 48 kHz for 5.1 audio. Consult YouTube’s current encoder settings, bitrates, and resolutions for the format you plan to send.

Use stream copy only when it suits the files

Encoding with libx264 makes the output more consistent across varied inputs, at the cost of CPU. Copying compressed streams can reduce CPU use, but it is appropriate only when the files meet the concat demuxer’s compatibility requirements and the resulting transitions and timestamps behave as needed. If you must normalize different inputs, use a filter-based concat workflow that re-encodes rather than assuming packet-level concatenation will repair them. FFmpeg discusses the alternatives in its concatenation FAQ.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Test the stream before relying on it

  1. Start with a private or unlisted test broadcast and media that resembles the actual playlist in motion and audio.
  2. Watch the Live Control Room’s stream-health messages while FFmpeg is running.
  3. Let the playlist reach its end and wrap to the first file. Check the image, audio continuity, timestamps, and whether output continues as expected.
  4. Check behavior with a damaged or missing source file before depending on the setup unattended.
  5. For longer operation, run FFmpeg under a process supervisor or service manager, configure restart behavior, preserve logs, and alert on process exit or ingest loss. Assign someone to monitor YouTube stream health; a restart policy is not a guarantee of continuous availability.

YouTube’s advice is direct: “Make sure to test before you start your live stream.” See its encoder guidance.

Rank #4
Sale
Scosche BTFM9 FM Bluetooth Transmitter Car, Dual 12W USB-C and USB-A Charging Ports, Fast Type C Car Charger, Wireless Radio Bluetooth Adapter, Hands-Free Kit for Calls, Siri and Google Assistant
  • Car FM Transmitter: Experience superior sound quality and seamless connectivity with our FM Transmitter for Car. Effortlessly connecting to your car's FM radio, the Bluetooth car adapter enables wireless music streaming from your device via Bluetooth. It's the perfect solution to integrate Bluetooth for cars without Bluetooth.
  • Hands-Free Car Kit - Make and receive calls effortlessly while driving with the Scosche Handsfree Bluetooth Car Kit. This Bluetooth car adapter makes it possible to connect your smartphone to your car stereo through the Scosche Bluetooth FM transmitter, allowing you to keep your hands on the wheel and eyes on the road.
  • 12V Cigarette Lighter Adapter - Plugs directly into your car's 12V cigarette lighter socket for unlimited transmitting and listening hours. This FM Bluetooth Transmitter car adapter doubles as a cigarette lighter charger and features dual USB-A and USB-C 12W charging ports, allowing you to charge multiple devices on the go.
  • Voice Command - Equipped with easy-to-use controls for volume up/down, play/pause, answer/hang up the phone, our Scosche FM Bluetooth transmitter car is a must-have in Bluetooth car accessories. This versatile accessory supports Siri and Google Voice commands, enhancing your car audio receiver and providing a safer, hands-free driving experience.
  • Universal Compatibility - Effortlessly connect any iPhone, iPod, Galaxy, MP3 player, smartphone, USB-A, USB-C, or other mobile devices with a 3.5mm aux port or Bluetooth. Enjoy your favorite music and make hands-free calls with our Bluetooth FM transmitter car. For added peace of mind, it comes with a 3-year limited warranty.

RTMPS or HLS ingestion?

Option When it fits Trade-off
RTMPS The conventional FFmpeg encoder path with codecs supported over RTMP. YouTube recommends it for Live; configure the destination using the current Control Room values.
HLS ingestion An encoder supports YouTube’s HLS setup, including some workflows involving HDR or codecs not supported by RTMP. It sends video in segments and has higher latency. It requires HLS ingestion configuration and segment/playlist behavior; it is not the same as sending an ordinary FFmpeg RTMPS output.

See YouTube’s documentation for setting up an HLS stream before choosing that route.

Troubleshooting common failures

Symptom Likely cause What to check or change
FFmpeg rejects the playlist or a path. The signature is not on the first line, a path is malformed, or the safety check rejects an absolute or otherwise unsafe path. Check the exact ffconcat version 1.0 first line and quoting. Prefer relative paths; use -safe 0 only for a trusted playlist that needs it.
Concat errors, artifacts, or bad transitions between files. Inputs have incompatible streams or time bases, or file duration metadata does not match the media. Inspect and normalize the files, or use a filter-based concat workflow and re-encode. Watch the full playlist cycle.
There are pauses or gaps at a file boundary. Streams within files may have unequal durations; the demuxer schedules the next file using duration information. Check source durations and metadata. Test the actual playlist rather than assuming a gapless transition.
YouTube does not receive the encoder feed. The broadcast may not be configured or available, or the ingest URL or key may not match the current Control Room settings. Verify the broadcast and access in YouTube Studio, then copy the current RTMPS destination and key carefully. Keep the key private.
Stream health reports connection or quality problems. The upload connection may not sustain the chosen combined bitrate, or the encoder output settings may not match YouTube’s recommendations. Review stream-health messages, test upload capacity, and choose a supported resolution and bitrate with dependable headroom.
The broadcast stops after an error or host restart. The FFmpeg process, host, or network is no longer delivering data; a command does not supervise itself. Use a process supervisor with restart behavior and persistent logs, monitor for exit and ingest loss, and check the broadcast in Live Control Room.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Copyright and YouTube channel considerations

Only include audio and video you have the necessary rights to stream. Technical documentation cannot establish whether a particular playlist is licensed, and having an MP4 file does not itself grant streaming rights. Review YouTube’s applicable rules and your rights for every item before going live; this workflow does not guarantee monetization or policy approval.

For a checklist before building a channel around prerecorded material, use StreamNeo’s copyright safety checklist. Also review YouTube’s current channel and live-stream rules for your account and content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Syncwire Bluetooth 5.4 Car Adapter 48W FM Transmitter for Hands Free Calls
  • [Humanized Ambient Light Switch Design] - Indulge in a delightful driving experience with our trendy rainbow light design. Immerse yourself in fun while having the convenience of easily turning off the light by double pressing the red "B" button when not needed. Enjoy the captivating ambiance of the rainbow lights and have full control over your driving atmosphere.
  • [Upgraded Bluetooth 5.4 Technology] - The latest Bluetooth 5.4 technology, optimizing the transmission delay and connection defect problems, Bluetooth 5.4 will bring you a faster, more stable and smarter connection with less sound quality loss, uninterrupted calls and music experience. It takes only 1 second to complete pairing, and no need to repeat pairing after the first successful pairing with your device.
  • [Intelligent Dual USB Ports & Fast Charging] - Coming with 2 USB ports(PD 36W and USB A 12W), can charge two devices simultaneously. Built-in over-current protection, over-voltage protection, intelligent temperature control, short circuit protection, it will effectively ensure safe charging.
  • [Great Clear Music Streaming] - Bluetooth 5.4 provides a stable connection, while Noise Suppression (CVC) technology and echo-cancellation grant an amazing hands-free calling experience. In addition, this Bluetooth car adapter supports Bluetooth connection and USB stick connection (≤64GB).
  • [Hi-Fi Deep Bass & Backlit] - Just press the button "B" and you will enjoy powerful deep bass and immersive sound. The high-fidelity Hi-Fi sound quality will also make the music more dynamic and pleasing to the ear, taking your passion for music to a new level.

Or let it run in the cloud

If the goal is an always-on YouTube stream from uploaded recordings, StreamNeo is an alternative to keeping your own FFmpeg host online. Upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded videos from the cloud; it does not stream from a camera and it supports YouTube only.

  • Nothing at home has to stay on: the stream runs in the cloud, not on your computer or home connection.
  • One flat price per slot for any uploaded quality up to 4K 60fps, streamed as made without re-encoding or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card, once per account. Plans offer short or long billing periods and can be canceled any time.
  • Each slot includes one always-on stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, and StreamNeo team support.

Monthly pricing: $9.99 per month. UPI and cards are available in India; card checkout is available worldwide. For five or more slots, contact support. The product is the same on every plan; only the billing length changes.

Start your free first day on StreamNeo.

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.