How can I open a file being continuously streamed to?

About encoding, codec settings, muxers and filter usage
yasdnil1
New Cone
New Cone
Posts: 9
Joined: 13 May 2011 22:55

How can I open a file being continuously streamed to?

Postby yasdnil1 » 13 May 2011 23:32

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

egrillo
New Cone
New Cone
Posts: 5
Joined: 09 Feb 2011 13:05

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

Postby egrillo » 23 May 2011 12:02

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15248
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 23 May 2011 13:24

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

egrillo
New Cone
New Cone
Posts: 5
Joined: 09 Feb 2011 13:05

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

Postby egrillo » 23 May 2011 15:17

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15248
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 23 May 2011 18:08

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: Google [Bot] and 1 guest