To stream videos in a shuffled order continuously, create a randomized FFmpeg concat playlist and loop that input with -stream_loop -1. This repeats the same shuffled sequence; it does not reshuffle the videos at the start of each cycle. For a fresh order every time, an external controller must generate the next playlist and manage a restart or transition.
What FFmpeg will—and will not—shuffle
FFmpeg’s concat demuxer reads files in the order listed in a playlist. Shuffle the file list before FFmpeg opens it, and the resulting stream plays one randomized cycle. FFmpeg documents -stream_loop -1 as repeating the input indefinitely; that option loops the input, not randomizes its order. FFmpeg documentation and the concat demuxer documentation describe these behaviors.
As an Amazon Associate I earn from qualifying purchases.
There are two distinct goals:
- Repeat one shuffled order: make the playlist once, then loop it. This is the simpler approach.
- Choose a new order each cycle: use an external supervisor or playlist source to create a new order and perform a controlled transition or restart at the cycle boundary. FFmpeg’s input loop alone does not do this.
Do not assume that editing the playlist file while FFmpeg is running will change the active input. The documented behavior does not establish that. Arrange for the next order to be loaded through a process designed to switch inputs.
Create a shuffled concat playlist
Prepare compatible files
Concat inputs should have compatible stream characteristics. If videos differ in resolution, frame rate, codecs, or audio layout, test them together before starting a long stream. Normalize the files or use a controller that opens and encodes each one consistently if necessary. A single FFmpeg invocation should not be treated as a guarantee that mismatched sources will transition cleanly.
#1 Best Overall
- 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
Generate the list
On a POSIX shell, enumerate the supported video files in the directory, randomize that enumeration, and write the resulting paths to an ffconcat playlist. The playlist’s order is the shuffle for that cycle. The exact file-enumeration and quoting method depends on the shell and filenames; paths containing spaces or apostrophes need correct FFmpeg concat quoting. FFmpeg’s concat documentation gives quoting examples and explains that safe mode is enabled by default. Relative filenames with ordinary portable characters are the least troublesome. Use -safe 0 only when you trust the paths and playlist directives you provide.
For example, save the ordered entries in shuffled.ffconcat in the concat format expected by FFmpeg, with one file entry per video. Keep the list in the exact order you want played. Consult the concat demuxer documentation for the required syntax and path-safety behavior.
Rank #2
- 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.
Connect FFmpeg to YouTube Live
- Prepare the YouTube stream. In YouTube Studio, create or select a stream in Live Control Room. Copy the server URL and stream key shown for that stream. YouTube’s encoder workflow is to enter those values in the encoder, start sending, then check the preview and status in Live Control Room. Keep the stream key private. See YouTube’s encoder setup instructions.
- Set the ingest protocol. Use the server URL and protocol YouTube supplies for the stream. RTMP is a common encoder workflow. HLS is a separate option with its own format and latency requirements; do not apply HLS settings to an RTMP connection by assumption.
- Start FFmpeg with the shuffled input. A conceptual RTMP-style command is:
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i shuffled.ffconcat -c:v libx264 -c:a aac -f flv "$YOUTUBE_RTMP_URL/$YOUTUBE_STREAM_KEY"This is a template, not a tested command. Set the URL and key to the values supplied in YouTube Studio, and choose encoding settings that fit the source files, your FFmpeg build and hardware, and the actual ingest protocol. If you use only trusted, safe relative paths, you may not need
-safe 0.Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. - Check the incoming preview. Confirm that YouTube receives video and audio in Live Control Room before relying on the stream. If the preview is absent or reports an error, check the URL, key, output format, and encoder settings.
- Plan the stream’s lifecycle. YouTube says streams under 12 hours are automatically archived. A genuinely continuous 24/7 broadcast therefore needs a plan for broadcast lifecycle and archival behavior rather than an assumption that one archived video covers any duration. YouTube’s API documentation distinguishes the watchable live broadcast (an event/video) from the live stream resource that carries audio and video, and includes a 24/7 feed as an ongoing-feed use case. See YouTube Live Streaming API documentation.
Choose encoding settings for the actual input
The command above does not specify a universal bitrate, resolution, frame rate, or keyframe interval because the right values depend on your source media and the ingest protocol and settings shown for your stream. Check YouTube Studio’s current requirements for the chosen connection, then configure FFmpeg accordingly. If a source mix varies, normalize it or test the transitions before leaving the stream unattended.
Rank #3
- 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
If you deliberately use HLS ingestion
YouTube’s HLS guidance specifies muxed M2TS, H.264 or HEVC video, AAC audio, closed GOP, and support for up to 60 fps. The guidance also notes relatively higher latency; HLS segments are one to four seconds, and media playlists specify reconstruction order. These are HLS-specific requirements, not settings to copy blindly into an RTMP command. See Google’s HLS ingestion guide and HLS requirements.
HLS segment ordering is not video shuffling. Your concat playlist determines the order of source videos; HLS playlists describe how the ingest media segments are reconstructed.
Rank #4
- 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.
Troubleshoot common failures
- FFmpeg rejects a playlist path: check concat quoting and whether safe mode is rejecting the path or directive. Prefer trusted relative paths; only disable safe mode for a playlist you control.
- The stream fails at a file boundary: inspect the files for incompatible stream characteristics. Normalize them or use a controller that encodes each source consistently.
- The order repeats instead of changing: this is expected with
-stream_loop -1; it repeats the same concat input. Generate and load a new playlist through external control logic at a cycle boundary. - YouTube does not show an incoming preview: verify the server URL and stream key in YouTube Studio, ensure they are entered correctly, and confirm the output format and protocol match the selected ingest workflow.
- HLS settings do not work with the chosen connection: confirm whether the stream is configured for HLS or RTMP. The protocols have different requirements; HLS’s M2TS and codec guidance is not a general RTMP recipe.
Or let it run in the cloud
If the goal is an always-on YouTube stream of uploaded videos rather than managing an FFmpeg process yourself, StreamNeo runs the playlist from the cloud:
Free tools Windows power users keep installed
One-click scans. No signup required.
- Upload a recording or build a playlist.
- Add your YouTube stream key once.
- Go live; StreamNeo loops the videos from its cloud service.
Nothing has to stay on at home. Videos stream as uploaded, up to 4K 60fps, at one price per slot; StreamNeo automatically recovers if YouTube drops the stream. The first day is free with no card. The monthly option is $9.99 per month. StreamNeo is for YouTube streams of uploaded videos, not camera broadcasts. Learn more at StreamNeo, or start the free first day.
Quick Recap
Best Value
- 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³
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.




