[Libav-user] is possible to hack av_write_trailer to write moov atom at the beginning?

Wenbin Ma wenbin.ma at leediancn.com
Thu Jul 11 09:20:16 CEST 2013


Hi,

I want to use ffmpeg library to encode a h264 mp4 for http progressive 
streaming. However ffmpeg added the moov atom at the end when calling 
api: av_write_trailer. My basic idea is override the API: 
av_write_trailer to write moove atom at the beginning. For example, I 
have a 5 second video, the frame rate is 25, I have these basic 
information of the encoded video here before I really add each frame to 
an AVStream.  so is it possible write these information at the 
beginning? Can you give me some clue about how to write this function?

BTW, even I build ffmpeg with --enable-debug=3,  I still cannot debug 
into ffmpeg code in Qt Creator, how do you debug ffmpeg code?

Thanks,
Wenbin



More information about the Libav-user mailing list