Transcode and stream over http with python
Posted: 22 Jan 2016 00:59
I'm new to VLC and trying to use it transcode and stream video over http. I figured out how to do this from the command line but having trouble figuring how to do this with the python lib.
Here's the command:
Here's what I have in python:
That's as best as I've been able to figure out from the docs and examples. This just causes a window to open to play the video. What's the proper way to do this?
Here's the command:
Code: Select all
C:\Program Files\VideoLAN\VLC\vlc.exe" hannibal.mkv --sout="#transcode{vcodec=theo,vb=1024,channels=2,samplerate=44100,ab=128,acodec=vorb}:http{mux=ogg,dst=:8080/hannibal.ogg}" :sout-all :sout-keep -I dummy
Code: Select all
import vlc
inst = vlc.Instance()
med = inst.media_new("D:\\Rich\\Videos\\hannibal.mkv", "sout=#transcode(vcodec=theo,vb=1024,channels=2,samplerate=44100,ab=128,acodec=vorb):http(mux=ogg,dst=:8080/hannibal.ogg)", "sout-all", "sout-keep", "I=dummy")
p = med.player_new_from_media()
p.play()