3

I'm hosting a party, and I want to play random sequences from a collection of movies in the background. I don't want to sit and edit together five hours of footage by hand though. Ideally I would:

Play x minutes from a random point in one random movie, then play x minutes from a random point in another random movie, and so on. Any sensible scheme is fine though.

If you have any suggestions on where to start, either on Linux (preferable) or on Windows, I'd appreciate some ideas. I'm happy to script this in almost any language if needed.

2 Answers 2

2

Make a script that adds your movies in a playlist and play it in VLC. You can add start- and stop-time like this:

#EXTM3U
#EXTINF:1000,movie-clip-1.avi
#EXTVLCOPT:start-time=100
#EXTVLCOPT:stop-time=110
movie-clip-1.avi
#EXTINF:500,movie-clip-1.avi
#EXTVLCOPT:start-time=440
#EXTVLCOPT:stop-time=450
movie-clip-2.avi

The EXTINF-value is the movie length in seconds. VLC will add that for you if you save a playlist of all your movies.

Something like

stop-time=$[RANDOM%$length+$x]
start-time=$stop-time-$x

in a bash-script should do it.

0
0

Under Windows 7 you could alternatively use this Python script:

https://github.com/niknow/vlc-random-videoclip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.