Instantly share code, notes, and snippets.

View gist:c2673b3b94a091baf4732bac313e348d
I have a question. I need to live stream some videos in 1 folder on youtube by ffmpeg.
Play random video all of them, and loop forever folder to live stream 24/7 .
It's look like windowns media player, when I choose turn shuffle on and turn repeat on.
For example: with 4 video ( 3-2-4-1 and loop 2-1-3-4 and loop 1-4-3-2, 4-2-1-3.....)
I can loop 1 video infinite but can't not loop all video
ffmpeg -re -stream_loop -1 -i “input.mp4”
I try write code live all video (*.mp4) in 1 folder but not shuffle and repeat