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

To loop several local MP4 files on YouTube Live, put them in playback order in an ffconcat playlist, then have FFmpeg read the playlist in real time, loop it, and send it to YouTube’s current RTMPS ingest endpoint. Use stream copy only when the files have compatible streams, codecs, and time bases; otherwise normalize or re-encode them before broadcasting.

What the concat demuxer does—and when it works

FFmpeg’s concat demuxer reads a text playlist and presents its files as one continuous input, adjusting timestamps so each file follows the previous one. It does not make different media formats compatible. For stream copying, the inputs need matching stream layouts, codecs, and time bases. Incorrect duration metadata can also cause timestamp gaps or artifacts at transitions.

If the clips differ in resolution, frame rate, audio layout, codecs, or time bases, do not assume that -c copy will produce a clean continuous stream. Normalize the files first or use FFmpeg’s concat filter and re-encode. FFmpeg’s FAQ points to the concat filter when re-encoding is needed: FFmpeg FAQ.

Prepare the playlist and YouTube stream

1. Create the ffconcat playlist

Save a plain-text file named playlist.ffconcat beside the MP4 files. The header must be the exact first line for automatic format recognition; list each file in the order you want it played:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sandisk 2TB Extreme Portable SSD, Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware, External Solid State Drive, SDSSDE61-2T00-G25
  • Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
  • Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
  • Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
  • Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
  • Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
ffconcat version 1.0
file 'clip-01.mp4'
file 'clip-02.mp4'
file 'clip-03.mp4'

Use quoted paths and escape special characters as required by FFmpeg’s concat syntax. Relative paths in the playlist are usually simpler and safer than paths outside its safe subset. The sample command below uses -safe 0 to allow paths that the demuxer would otherwise reject; remove that option if you can use safe relative paths. See the FFmpeg concat demuxer documentation.

2. Copy the current YouTube ingest details

In YouTube Live Control Room, create or select a stream and copy its current ingestion address and stream name/key. YouTube’s API documentation treats the ingestion address and stream name as separate values; an encoder can combine them as STREAM_URL/STREAM_NAME. Use the exact values YouTube displays for this stream and keep the key private. Do not paste a real key into a public command example, forum post, or shared script. See YouTube LiveStreams documentation and YouTube RTMPS ingestion guidance.

Start the loop with FFmpeg

For compatible files, this is a starting command, not a verified command for every FFmpeg build. Replace the placeholder with the exact RTMPS endpoint and stream name/key combination supplied by YouTube:

Rank #2
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model)
  • Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
  • Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
  • Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
  • Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
  • From Sandisk, a brand professional photographers trust to take on assignments.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat 
  -c copy -f flv "rtmps://INGESTION_URL/STREAM_NAME"
  • -re reads the file input at real-time speed rather than sending it as fast as the machine can process it.
  • -stream_loop -1 asks FFmpeg to repeat the input indefinitely.
  • -f concat selects the concat demuxer for the playlist.
  • -safe 0 permits paths outside the demuxer’s safe subset. Avoid it when safe relative paths work for your files.
  • -c copy passes streams through without re-encoding. Use it only when the inputs are compatible and the output is accepted by YouTube.
  • -f flv selects the streaming container used for this RTMP/RTMPS output.

Check the options against the FFmpeg version installed on your system. For mismatched inputs, prepare a normalized set of files or switch to a concat-filter workflow that re-encodes; the filter requires explicit choices for output video and audio properties, so do not substitute it into this command without building and testing the filter graph for your files.

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

Choose settings YouTube can ingest

For RTMP/RTMPS, YouTube’s guidance lists H.264, H.265/HEVC, and AV1 video, frame rates up to 60 fps, CBR bitrate encoding, and AAC or MP3 audio. It recommends a two-second keyframe frequency and says not to exceed four seconds. RTMPS is the secure option YouTube recommends when available. Confirm the current settings in YouTube Help’s live encoder settings and RTMPS ingestion guidance.

As one concrete reference, YouTube’s published table gives H.264 at 1080p, 30 fps a minimum of 5 Mbps and a recommended bitrate of 14 Mbps. That is an encoder setting recommendation, not a guarantee that a particular internet connection can sustain it. Choose a bitrate your actual upload connection can maintain reliably; lower the resolution or bitrate if the stream health shows instability.

Rank #3
SSK Portable SSD 500GB External Solid State Hard Drive USB C Up to 1050MB/s
  • Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
  • 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
  • Data Security: Solid state drives S.M.A.R.T. health diagnostics​ and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
  • USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
  • Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity

With -c copy, FFmpeg does not convert the source files to meet a bitrate, codec, frame-rate, or keyframe target. If the source encoding does not match what you intend to send, create compatible output files or re-encode with an explicitly configured workflow before going live.

Test before the broadcast and monitor it

  1. Start FFmpeg and confirm it connects using the current YouTube endpoint and stream key.
  2. Check YouTube Live Control Room for incoming video, audio, and stream-health feedback.
  3. Test representative motion and audio, including a transition between clips. YouTube Help advises: “Make sure to test before you start your live stream. Tests should include audio and movement in the video similar to what you’ll be doing in the stream.”
  4. Start the public broadcast from YouTube when the preview and health indicators are acceptable. Keep monitoring the encoder output and YouTube feedback during the stream.

Troubleshoot common problems

Concat errors, gaps, or glitches between clips

Compare the files’ stream layouts, codecs, time bases, and duration metadata. The demuxer uses durations to place subsequent clips on the timeline, so incorrect metadata can cause artifacts or gaps. The concat format supports a duration directive to override an inaccurate duration. If the files have mismatched streams or formats, normalize them or use the concat filter with re-encoding.

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

YouTube shows no incoming stream or rejects the connection

Verify the current RTMPS endpoint and stream name/key in Live Control Room, check that they are combined correctly, and confirm you are using the endpoint and protocol YouTube supplied. A stale or mistyped key, wrong endpoint, or TLS connection problem can prevent ingestion. Regenerate or recopy the current details in YouTube rather than exposing or reusing a key from an old setup.

Rank #4
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • 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.

Dropped frames or poor stream health

Compare the chosen bitrate with the upload capacity available to the streaming machine. Reduce bitrate or resolution if the connection cannot sustain the output, then test again and use YouTube’s stream-health feedback to assess the result. A wired Ethernet connection can help avoid some local Wi-Fi variability, but it cannot increase the internet service’s upstream capacity.

There is no audio

Check that each MP4 contains an audio stream and that the playlist inputs have compatible audio layouts. YouTube lists AAC or MP3 audio for RTMP/RTMPS ingestion. If the files have inconsistent or unsupported audio, normalize or re-encode them and test transitions before the public stream.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Copyright and channel considerations

Having the technical ability to loop a file does not grant permission to rebroadcast its contents. Before streaming, confirm you have the rights needed for every video and audio track, and review YouTube’s policies for the channel and content. Repeated or reused material may also raise monetization or policy questions independent of whether FFmpeg sends it successfully. See YouTube’s live streaming requirements and guidance and check the applicable copyright and monetization rules for your channel.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Samsung T7 Portable SSD 1TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³

Or let it run in the cloud

If you want the YouTube loop to continue without leaving a computer and home connection running, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. The setup is upload a recording or build a playlist, add your YouTube stream key once, and go live.

  • Nothing has to stay on at home: StreamNeo loops uploaded videos from the cloud, even with your computer off.
  • Each slot streams the uploaded quality up to 4K 60fps at one flat price per slot, without re-encoding or quality tiers.
  • It can recover automatically if YouTube drops the stream.
  • The first day is free with no card required; it is one free day per account.
  • Monthly: $9.99 per month.

StreamNeo is YouTube-only and plays uploaded videos; it does not broadcast a live camera feed. Start your free StreamNeo day.

Quick Recap

Bestseller No. 2
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model)
Sandisk 1TB Portable SSD, Up to 800MB/s Read Speeds, Black (Old Model)
From Sandisk, a brand professional photographers trust to take on assignments.
$188.90
SaleBestseller No. 4
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99

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.