To shuffle local videos in a nonstop YouTube Live stream, randomize their order in a playlist file, feed that file to FFmpeg’s concat demuxer, loop the resulting input, and send the output to YouTube using the ingest URL and stream key from Live Control Room. Shuffling sets the order; looping repeats it. The steps below explain how to assemble the workflow and what to check before leaving it running.
How the shuffle-and-repeat workflow fits together
FFmpeg’s concat demuxer reads a text file of video paths and presents the listed files as one virtual input. Make the order random before writing that file; then configure FFmpeg to repeat the input. The official FFmpeg documentation describes these building blocks, but does not provide one universal command for shuffling, looping indefinitely, and streaming to YouTube. Shell syntax, quoting, and loop-option behavior can vary with the operating system and FFmpeg release.
As an Amazon Associate I earn from qualifying purchases.
- Choose the videos. Put the files you want to stream in a known directory. An external SSD can be useful if the local video library needs more storage, but it is optional.
- Randomize the file list. Use a shuffle utility or a small script appropriate to your operating system to produce a fresh randomized order. Do not assume one shell command will work unchanged everywhere; paths, quotes, spaces, and newlines need correct handling.
- Write a concat script. Save the shuffled paths using FFmpeg concat-script syntax, with one valid file entry per video. See the FFmpeg concat demuxer documentation for the script format and directives.
- Check the media files. Confirm the entries point to readable files and that the videos have compatible stream properties before concatenating them.
- Configure repetition and output. Use the installed FFmpeg version’s input-loop options to repeat the concatenated input, then configure the output for YouTube Live. FFmpeg options apply to the following input or output, so option placement matters. Test that the input repeats as intended before starting a long broadcast.
- Start and monitor the stream. Open YouTube Live Control Room, copy the current ingest URL and stream key, then start FFmpeg. Check Live Control Room for an incoming signal and monitor FFmpeg’s output for errors.
Build a valid, compatible playlist
Use FFmpeg concat-script syntax
The concat demuxer does not shuffle videos itself: the order of the entries in its script is the order it reads them. Create a new randomized list when you want a new order, then save that list as the concat script. If a filename contains a single quote, unusual characters, or a newline, make sure your script-generation method escapes or handles it correctly; invalid entries can prevent the playlist from opening or select the wrong file.
Consult the FFmpeg format documentation for the exact syntax supported by your installed release. The linked documentation describes FFmpeg’s current development version, so check the local version’s help or documentation if a directive behaves differently.
#1 Best Overall
- USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
- Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
- Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
- Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
- Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty
Make the streams match before concatenating
FFmpeg’s documentation states: “All files must have the same streams (same codecs, same time base, etc.).” Files that differ in stream layout or encoding may fail or produce artifacts at transitions. The concat demuxer does not make incompatible clips compatible.
Use -c copy only when the files already have compatible streams and you want to avoid re-encoding. If they differ, normalize or re-encode them to compatible properties first. Re-encoding adds processing work; stream copy avoids that work but cannot repair mismatches. Incorrect duration information can also cause artifacts, so investigate clip duration and timestamps if transitions are erratic.
Rank #2
- High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
- Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
- Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
- Sleek, durable metal casing
- Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]
Shuffle once or reshuffle after a restart
A shuffled concat script defines one fixed order. Repeating the input replays that same order; it does not generate a fresh shuffle at each cycle. If you want a different order after a restart, create a new randomized script before starting FFmpeg again. If you want a stable rotation, keep and reuse the existing script.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →These are separate decisions: playlist generation controls order, while FFmpeg’s input-loop behavior controls repetition. Verify loop option placement and behavior with the installed FFmpeg version, especially before relying on a long-running session.
Rank #3
- What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
- Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
- Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
- Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
- Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
Connect FFmpeg to YouTube Live
- In YouTube Live Control Room, obtain the current stream ingest URL and stream key for the broadcast.
- Configure FFmpeg’s output to use the ingest URL and the stream key in the format expected by the selected RTMP or RTMPS workflow.
- Prefer RTMPS when using the documented RTMP workflow: YouTube recommends its encrypted variant.
- Keep the stream key private. Treat it like a password; do not publish it in a command example, shared script, screenshot, or public log.
- Start FFmpeg and confirm that YouTube receives the signal. YouTube supports custom reusable stream keys, which can avoid repeatedly setting up a new key; verify the selected key and settings in Live Control Room.
YouTube’s live encoder settings guidance lists RTMP/RTMPS ingestion, H.264, H.265/HEVC, and AV1 video, and AAC or MP3 audio. The actual FFmpeg output must use an encoder and settings supported by the workflow you choose.
Choose output quality, bitrate, and keyframes
Match bitrate to the codec, resolution, and frame rate you actually send. YouTube’s current guidance includes these H.264 examples; they are not universal presets for other codecs or frame rates.
Rank #4
- GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
- BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
- EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
- TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
- WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.
| H.264 output example | YouTube recommended bitrate |
|---|---|
| 1080p at 30 fps | 14 Mbps |
| 720p at 30 fps | 8 Mbps |
Check the current YouTube encoder settings table for the row matching your codec, output resolution, and frame rate. Leave bandwidth headroom for a stable upload rather than choosing a target that consumes all available upstream capacity. YouTube transcodes live streams into different viewer formats.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
YouTube’s keyframe guidance says: “Keyframe frequency: Recommended 2 seconds Do not exceed 4 seconds”. Set a two-second interval where your encoder allows it, and do not exceed four seconds. Use constant-bitrate encoding as specified in YouTube’s encoder guidance.
Best Value
- 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
- 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
- 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
- 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
- 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.
Troubleshoot common failures
- FFmpeg cannot open a playlist entry: Check the path, concat-script syntax, file permissions, and escaping for spaces or quotes. Try a simple filename and a short test playlist to isolate a path-format problem.
- The stream stops or glitches at a transition: Compare the files’ streams, codecs, time bases, and duration information. Normalize or re-encode mismatched files;
-c copywill not fix incompatibility. - The playlist ends instead of repeating: Confirm that the loop option is applied to the concat input, not accidentally to a different input or the output. Check the option placement and loop behavior supported by the installed FFmpeg release.
- YouTube does not receive a signal: Recheck the ingest URL and stream key in Live Control Room, the output configuration, and whether FFmpeg reports a connection error. Keep credentials private while inspecting logs.
- YouTube reports unstable or unsuitable encoding: Verify codec, constant bitrate, keyframe interval, and bitrate against YouTube’s current encoder settings for the exact resolution and frame rate.
- FFmpeg exits or the network drops: The basic playlist setup does not itself establish a complete process-supervision or reconnection strategy. Arrange and test a restart procedure appropriate to your operating system and service environment; do not assume a playlist loop will restart a stopped FFmpeg process.
Keep the playlist eligible for YouTube Live
A technically valid stream is not automatically cleared for broadcast. Use videos and audio you own or have permission to stream, and review YouTube’s current copyright and live-stream rules before putting a playlist on air. Replaying material does not remove copyright obligations. Also distinguish technical availability from monetization: a stream working in Live Control Room does not by itself establish that reused or repetitive content qualifies for monetization.
Or let it run in the cloud
If your goal is an always-on YouTube stream rather than running FFmpeg on your own machine, StreamNeo keeps an uploaded video or playlist looping from the cloud. Upload the video or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams the upload as made, up to 4K 60fps, at one price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month.
Quick Recap
Start your free StreamNeo day.
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.




