[mythtv-users] Question about encoding/decoding

Jeff Monks mythtv at skunkeye.com
Thu Nov 27 16:03:53 EST 2003


On Thu, 27 Nov 2003, Douglas Phillipson wrote:

> When switching the encoding to MPEG4 my CPU goes to 90% during capture. 
>   But when playing the CPU is 2%.  I hav an AMD 2200+ CPU.  Is there 
> really that much difference in CPU effort between encode and decode?  Or 
> am I doing something wrong?  Is the encoder perhaps not taking advantage 
> of the hardware encoding features of my AMD?

There really aren't any "hardware encoding" features of your CPU.  By 
definition, if your card (BTTV, I presume) is using your CPU to do the 
encoding, then that's "software" encoding.  Hardware encoding generally 
refers to cards like the PVR-250 cards, which have an actual MPEG encoder 
chip on the card, which is specially designed for the task of video 
compression, and output a compressed MPEG stream to the PC.  All the CPU 
then has to do is copy that stream to a file on your disk.

Your numbers aren't unrealistic.  MPEG-4 encoding is extremely CPU 
intensive.  That's the tradeoff to get smaller files (as compared to 
RTJPEG, for example), you use more CPU.  No free lunch, and all that.  

Decoding is pretty much a trivial task for modern CPUs, as compared to 
encoding.  Encoding requires analysis and compression, where decoding is 
just pulling data from a file and minimally processing it for display.  
Also, some video cards can handle some of that processing, so the CPU 
doesn't have to work as hard.



More information about the mythtv-users mailing list