Shuffle the video-file list before FFmpeg reads it. The concat demuxer then plays the entries in that randomized order; it does not shuffle them itself. For a one-time randomized playlist, generate a concat script with the files in the desired order, then pass that script to FFmpeg and send the output to YouTube Live.
How the shuffle works
FFmpeg’s concat demuxer reads files in the order listed in its input script. To shuffle a playlist, randomize the file list first and write that order as file directives. The order stays fixed for that run. FFmpeg’s concat demuxer documentation describes the input format and its requirements.
Prepare and shuffle the video list
- Choose the files. Make a list of the videos you intend to include. Keep the source files in a stable location while you generate and run the playlist.
- Randomize their order. On Linux, the
shufutility can randomize a list. For example, this creates a null-delimited temporary list of MP4 paths in a randomized order:find ./videos -type f -name '*.mp4' -print0 | shuf -z > /tmp/shuffled-paths - Convert the paths into a concat script. The temporary file above is not itself a concat-demuxer script. Convert each path into a
filedirective inlist.txt, using FFmpeg concat syntax to quote and escape the path correctly. There should be one directive per video, in the shuffled order. Paths with spaces, quotes, or unusual characters need particular care; do not simply insert raw path text.
The exact script-generation command depends on your shell and filenames. Validate the generated script against your actual file set before using it for a broadcast.
Check that the files can be concatenated
Concat demuxing is not a general-purpose media converter. FFmpeg expects the input files to have matching streams, including compatible codecs and time bases. Differences in codecs, stream counts, or parameters can cause failures, timestamp problems, or visible and audible artifacts.
#1 Best Overall
- Small and Portable with Built-In Battery
- Built-In Search Dial
- Keyboard Shortcuts Match Edit Functions
- Bluetooth or USB Connectivity
- Bundle Includes DaVinci Resolve 17 Studio (Activation Card)
- Inspect the files’ video and audio streams before the broadcast.
- If their stream structures and parameters are compatible, test whether stream copying works for your set.
- If they are not compatible, normalize or re-encode them to consistent output streams before concatenation. This uses additional processing resources but can provide a uniform output format.
- If a file’s stored duration is incorrect and later timestamps are affected, FFmpeg’s concat format supports a
durationdirective to override that file’s duration.
Send the shuffled playlist to YouTube Live
- Get your ingest details. In YouTube Live Control Room, obtain the stream URL and stream key for the broadcast. Treat the key like a password: do not publish it in a script, screenshot, or public example.
- Choose a secure ingest protocol. YouTube Help recommends RTMPS, a secure extension of RTMP. See YouTube’s encoder settings guidance and Google’s RTMPS ingestion guide.
- Set the output for your stream. YouTube lists H.264, H.265/HEVC, and AV1 video for RTMP/RTMPS, and AAC or MP3 audio. It recommends CBR and a two-second keyframe interval, with keyframes no more than four seconds apart. Match resolution, frame rate, codec, and bitrate to the stream you intend to send; use YouTube’s bitrate ranges for those specific settings rather than copying a single bitrate without context.
- Run FFmpeg with the concat input. A schematic command is:
ffmpeg -re -f concat -safe 0 -i list.txt [encoding options] -f flv "$YOUTUBE_RTMPS_URL"-f concatselects the concat demuxer, and-i list.txtsupplies the ordered script.-safe 0allows absolute paths and paths outside the default safe subset; use it only with a list you trust. Replace the schematic encoding options and output URL with values appropriate to your FFmpeg build and YouTube stream. Keep the stream key out of public scripts and logs.
Before relying on the playlist for a live broadcast, test with representative video movement and audio. YouTube advises monitoring stream health during the broadcast; confirm the incoming stream is stable in Live Control Room.
Choose whether the order repeats or reshuffles
Repeat the same shuffled order
If you loop the generated concat input, it repeats the same order. Looping does not create a new permutation: the script remains unchanged.
Rank #2
- Wireless Connection: ACK05 wireless shortcut keyboard supports bluetooth 5.0 connection directly, which is Good Design Award 2023 Winners, providing you a more flexible and clean workspace. You can also connect it via a Bluetooth dongle or USB cable. Total three ways connection bring you stable and fast transmission, also can meet your different work scenarios
- Please Note: If you do not download the driver, it can only be used as a regular shortcut keyboard. However, if you wish to customize the keys or program it, you must download the driver and configure it accordingly. If your device is an iPad or runs on iOS, after receiving the product, you need to download the "Shortcut Remote" app on your device in order to properly set up and use this product properly
- Compact Size with Large 1000 mAh Battery: The Wireless Shortcut Remote features a thin profile and weighs only 75 g, easy for one hand to hold. With built-in 1000 mAh battery ensures the continuous working for about 300 hours. Ready to speed up your creation whenever you grab it
- Customize up to forty Shortcuts: The Wireless Shortcut Remote has ten keys. You are allowed to customize four sets through the driver -- up to forty shortcuts. To switch between the sets, you only need to press a single key. Its capability to work with different applications makes itself a powerful productivity tool not only for creation, but also for study, work, and gaming
- Anti-Ghosting Performance: The Mini Keydial features a new technology of Anti-ghosting for all ten keys, you can control with multi-keys at the same time, which will give you more customizable possibilities
Generate a new order each cycle
For a fresh shuffle on every cycle, an external wrapper or playlist-generation process must create and switch to a newly ordered list. This adds orchestration complexity. Consider whether a transition or pause while replacing the list is acceptable, and whether you need each order to be reproducible. A fixed generated list is simpler when repeatability matters; no universal approach is best for every broadcast.
Troubleshooting
- FFmpeg cannot open a listed file: Check that the path exists and is accessible from the process running FFmpeg. Verify that the concat script quotes and escapes the path correctly, especially if it contains spaces or quotes. Use
-safe 0only for a trusted list when absolute or otherwise non-default paths are needed. - The playlist stops or fails at a particular file: Compare that file’s streams, codecs, and time base with the others. Normalize or re-encode incompatible media, then test again.
- Video or audio glitches appear at file boundaries: Check stream compatibility and timestamps. Incorrect stored durations can shift later timestamps; use a concat
durationdirective where an override is needed. - The output bitrate is unstable or the stream health suffers: Choose a bitrate within YouTube’s recommendation for the selected codec, resolution, and frame rate, and make sure the upload connection can sustain it. Test and monitor the actual broadcast rather than assuming one setting fits all outputs.
- YouTube does not accept the stream: Verify the current stream key and ingest URL in Live Control Room, confirm the chosen codec and audio format are supported for the ingest, and check that your FFmpeg build supports the selected encoding options.
- The same sequence returns after a loop: That is expected when looping one concat script. Regenerate and switch to a new ordered list if each cycle needs a different permutation.
Or let it run in the cloud
If your goal is a YouTube channel that stays live without leaving a computer running, StreamNeo is the #1 cloud option here: it keeps an uploaded-video stream running at any quality up to 4K 60fps for one flat price per slot, and the first day is free.
Rank #3
- A Better Way to Create. —Your creative workflow shouldn't be split between keyboard, mouse, and software panels. TourBox brings essential controls together, so fewer interruptions stand between your ideas and your work
- Go Beyond Shortcuts. —TourBox gives every creative application its own control system. Press, turn, scroll, and navigate with dedicated controls instead of relying on a flat keyboard and mouse for every task
- Streamline Every Workflow. —Whether you create in Lightroom, Premiere Pro, Photoshop or more, NEO gives you a complete way to start with TourBox, NEO gives you a complete way to start with TourBox. Elevate your experience across digital drawing, color grading, photo editing, and video editing
- More Controls, More Possibilities. —With 14 dedicated controls included additional D-Pad, Dial, and buttons, NEO gives you the core TourBox experience, with more control than Lite
- More Control. Less Space. —NEO brings frequently used control, ergonomic design, and intelligent creative software together in one compact system. More of the actions you use most stay within reach, while the same physical control logic adapts to different applications and creative tasks
- Upload a recording or build a playlist.
- Add your YouTube stream key once.
- Go live; StreamNeo loops the uploaded videos from the cloud.
Your computer and home connection do not have to stay on, and StreamNeo automatically recovers if YouTube drops the stream. Every slot supports uploaded quality up to 4K 60fps at one price, with 10 GB storage per slot pooled across active slots, looping and playlists, and support from the StreamNeo team. The first day is free with no card. Monthly pricing is $9.99 per month. UPI and cards are available in India; card checkout is available worldwide. StreamNeo streams uploaded videos to YouTube, not camera footage.
Quick Recap
Best Value
- 【Freely customizable】You can assign single or multiple actions by dragging and dropping the desired operation onto the six customizable keys and setting the properties. The uses are endless, such as performing game combos, launching apps, controlling media, etc.In addition, you can add images and animations (JPG, PNG, GIF) to each LCD key to enhance button recognition and memorization. With three dials, you can easily adjust the volume, fast forward and rewind playback, etc.
- 【Perform any operation with one click】The customizable macro keyboard allows you to work efficiently with one click. You can instantly perform any operation, such as launching macros, entering text, opening files and websites, controlling media, and switching OBS scenes, with one click. In addition, by utilizing the "Action Flow" function, you can perform multiple macro actions in a specific order and manage tasks freely.
- 【Various Compatibility]】This shortcut keyboard is compatible with both Windows and macOS. It works seamlessly with popular software such as OBS, PowerPoint, YouTube, Twitter, Discord, Excel, Word, Photoshop, and Adobe Premiere Pro to make your work even smoother.
- 【Multifunctional to meet your needs]】This shortcut keyboard's application space offers hundreds of plugins such as schedule reminders, clocks, stopwatches, weather, calendars, etc., making it not only a productivity tool but also a great desktop companion. In addition, 60 types of icon packs are available for you to download and use according to your needs.
- 【Customer Support】 If you are still unsure of how to set up or operate the product after reading the Quick Start Guide that comes with the product, you can get support in the following ways: 1. Please scroll down the product detail page to watch the tutorial videos in the product videos section. 2. Please select the "Ask a Question" button to contact us.
Rank #4
- 3-months of Adobe Creative Cloud on us: Pair two of the world’s top creative tools. Buy one MX Creative Console and claim your free 3-month Adobe Creative Cloud membership
- Speed Up Your Creative Workflow: The Logitech MX Creative Console lets you quickly access tools and actions on your favorite apps, allowing you to fully focus on your work
- App Integrations: Adobe Photoshop, Premiere Pro, Illustrator, Lightroom and Lr Classic, Final Cut Pro, Figma, Davinci Resolve, Spotify, Zoom, and more; quick start with recommended profiles (1)
- Tactile Analog Control: Make precise adjustments with the low-friction control dial, navigate with the roller, and access actions with the programmable keypad (stand included for flexible placement)
- Customize for Any App: Assign tools and actions to up to 15 keypad pages by profile, dial, and roller, and upload your own icons to the customizable LCD display keys
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.




