[FFmpeg-devel] mutlithreading in ffmpeg?

Thomas Worth dev at rarevision.com
Thu Mar 31 20:23:08 CEST 2011


On Thu, Mar 31, 2011 at 5:51 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Mar 30, 2011 at 03:15:48PM -0700, Thomas Worth wrote:
>> >> Notice that on frame 2 (timestamp 1001), the return value from the
>> >> decode function is 319, which is different from the next P frame,
>> >> which is 318. Now of course we get 318 twice at PTS 2002 because
>> >> ffmpeg-mt is returning the same frame twice, even though two different
>> >> timestamps are specified.
>> >
>> > I'm afraid you have a talent for writing explanations that confuse
>> > me more than they help :-)
>> > I'd say what happens is just that ffmpeg(-mt) in that case decides
>> > to completely drop the frame instead of "making something up" via
>> > error concealment. That is probably a bug in so far as it's not supposed
>> > to do that, but if your code fails with this it is too brittle.
>>
>> Sorry about that, you'll probably need to step through the code to see
>> exactly what I'm talking about. Oh and by the way, you'll need to use
>> an MP4 file encoded with H.264 if you decide to have a go. You can
>> download a sample here, which has each frame numbered so you can see
>> where threaded seek/decoding skips each frame after the keyframe:
>>
>> http://rarevision.com/ffmpeg-mt/
>>
>> There's a link to download the video:
>
> Now, how does one reproduce this? Theres just a code snippet not a
> compile able program

I forwarded you a complete program/makefile in a previous message. Let
me know if you need me to send it again. Also, I can send you the
configure script I used if you want that too.


More information about the ffmpeg-devel mailing list