[Ffmpeg-devel] Patch to add header info to flv format

Philipp Klaus ffmpegdevel
Thu Jul 13 19:01:51 CEST 2006


Michael Niedermayer wrote:
is->streams[k];
>> @@ -1533,6 +1535,7 @@
>>      nb_ostreams = 0;
>>      for(i=0;i<nb_output_files;i++) {
>>          os = output_files[i];
>> +		os->duration = total_duration;
> 
> this is not acceptable, if a container has a field for the duration it must
> contain the correct duration, not the one from the input blindly copied, which
> would be wrong if -ss or -t is used and even without will be wrong for many
> files
> this should be calculated from the pts of the AVPackets in the muxer or
> libavformat/utils.c

You're right. This was my first try. I will calculate in the -ss and -t 
values (if I find them in the source :-) but calculating from the muxer 
is not possible in my opinion. I have to write the header before I do 
the transcoding. It would be possible to seek at the end and fill in the 
stuff but only if the output is not a pipe. In my usage it is a pipe and 
because of that I have no use for a header if I can generate it only 
after the whole transcoding.

Philipp





More information about the ffmpeg-devel mailing list