[Solved] Autostart when RTSP-stream arrives?
Posted: 27 Jul 2012 17:15
Hello there!
In short: Is there a way to start a (--sout) playlist item automatically if a stream is available?
To elaborate on this: I'm currently setting up a streaming environment where users publish their h.264 RTSP-stream via Quicktime Broadcaster to a Darwin Streaming Server instance (running on Ubuntu 10.04). So far, so little VLC involved...
In order to embed the video on a flashplayer webpage, I transcode the incoming RTSP with VLC (VLC media player 1.0.6 Goldeneye) like this:
Despite lacking complete understanding of all the options involved, above code is running okay for me.
However, the current setup needs manual starting _and_ stopping of the VLC instance (which is not desired). Any insights on how to 'daemonize' the transcoding?
Currently I could think of the following:
Regards,
Konrad
In short: Is there a way to start a (--sout) playlist item automatically if a stream is available?
To elaborate on this: I'm currently setting up a streaming environment where users publish their h.264 RTSP-stream via Quicktime Broadcaster to a Darwin Streaming Server instance (running on Ubuntu 10.04). So far, so little VLC involved...
In order to embed the video on a flashplayer webpage, I transcode the incoming RTSP with VLC (VLC media player 1.0.6 Goldeneye) like this:
Code: Select all
cvlc -vv rtsp://myserver.net:5678/streamname.sdp --no-sout-transcode-hurry-up --sout-mux-caching=4000 --rtsp-caching=4000 --sout="#transcode{threads=auto,deinterlace,aenc=ffmpeg{aac-profile=low},ab=192,samplerate=44100,channels=2,acodec=mp4a,audio-sync,vcodec=h264,width=640,height=480,fps=24,scale=1,vb=224,venc=x264{keyint=250,preset=veryfast,level=-1,profile=baseline,nocabac,slices=8,qcomp=0.4,vbv-maxrate=2000,vbv-bufsize=2000}}:std{access=http,mux=ffmpeg{mux=flv},mime="video/x-flv",dst=:5677/streamname.mp4}"
However, the current setup needs manual starting _and_ stopping of the VLC instance (which is not desired). Any insights on how to 'daemonize' the transcoding?
Currently I could think of the following:
- Make VLC trying to reconnect whenever the RTSP stream stops (this one is especially needed if the transcoding crashes). OR
- Create a daemon process that checks for the RTSP and starts VLC if the transcoded stream doesn't exist. OR
- ??? Am I just doing it wrong?
Regards,
Konrad