[FFmpeg-devel] [PATCH] avformat/oggparseopus: fix segmented timestamps

James Almer jamrial at gmail.com
Sat Jan 4 22:06:56 CET 2014


On 04/01/14 5:19 PM, Mark Harris wrote:
> On Sat, Jan 4, 2014 at 11:59 AM, Michael Niedermayer <michaelni at gmx.at>wrote:
> 
>> On Tue, Dec 31, 2013 at 11:04:54AM -0800, Mark Harris wrote:
>>> Fix timestamp calculation for code 3 Ogg Opus packets with less than
>>> 2 bytes in the last segment (e.g. packet length 255 or 256).
>>> A sample that would seek incorrectly in ffplay can be created with:
>>>   ffmpeg -i in.wav -b:a 34k -vbr off -frame_duration 60 out.opus
>>
>> i dont seem to be able to reproduce the issue even though it seems
>> i did have a in.wav file in my local directory. Or maybe iam trying
>> the wrong things with the generated file
>>
>>
> The input audio doesn't matter as long as you can distinguish beginning,
> middle, and end (so don't use "sine" or a similar source).  It's the
> particular Opus packet sizes that cause the problem; encoding anything
> to 34kb/s CBR with 60ms frame duration will trigger the issue.
> Without the patch, "ffplay out.opus" and clicking in the middle of the
> window to seek to the middle will seek to the end instead, due to
> incorrect timestamps.
> 
>  - Mark

Do you know if this is reproducible only with Opus? The code you're changing 
is also used in most other parsers (Theora, Vorbis, VP8) for similar purposes, 
so it wouldn't be surprising if they all experience the same behavior.

Regards.


More information about the ffmpeg-devel mailing list