Launch VLC as a background recorder and streamer
Posted: 09 Feb 2011 14:22
We are using VLC as a streamer+recorder of a videocamera input.
We run VLC on a Windows XP machine with an Osprey 100 acquisition board.
The VLC process is started from an Apache2 php page using the exec() call. Currently we are been successful in lounching VLC with the command:
start C:/Programmi/VideoLan/VLC/vlcs.exe dshow:// :dshow-vdev="Osprey-100 Video Device 1" :dshow-adev="Realtek HD Audio Input" --sout-x264-keyint=100 --sout-x264-min-keyint=50 :sout=#transcode{deinterlace,vcodec=h264,vb=0,scale=0,width=576,height=432, acodec=mp4a,ab=96,channels=1,samplerate=44100}:duplicate{dst=file{dst=d:/vieweb/sedute/1292247850_1292247850.mp4},
dst=http{dst=:8080/stream.flv}} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep
When we want to stop encoding/streaming, another php page with another exec() call launches the command:
taskkill /f /im vlc.exe
This works perfectly but lounches a visible VLC interface that we want to hide. We have tried to add to the vlc start command the options --qt-start-minimized or -I dummy but both of them requires a taskkill /f to stop vlc and this does not properly close the mp4 recording.
Any hint on how to start a background directshow recording and properly stop it?
Thano you for any help,
Enrico
We run VLC on a Windows XP machine with an Osprey 100 acquisition board.
The VLC process is started from an Apache2 php page using the exec() call. Currently we are been successful in lounching VLC with the command:
start C:/Programmi/VideoLan/VLC/vlcs.exe dshow:// :dshow-vdev="Osprey-100 Video Device 1" :dshow-adev="Realtek HD Audio Input" --sout-x264-keyint=100 --sout-x264-min-keyint=50 :sout=#transcode{deinterlace,vcodec=h264,vb=0,scale=0,width=576,height=432, acodec=mp4a,ab=96,channels=1,samplerate=44100}:duplicate{dst=file{dst=d:/vieweb/sedute/1292247850_1292247850.mp4},
dst=http{dst=:8080/stream.flv}} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep
When we want to stop encoding/streaming, another php page with another exec() call launches the command:
taskkill /f /im vlc.exe
This works perfectly but lounches a visible VLC interface that we want to hide. We have tried to add to the vlc start command the options --qt-start-minimized or -I dummy but both of them requires a taskkill /f to stop vlc and this does not properly close the mp4 recording.
Any hint on how to start a background directshow recording and properly stop it?
Thano you for any help,
Enrico