Use FFmpeg’s concat demuxer to play an ordered list of compatible video files, and loop that whole input indefinitely with -stream_loop -1. Create a playlist file, then send its output to the RTMPS URL and stream key from your own YouTube Live setup. The command below is a template: match its encoding settings to your video and frame rate, and test it with your installed FFmpeg build before relying on it.
Create an ordered playlist
In a text editor, create a file named playlist.ffconcat in the order you want the videos to play. Put the required header on the very first line, exactly as shown:
ffconcat version 1.0
file 'video-01.mp4'
file 'video-02.mp4'
file 'video-03.mp4'
These example paths are relative to the playlist file. Use filenames that match your actual files. The concat demuxer reads the entries sequentially and adjusts timestamps so each listed file follows the previous one. It works best when the files have compatible streams, codecs, and time bases; mismatches can cause errors or playback artifacts. FFmpeg’s concat demuxer documentation describes the format and its requirements.
Keep playlist paths safe
Prefer simple relative paths and FFmpeg’s default safe-path handling when possible. The command below uses -safe 0, which allows broader paths; use it only with a playlist you control. Do not use that setting to load an untrusted playlist. For details, see FFmpeg’s concat format options.
#1 Best Overall
- 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
- 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
- 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
- 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
- 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
Run the loop to YouTube Live
Replace the destination at the end with the ingest URL and stream key or stream name supplied in your YouTube Live setup. Keep the key private; do not paste it into a public post, screenshot, or shared script.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat
-c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k
-g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100
-f flv 'rtmps://YOUR_INGEST_HOST/YOUR_STREAM_KEY'
This is a starting template, not a verified command for every FFmpeg build or media set. -stream_loop -1 goes before the concat input so FFmpeg repeats the input sequence; -re paces file input for live output. Check your installed version’s syntax with ffmpeg -h full. The output options encode H.264 video and AAC audio in an FLV stream; adjust them to the target mode and YouTube’s current guidance.
Use your actual YouTube ingest details
YouTube’s Live Streaming API documents the primary RTMPS ingest address and notes that an encoder may ask for the URL and stream name separately or together as STREAM_URL/STREAM_NAME. Get both values from your own YouTube Live setup rather than using an example or shared key. YouTube recommends RTMPS, the encrypted extension to RTMP. YouTube Live ingestion protocol
Rank #2
- 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
- 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
- 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
- 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
- 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0
Choose output settings for the video
The example’s bitrate and GOP values are not universal recommendations. Choose the resolution, frame rate, codec, and bitrate for your intended output, and use the matching row in YouTube’s current encoder settings guidance. YouTube documents H.264, H.265, and AV1 video; AAC or MP3 audio; constant bitrate (CBR); frame rates up to 60 fps; and a recommended two-second keyframe interval that should not exceed four seconds. It recommends RTMPS for secure ingest. YouTube encoder settings, bitrates, and resolutions
Bitrate and keyframes in the template
The sample sets video bitrate and maximum rate to 4,500 kbps, with a 9,000 kbps buffer. Those are illustrative values, not a YouTube-prescribed rate for every resolution. For context, YouTube’s current settings table recommends 10 Mbps for H.264 at 1080p and 30 fps; other resolutions and frame rates have different recommendations. Set -g and -keyint_min to the keyframe interval appropriate to your frame rate. For example, 60 frames at 30 fps represents two seconds, while 60 frames at 60 fps represents one second. The sample fixes the GOP at 60 frames, so change it if your output frame rate or target interval differs.
Audio and frame-rate consistency
The example encodes AAC at 128 kbps and 44.1 kHz. Confirm that this is suitable for your source and output. If files have different frame rates, dimensions, audio layouts, or stream properties, test the transitions: a concat list that FFmpeg accepts may still produce timestamp or playback problems when the inputs are not compatible.
Rank #3
- 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box.
- 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
- 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
- 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
- 【Support Mic-in for Commentary】Kedok capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
When files are not compatible
If the files do not share compatible streams, codecs, and time bases, use a workflow that normalizes them rather than assuming the demuxer can join them cleanly. FFmpeg’s FAQ distinguishes the concat demuxer, which can avoid re-encoding when inputs are suitable, from the concat filter, which is appropriate when filtering and re-encoding are needed. FFmpeg FAQ: concatenating video files
- Use the concat demuxer when the inputs are compatible and you want to avoid an additional re-encode before the output stage.
- Use a concat filter and re-encode when you need to normalize or process mismatched inputs. This requires a filter graph suited to the actual files; there is no single safe graph for every combination of video and audio streams.
Test before relying on the broadcast
- Check the installed binary: run
ffmpeg -versionand consultffmpeg -h fullfor the options supported by that build, including loop syntax. - Inspect each source file: use
ffprobeto check its video and audio streams, codec, dimensions, frame rate, time base, and duration. Compare those properties across the playlist. - Test a short sequence: start with a small playlist and verify that files play in order, the final file returns to the first, and audio and video remain synchronized at transitions.
- Start a YouTube test stream: confirm the correct RTMPS destination and private stream key, then inspect playback and audio. YouTube recommends testing with audio and motion similar to the planned stream.
- Watch stream health: check YouTube’s live stream health indicators while the test is running and resolve warnings before depending on the broadcast. YouTube’s encoder guidance
Troubleshooting common failures
FFmpeg rejects the playlist or cannot open a file
- Confirm
ffconcat version 1.0is the first line, with no blank line or other text before it. - Check that each filename and relative path is correct from the playlist’s location. Try the default safe-path handling with simple relative paths before using
-safe 0. - Use
-safe 0only for a playlist you control if broader paths are necessary.
Playback breaks or artifacts appear at transitions
- Compare streams, codecs, and time bases across the files. The demuxer relies on compatible inputs.
- If they differ, normalize the media or build a concat-filter workflow that re-encodes to a consistent output. Test audio and video at every transition.
The stream will not connect
- Verify the ingest URL and stream key against your current YouTube Live setup; ensure you have not included placeholder text from the example.
- Use the RTMPS destination supplied for your stream. YouTube’s documented encoder interfaces may request the URL and stream name separately or together.
- Check YouTube’s stream health and FFmpeg’s error output; do not expose the key while troubleshooting publicly.
The stream connects but YouTube reports a warning
- Check that the codec, CBR mode, bitrate, frame rate, and keyframe interval match YouTube’s current guidance for the selected resolution.
- Do not treat the template bitrate or 60-frame GOP as suitable for every output mode; calculate the interval from the output frame rate and use the appropriate platform bitrate recommendation.
Keep the process running
With this DIY method, the machine running FFmpeg and its network connection must remain available for the stream process. If you want the playlist to run without leaving a computer on at home, StreamNeo is a cloud option for YouTube: upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos from the cloud, supports the files as uploaded up to 4K 60fps at one flat price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. See StreamNeo or start your free first day.
Quick Recap
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.




