How to create an Mp4 file from H264 raw data that I am receiving from a live streamer (no predefined duration or moov atom), unfortunately can't use FFMPEG, I have to write my own code using live555. Can somebody help me with Mp4 container and how h264 data has to be pushed into it.? Thank you in advance : )
Asked
Active
Viewed 1,143 times
1 Answers
0
There are several operations to be made to store H.264 raw data into MP4, among them:
- create box structures, in particular the
moov
box - store the NAL units in a
mdat
box, possibly storing non-VCL NAL units in themoov
box - replace start codes with length fields
It also depends on your requirements. If you want to do the conversion on-the-fly, you have to use fragmented mp4. If you can store the H264 and then do the conversion, you may use non-fragmented mp4. In particular using MP4Box
:
MP4Box -add file.264 file.mp4

cconcolato
- 1,186
- 10
- 9