[Live-devel] Converting H.264-ES to MP4-File

Robin Lorke robin.lorke at cosens.de
Thu Jun 11 03:12:13 PDT 2009


Zitat von Ross Finlayson <finlayson at live555.com>:

>> I am trying to build a small program which converts a previously   
>> recorded H.264 elementary stream (which works fine) to a viewable   
>> MP4-file.
>> I tried it using the QuickTimeFileSink but it seems to need a   
>> MediaSession-object which seems to be highly dependend on an actual  
>>  RTP-Connection (which I dont have anymore at this moment).
>
> Yes - as you noted, the current "QuickTimeFileSink" code depends upon
> having a "MediaSession" object (that has one or more "MediaSubsession"
> objects, each representing an input RTP stream).
>
> You might be able to use some of the existing code in a new class
> (which you would write) that could do what you want.  But I suspect
> that your best choice may be to use some other application - e.g., VLC
> - to transcode your file.
At the moment I am using MP4Box (and also tried VLC) to convert the  
captured streams to MP4-files (according to Etienne's hint, thx for  
that :)), but only about 1 out of 10 streams captured with openRTSP  
convert fine. Since MP4Box and VLC have the same problem while  
converting I think it is a problem with openRTSP somehow dumping  
corrupted stream data to disk.

I dumped the streams from a network camera using the following command-line:
openRTSP -v -w 640 -h 360 -f 25 -B 2000000 -b 2000000 -u admin mypwd  
rtsp://192.168.0.75/h264 > myrawvideo.h264

So something has to be different in the stream dump that works in  
comparsion to the others. One thing I noticed is:
All captured files do begin with the start marker "0x00 0x00 0x00  
0x01", but the next following byte is 0x47 when it is a  
non-convertable file and is 0x67 when it is a convertable file. I  
tried capturing streams with VLC instead of openRTSP and they all  
convert fine and they all have 0x67 after the start marker so I really  
think it is somehow related to that.

Did I miss an important command-line-option or is it a bug with  
openRTSP or maybe some other problem?
I could of course upload the working and the non-working file capture  
for comparison if needed.

Big thanks for help!
Robin



More information about the live-devel mailing list