[FFmpeg-devel] Corrupt duration in packet while encoding to WMA

Ronen Mizrahi ronen
Tue Dec 4 00:18:07 CET 2007


Michael Niedermayer wrote:
> On Mon, Dec 03, 2007 at 01:56:56AM -0500, Ronen Mizrahi wrote:
>   
>> Hello,
>>
>> While using ffmpeg to encode to WMA we noticed that when the call below
>> is made in asf-enc.c, packet_timestamp_end is smaller than
>> packet_timestamp_start and hence a negative duration is written to the
>> packet. While Windows Media Player did not seem to care about it,
>> Windows Media Player CE (the one used in Pocket PC and Windows Mobile)
>> exhibited an odd behavior (such as skipping several seconds slightly
>> after starting playback). Changing the order between the start and the
>> end below, seems to fix the problem, however I am not certain it is the
>> correct thing to do, and would very much appreciate some feedback from
>> the maintainer of asf-enc.c
>>
>> This is the call where we believe there is a bug:
>> put_payload_parsing_info(
>>                             s,
>>                             asf->packet_timestamp_start,
>>                             asf->packet_timestamp_end -
>> asf->packet_timestamp_start,
>>                             asf->packet_nb_payloads,
>>                             asf->packet_size_left
>>                         );
>>     
>
> thanks for the info
> i think ive fixed it in svn, please check!
>
> [...]
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Thank you I did check it and it seems to do the trick. There are still
cases where the end is equal to the start but I suspect these are valid
cases.
Playback of WMA encoded via ffmpeg over HTTP with Windows Media Player
CE 1.0 is much better although still not perfect.

Thank you for fixing it.

Ronen





More information about the ffmpeg-devel mailing list