[FFmpeg-devel] FFmpeg 0.7.5 is very much slower than FFmpeg 0.7 for decoding

Unga unga888 at yahoo.com
Sun Oct 2 17:38:40 CEST 2011


--- On Sun, 10/2/11, Michael Niedermayer <michaelni at gmx.at> wrote:

> From: Michael Niedermayer <michaelni at gmx.at>
> Subject: Re: [FFmpeg-devel] FFmpeg 0.7.5 is very much slower than FFmpeg 0.7 for decoding
> To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
> Date: Sunday, October 2, 2011, 2:50 PM
> On Sat, Oct 01, 2011 at 09:22:27PM
> -0700, Unga wrote:
> > Hi all
> > 
> > The FFmpeg 0.7.5 is very much slower than FFmpeg 0.7
> for decoding. 
> > 
> > I'm playing 720p and 1080p vp8 and h.264 videos.
> > 
> > With FFmpeg 0.7, 720p averages CPU usage to 20%. With
> FFmpeg 0.7.5, it shoot up to 100%!
> > 
> > With FFmpeg 0.7, 1080p averages CPU usage to 70%. With
> FFmpeg 0.7.5, it shoot up to 105%!
> > 
> > Any ideas? I can try and let know if there are
> improvements.
> 
> we need a reproduceable bug report
> 1. what are you doing, what tool, what commandline what
> output, ..
> 2. how do you meassure the difference
> 

Hi Michael

Thank you very for your interest in this.

This is a video player I developed in C/SDL/ffmpeg on FreeBSD 8.

FFmpeg C api are used, no command line usage.

I use very little ffmpeg: av_register_all, avcodec_decode_audio2, avcodec_decode_video2, av_malloc, av_free, av_free_packet, sws_getContext, sws_scale, url_set_interrupt_cb.

That's all I think.

I used top command to see the application load. The result is as follows:

ffmpeg version 0.7.5
====================
last pid:  1816;  load averages:  0.44,  0.18,  0.06               
98 processes:  2 running, 96 sleeping
CPU: 23.7% user,  0.0% nice,  1.5% system,  0.5% interrupt, 74.4% idle
Mem: 318M Active, 167M Inact, 149M Wired, 66M Cache, 112M Buf, 2281M Free
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
 1816 unga        6  44    0   144M   100M oss     2   0:30 84.23% myPlayer


ffmpeg version 0.7-rc1
======================
last pid:  2193;  load averages:  0.10,  0.15,  0.11               
103 processes: 2 running, 101 sleeping
CPU:  9.1% user,  0.0% nice,  2.3% system,  1.0% interrupt, 87.5% idle
Mem: 327M Active, 372M Inact, 173M Wired, 44M Cache, 112M Buf, 2064M Free
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
 2193 unga        6  44    0   139M 95632K oss     3   0:07 24.76% myPlayer


Above result is for the same video in 720p (vp8).

With ffmpeg version 0.7-rc1, myPlayer runs at 24.76%. ffmpeg version 0.7.5, myPlayer runs at 84.23%. My earlier statement of 100% is when play full screen.

This is playing at original size without any scale.

I used the gettimeofday() to measure the decode time in milliseconds. It shows mixed results as sometimes 0.7.5 decoding times shows better results.

I'm a very heavy user of av_malloc and av_free. I doubt 0.7.5 requires more processing power now to process av_malloc and av_free?

I cannot permanently switch to 0.7 as it develops lot of colour artifacts when resize and it is mostly corrected in 0.7.5.

My issue now is, when I play full HD (1080p), the picture is now quite lagged behind than voice.

I'll try to get correct timing for decoding.

Regards
Unga




More information about the ffmpeg-devel mailing list