Page 1 of 1

How can I open a file being continuously streamed to?

Posted: 13 May 2011 23:32
by yasdnil1
I'm streaming from an axis camera (rtsp://172.25.238.150) in h264 format, to a file (axis.mp4). The file get's started, but when I try to view it, the input is dropped. Is it possible to view an 'endless' file, that's constantly being written to?
This is for traffic camera footage. The goal: video will be streamed to a file for a set duration (4days), continuously. Video will be deleted from the beginning and added to the end, to keep it a 4day duration. Clients will be able to view the live video and be able to rewind, fast forward (not into the future), pause, seek, stop, and record (review the video). Is this possible? How can this be done? I've gotten to where the file is created, but it can't be viewed. Is it because of the file type? Transcoding (what is transcoding?)? I'm looking into VLM, but I really don't understand how to use it. I don't know how to do command line/prompt stuff & it suggests http (instead of telnet when you can't do command stuff), but what are the step by step instructions? I tried created .vlm files & import them and hit play in the configurator (broadcast), but the file isn't created. I think VOD would be best, but again, I really need step by step instructions for the gui and a good explanation of how it works.
If this is possible, please tell me the settings (and how to get to them) and the step by step procedure. Thanks

Re: How can I open a file being continuously streamed to?

Posted: 23 May 2011 12:02
by egrillo
Hi all,

I have a similar problem and I'll like to find a reliable recoding file format accessible during recording.

I'm working on an application that must capure from a webcam, http stream the live video and record an h264+aac file for on demand viewing.

I'm starting vlc with the command string:

vlc dshow:// --sout-x264-keyint=100 --sout-x264-min-keyint=50
:sout=#transcode{fps=25,deinterlace,vcodec=h264,vb=0,scale=0,width=640,height=480,acodec=mp4a,ab=128,channels=1,samplerate=44100}:duplicate{dst=file{dst=\recorder\video.mp4},dst=http{dst=:8081/video.flv}} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


My problem is that until VLC is properly closed, the mp4 file is not readable (bad or missing moov and hint?).

I need to produce a reliable recording that I need to stream with an HTTP seekable streaming. We have chosen the mp4 file format because, coupled with the Codeshop h264 streaming (http://h264.code-shop.com/trac) it allows a seekable on-demand view.

What other mux can we use to obtain a safe and reliable recording? And how can we then implement a seekable streaming of the obtained file?

I have done some experiment changing the mp4 file format to ts (modifying my command with dst=file{dst=\recorder\video.ts}).
The ts file is definitelly more safe and reliable and using vlc I can watch the resulting recording even if the recoding VLC is killed without closing.
But unfortunately I can't convert the ts to an mp4 (vlc convert crashes and ffmpeg reports a bad input...) and I can't find any server software able to stream the ts in a seekable way.

Thanks for any solution or hint

Re: How can I open a file being continuously streamed to?

Posted: 23 May 2011 13:24
by Rémi Denis-Courmont
There is no way to have a progressive MP4 file, as far as I know. If you want progressively usable files, use MPEG-TS or MPEG-PS.

Re: How can I open a file being continuously streamed to?

Posted: 23 May 2011 15:17
by egrillo
Thank you Rémi for your quick answer.
We have done some experiment and we have found that the only way to record an usable file seems to be MPEG-TS.
The problem is that I need some tool to convert the rsulting TS into an MP4 but both VLC and ffmpeg fail to do it.
If you tell me how, I can send you or publish the my TS file so you can verify our conversion problems.
Regards,
Enrico

Re: How can I open a file being continuously streamed to?

Posted: 23 May 2011 18:08
by Rémi Denis-Courmont
Lets be clear here: MP4 is not a progressive file format. It is no accident that even Apple uses MPEG-TS for live streaming, while it is using MP4 for just about everything else.