3.3.2 avcodec_decode_video2 is much slower

Questions involving a Windows version of FFmpeg.
Post Reply
jichuan123
Posts: 2
Joined: Fri Jun 30, 2017 11:26 am

3.3.2 avcodec_decode_video2 is much slower

Post by jichuan123 » Fri Jun 30, 2017 11:55 am

I found that the API function avcodec_decode_video2 in ffmpeg 3.3.2 for windows runs much slower than that of 2.1.1.
A HD MPEG2 i-frame file, with 2.1.1, 100 frames decoding uses 530ms, with 3.3.2, it's 1569ms. The same thing happens for other files too, the higher the bitrate the slower it is. One extreme example is with a BGRA .mov file (7144x1080 25fps), with 2.1.1, since it does not really need decoding, 100 frames costs only 160ms, but with 3.3.2, it is around 39000ms!
Also tried the avcodec_send_packet and avcodec_receive_frame functions, the result is the same.
The C++ code has been running with 2.1.1 through many video files on windows 7 64bit platforms without such a problem.
Just wondering if there is some new settings need to be set in the code? or is it a known issue? or is there anyone else also see this problem?
Thanks for any help!

richardpl
Posts: 21
Joined: Sat Aug 01, 2015 6:35 pm

Re: 3.3.2 avcodec_decode_video2 is much slower

Post by richardpl » Fri Jun 30, 2017 6:38 pm

Which build(s) you use? Your own or?

jichuan123
Posts: 2
Joined: Fri Jun 30, 2017 11:26 am

Re: 3.3.2 avcodec_decode_video2 is much slower

Post by jichuan123 » Sat Jul 01, 2017 1:46 am

Both 3.3.2 and 2.1.1 builds are the package builds for windows downloaded from ffmpeg.org website (zeranoe) - ffmpeg-2.1.1/3.3.2-win64-dev/shared.
And I noticed that there is a thread on similar issue in [Libav-user] 'FFmpeg version 3.1's avcodec_decode_video2 is slower than 3.0.5.' (http://ffmpeg.org/pipermail/libav-user/ ... hread.html); but don't see any conclusion there.

meeks
Posts: 1
Joined: Tue Sep 19, 2017 7:47 am

Re: 3.3.2 avcodec_decode_video2 is much slower

Post by meeks » Tue Sep 19, 2017 7:54 am

has anyone else seen this, I'm trying to decode 4k video, and it works fine until I move up to the later versions of ffmpeg - where it just grinds to a halt. The frame rates drops for a solid 24, to about 12. Is there something different I should be doing. I know that avcodec_decode_video2 is deprecated, but crippling it to force users to stop using it is a little strong.

nortonvilliers
Posts: 5
Joined: Sun Nov 18, 2012 11:35 pm

Re: 3.3.2 avcodec_decode_video2 is much slower

Post by nortonvilliers » Thu Oct 26, 2017 3:29 pm

We recently updated ffmpeg from 2.8.6 to 3.3.4 and see the same issue.
mpeg2video, dv, qtrle all play 3-4x slower compared to 2.8.6
We replaced avcodec_decode_video2 with avcodec_send_packet/avcodec_receive_frame with no effect
Updated to 3.4 and see some improvement - now only 2-2.5x slower ;)
Re-compiled from scratch from ffmpeg git source and still see issue.
So not convinced this is avcodec_decode_video2 crippled (why would it be?).
Regressed to 3.2 and still see issue.
Will probably try to go back through to 2.8.6 and see if I can isolate
the culprit. At the moment can't use latest ffmpeg :(

User avatar
Zeranoe
Site Admin
Posts: 645
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: 3.3.2 avcodec_decode_video2 is much slower

Post by Zeranoe » Fri Oct 27, 2017 6:22 am

Please open a bug report with FFmpeg here: http://trac.ffmpeg.org/

Post Reply