Encoding settings for constant decoding complexity

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Encoding settings for constant decoding complexity

d233st
Context : I'm converting an old pentium 2 laptop into a video player. Software
player is MPlayer using Xv module out.
I'm formating any video I want to stream to the pc because it isn't powerful
enough to decode realtime most today's video at full resolution without frame
drops.


My search is : what encoding parameters should I use to optimize CPU use of
this old pentium 2 ?


As of now, I found that resolution, framerate are biggest factors on CPU use :  
Best results I had (ie under 3% of dropped frames) were :
FMP4 video codec at 420x380 x 18 fps either with either b=1500k or qscale=1
FMP4 video codec at 400x300 x 24 fps either with either b=1500k or qscale=1

I'm using following command line :
ffmpeg  -ss 360 -t 60 -i %infile%   -mbd 2 -b 1500k -s 420x380 -r 18 %outfile%

But another factor is the 'complexity' of the input scenes that varies during
the movie (fast motion, ...).
Codec is able to lower quality of encoding to match desired bitrate when
complexity of input video increases (like action scenes), but can it do the
same to match a constant decoding CPU power ?
What parameters should I tweak to avoid CPU use peaks in action scenes ?




_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Encoding settings for constant decoding complexity

Rich Felker
On Thu, Dec 20, 2007 at 04:18:37PM +0000, d233st wrote:
> Context : I'm converting an old pentium 2 laptop into a video player. Software
> player is MPlayer using Xv module out.
> I'm formating any video I want to stream to the pc because it isn't powerful
> enough to decode realtime most today's video at full resolution without frame
> drops.
>
>
> My search is : what encoding parameters should I use to optimize CPU use of
> this old pentium 2 ?

What clock rate? A 366 MHz P2 celeron is plenty fast to decode full
DVD resolution movies that are properly encoded. You probably have
some major hardware configuration problems if this isn't working. Or,
are you using a bad audio codec like AAC that wastes huge amounts of
cpu time?

> As of now, I found that resolution, framerate are biggest factors on CPU use :  
> Best results I had (ie under 3% of dropped frames) were :
> FMP4 video codec at 420x380 x 18 fps either with either b=1500k or qscale=1

NEVER decrease the framerate. NEVER.

> FMP4 video codec at 400x300 x 24 fps either with either b=1500k or qscale=1

And don't use constant qscale=1 if you want acceptable decoding
performance! It may result in bitrates up to 20000 kbit/sec in the
highest complexity scenes. Always use 2pass with a bitrate setting.

> I'm using following command line :
> ffmpeg  -ss 360 -t 60 -i %infile%   -mbd 2 -b 1500k -s 420x380 -r 18 %outfile%

This looks incomplete and also looks like a Windows commandline....
Perhaps your problem lies there...

> But another factor is the 'complexity' of the input scenes that varies during
> the movie (fast motion, ...).
> Codec is able to lower quality of encoding to match desired bitrate when
> complexity of input video increases (like action scenes), but can it do the
> same to match a constant decoding CPU power ?

Decoding cpu requirement and bitrate are roughly the same. If bitrate
is constant, the cpu load should be roughly constant too. This is not
precise but it's a good heuristic.

Rich
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user