Smart, Gary wrote: > > 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. > You also should adjust DTS. Do you use av_write_frame or av_interleaved_write_frame? I'd use the first one, with correct adjusting DTS and PTS.
Smart, Gary wrote: > > 1) The resultant file, while clearly twice the size, seems to contain > the same 'duration' as the original file! > How did you check this? Smart, Gary wrote: > > What do I need to do to ensure that > ffmpeg writes the new duration (twice as long) into the new file? > In case of MPEGTS the duration is not stored in the file. This is a 'headless' format, it is designed to make it possible for the client to connect to it from any point. FFmpeg calculates the duration. It looks at the timestamps in the beginning and in the end, and subtracts one from another. Smart, Gary wrote: > > 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? > This is the first sign that something is wrong. In your case, most probably, this means that libav* has stored a lot of packets in memory and now interpolates their timestamps and writes to disk. Smart, Gary wrote: > > p.s. if anyone thinks they can help, I will happily send them the source > code (not very long at all). > You could post it here. -- View this message in context: http://www.nabble.com/Concatenating-movie-files---duration-not-updated-tp25488632p25488978.html Sent from the libav-users mailing list archive at Nabble.com. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
