A simple video script

The other day, I wanted to prepare some videos of my favorite reggae and soul tunes for uploading them to YouTube. My goal was very simple: prepare a video with the music, and a static image.

After briefly digging for a simple software to do that, which I could not find, I said ``hey, why not doing it with liquidsoap’’? Well, that is fairly easy!

Here is the code:


audio = once(single("/tmp/bla.mp3"))
video = single("/tmp/bla.jpg")

# Mux audio and video
source = mux_video(video=video,audio)

# Disable real-time processing, to process with the maximum speed

# Encode video and copy audio:
encoder = %ffmpeg(format="mp4",

 # Output to a theora file, shutdown on stop
             encoder, "/tmp/encoded-video.mp4",