2

I'm new with streaming from VLC to a file, but I've been searching around the internet for what I'm trying to do and haven't found any relevant information. I'm currently developing a camera simulator which streams a video file in playback (since it's a simulation).

The camera itself streams in H264 VGA (640x480), on RTSP over UDP.

Basicly what I'm trying to do is save a stream (10 seconds) of the real camera though VLC so that this video file can be use afterwards by the simulator. In our simulator, all video files from H264 stream have the extensions H264 (example: Stream1.h264).

To ensure myself that my video file is correctly encoded, I use MediaInfo to see the file properties, but I can't seem to be able to get the wanted properties.

For example I tried with the encapsulation method MPEG-TS, and I got the following properties:

General 
ID : xxxxxxx 
Complete name : xxx 
Format : MPEG-TS 
Format/Info : This information doesn't appear, why?
File size : xx 
Duration : xx 

Format : AVC 
Format/Info : Advanced Video Codec 
Format profile : [email protected] 
Format settings, CABAC : Yes 
Format settings, ReFrames : 4 frames 

But the properties that I'm looking for are:

General 
Complete name : xxx 
Format : AVC 
Format/Info : Advanced Video Codec 
File size : xx  

Format : AVC 
Format/Info : Advanced Video Codec 
Format profile : [email protected] 
Format settings, CABAC : No 
Format settings, ReFrames : 1 frame 
2
  • The thing is, you don't want any encapsulation except for the raw bitstream (see ietf.org/rfc/rfc3984.txt) – do you have to use VLC to capture from the camera? What OS are you on?
    – slhck
    Jul 19, 2012 at 14:37
  • I don't have to use VLC (it just seemed simple to use). And I'm running on Windows 7 64Bit
    – PRacicot
    Jul 19, 2012 at 14:45

2 Answers 2

1

You can always extract the raw H.264 stream from an encapsulated file. I would suggest encapsulating to MP4, and then you can use MP4Box to do:

mp4box -raw 1 video.mp4

This will create the file video_track1.h264, which should match your specifications. I tried this on one file I had, and this was my result – I think that's the avc1 respresentation you're looking for:

General
Complete name                            : xxx
Format                                   : AVC
Format/Info                              : Advanced Video Codec
File size                                : ...

Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
1
  • Thx, this worked just fine. I had a gray tile, when extracting the raw h264 from the mp4 file, but after check the file, I saw that their was picture frames received before the actual SPS and IFrame, just had to do a little modification and it all worked fine.
    – PRacicot
    Jul 19, 2012 at 18:10
0

We can use openRTSP (A commandline program to record the RTSP media streams) program to store the RTSP streaming packet into the local folder. This program helps to download RAW streams from the source.

For Example, given sample command to retrive the streams from the camera and record in the localfolder ./openRTSP.exe rtsp://:554/h264/video.sdp?camera=1

note: Above command stores the streams in .264 file.

source: http://www.live555.com/openRTSP/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .