[Libav-user] Simple packet-by-packet copy does not work for h264+mp4
kalileo at universalx.net
Fri Mar 2 13:30:41 CET 2012
On Mar 2, 2012, at 17:54 , ALESSANDRO PAGANELLI wrote:
> Hi Kalileo,
> please consider that file as a "test" I used to understand how to properly rebuild a mp4 + h264 file, so there are several aspects that have to be fixed.
> One is surely the use of two packets, instead of using just the first one.
> I followed that (non optimized) approach because I was trying to figure out what parameters were actually needed in order to setup a "new" packet.
> I suppose that the method you propose should work as well.
Well, I asked because I'm not sure that it works, at least not sure that it always works. I remember some scenarios where this copying did clean out other data in AVFrame which came from reading it, and which disturbed the writing of the uncopied frame. I assumed you might have seen something like that too, and that's why you would use the copy.
More information about the Libav-user