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


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


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


in a bash-script should do it.


Under Windows 7 you could alternatively use this Python script:


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.