I have written a program which simply takes an input movie file (mpegts)
and creates a new file twice the size by duplicating its content.

It does this by opening a new output file (of identical encoding as the
input - mpegts h264), and then simply reading all the input file packets
and dumping them into the output file.  It then repeats this, dumping
the packets out with pts values adjusted such that they continue on from
the first block.  The output file is then closed normally using the
ffmpeg libav functions.

 

1) The resultant file, while clearly twice the size, seems to contain
the same 'duration' as the original file!  This prevents me accessing
the second half of the new file.  What do I need to do to ensure that
ffmpeg writes the new duration (twice as long) into the new file?

 

2) I notice that closing the avFormat seems to take an awful long while?
Is ffmpeg scanning the whole file in order to write the trailer or
something?

 

Any help here would be most welcome, thank you.

 

Gary

p.s. if anyone thinks they can help, I will happily send them the source
code (not very long at all).

 

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to