Hi,
We are developing a ip video recording solution based on the vlc player. Right now I'm faced with a task of writing a python script that does:
1) Establish connection to a network stream.
2) Write a series of short temporary files (10 to 30 seconds long) with no gaps from one another without disconnecting from stream source ( reconnection cause delays and artifacts). I plan on using use a tmpfs for that.
3) Glue all the files together and dump them on a main hard drive.
4) Disconnects from the network stream.
All those difficulties are needed because we can't read the video file before it's complitely written and closed (moov atom written at the begining)
Right now, my algorithm looks like this:
1) Open a vlc subprocess with --run-time 600 --sout "#http{dst=127.0.0.1:XXXX,mux=ts}
2) Sleep(2) for stream to settle down
3) Open another vlc supbrocess with http://127.0.0.1:XXXX --run-time=10 --sout #std{access=file,dst=fileN.mp4} Repeat 60 times. Store the names of the file in temporary list
4) Open all the the files with vlc with --sout-keep --sout "#{access=file,dst=result.mp4}
Overall this could work... But I think, there can be a more elegant and easier solution. Something like vlc's rc but with the ability to set sout's.
Can you point me to the right direction?