Play video and sound

Is there a way we can play a video and its sound currently in Julia?

The excellent VideoIO.jl package doesn’t play sound.

1 Like

As far as I know there isn’t currently a way. There’s been some discussion in the FileIO package about handling container types, and that would probably be my preferred way to handle this. When you open a .avi, .mov, .mkv, etc file, FileIO could recognize it as a container that has encoded audio and video streams within, and then dispatch those streams to their appropriate decoders.

Given that VideoIO already has ffmpeg bindings, it might not be too hard to plug into their audio decoders, but I don’t know anything about the ffmpeg API and how hard it is to get the audio.

Cool. Sounds like a good way of doing it. Synchronization of the two streams though is important.

Right now I plan to “solve” this by spawning mpv and using its command interface to control and communicate with that specific instance.