Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
least processor intensive video player
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
xcable
Guru
Guru


Joined: 15 Aug 2002
Posts: 424
Location: College Station, Texas

PostPosted: Tue Mar 18, 2003 2:54 pm    Post subject: least processor intensive video player Reply with quote

I'm putting gentoo on to K6-2 based SBC (single board computer) and a Geode 233 based SBC. I'm looking for a video (mpeg 1/2/4) player that has the least processor overhead. I'm tried mplayer (which is my mpalyer for my workstation) but its too slow for mpeg 4 (divx) palyback.

Any body have experince with embeded linux and/or good low processor video players?


xcable
Back to top
View user's profile Send private message
Mitchybums
n00b
n00b


Joined: 29 Jan 2003
Posts: 68
Location: iowa

PostPosted: Tue Mar 18, 2003 4:13 pm    Post subject: Reply with quote

I used xine on a pII 366 modile without problems playing divx.
this was on a redhat install (7.3) with 196 mb.
Gentoo on a 233mmx should run better.
Back to top
View user's profile Send private message
Raoul_Duke
l33t
l33t


Joined: 15 Dec 2002
Posts: 694
Location: Caerdydd, Wales

PostPosted: Tue Mar 18, 2003 4:50 pm    Post subject: Reply with quote

Yep, i run Xine on a 433mhz Celeron and i can run it perfectly smoothly, even whilst compiling stuff........well worth it :wink:
Back to top
View user's profile Send private message
pantherace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Mar 2003
Posts: 79

PostPosted: Tue Mar 18, 2003 5:00 pm    Post subject: I would have to reccomend mplayer Reply with quote

Frankly mplayer is the best. I got it running on Zaurus (and others have carried this on). Mplayer is much less memory hungry than any Xine variant (example: the opie media player on Z (based on xine), which cannot even run on a default Sharp ROM with 32MB of RAM)

Likely you are running into issues with fpu (mplayer's mp3,etc decoder seem to be optimized for intel.) I would suggest that you try using libmad for the mp3codec as it is integer based and very good, or try ffmp3 which is ffmpeg's mp3 decoder, but not as good as mad.

In addition to the Z (206Mhz StrongARM (no fpu)) I have used mplayer on a p-233 mmx laptop, on framebuffer, with no noticable framedrop (note at the time, I did not have an audio out, but it was decoding the audio) You will be unable to scale in software real-time.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Tue Mar 18, 2003 9:58 pm    Post subject: Reply with quote

I've seen divx videos that need an 800mhz cpu (p3/althon) just to watch them so you'll have problems with some videos no matter what on that system. dvd's generally need something in the 400mhz range to work although it varies on the dvd a little.

Also of importance is make sure you're using xv for video output and obviously make sure dma is enabled. Without xv the cpu requirements skyrocket.

Both xine and mplayer work fine for me. I doubt one is much faster then the other.
Back to top
View user's profile Send private message
Anubis
n00b
n00b


Joined: 09 Nov 2002
Posts: 68
Location: BYU

PostPosted: Tue Mar 18, 2003 11:25 pm    Post subject: Reply with quote

I would use mplayer with the -nocache option on the command line. This helps to speed things up as well. Hence:

Code:

mplayer -ao alsa9 -nocache <filename or -dvd #>


(btw, the -ao isn't necessary if you're not using alsa or you can use alsa5).

I believe that the gui based mplayer will of course use a bit more processor, and therefore either it or xine may work. But I haven't looked at the actual memory usage.
_________________
The one who says it cannot be done should never interrupt the one who is doing it.
Back to top
View user's profile Send private message
Ethereal
n00b
n00b


Joined: 19 Mar 2003
Posts: 38
Location: Russia, Moscow

PostPosted: Wed Mar 19, 2003 12:29 pm    Post subject: Reply with quote

mplayer is the best now http://mplayerhq.hu
try to get accelerated X drivers, use fast video output plugins(xv, dga, xvidix) decrease color depth, use libavcodec(ffmpeg/ffdivx) codec family, use fast audio output. For more read mplayer docs, there is a special section about it.
Back to top
View user's profile Send private message
pantherace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Mar 2003
Posts: 79

PostPosted: Wed Mar 19, 2003 2:39 pm    Post subject: Arpi (person who started mplayer) has a tutorial/howto/doc Reply with quote

A pretty good summary. (I wish people would read things like this, there are a whole bunch of questions asked about things like this on mplayer-users, just because people dont rtfm)

http://freshmeat.net/articles/view/747/

To the person with the 800MHz p3/athlon required to play: What resolution, video card, sound card, player, and bitrate.

I can scale up the bitrate to high heaven and have it play just fine with always less than 50% cpu usage on a p3-800. Likely something is messed up.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Thu Mar 20, 2003 1:01 am    Post subject: Reply with quote

Quote:
To the person with the 800MHz p3/athlon required to play: What resolution, video card, sound card, player, and bitrate.
I just did some testing using this file http://www12.tomshardware.com/images/thg_vid2_ocing_xp.zip which according to this page (http://www6.tomshardware.com/column/20011124/video2_ocingxp-02.html) requires something in the 900Mhz range to work. With winxp/mplayer8 on an XP2000 it peaked around 46% cpu and in Linux on two different systems XP2000/XP2100 total cpu utilization was under 5% (all very similar systems, all using 24/32bpp). I thought I was doing something wrong but runnning mplayer in benchmark mode it ran a lot faster and cpu utilization correctly showed near 100% used, every other test I did seemed to agree with my original results. I suppose mplayer may just be a lot faster then it was the last time I did some benchmarking with it which was probably a couple years ago. I did some more testing with xine, cpu utilization seemed about the same as mplayer, I'd need a slower system to really tell any difference. When I turned on postprocessing in mplayer and put it to 100% cpu utilization did make it up to 22%.

So the point to all this babble - I guess mplayer and xine are a lot faster these days then they used to be. You should be able to successfully play videos on Linux with quite a bit lower cpu specs then you would need in windows if you're using windows media player. And something that would need an 800mhz cpu to play a few years ago should work fine on something quite a bit slower today if you're using mplayer or xine.
Back to top
View user's profile Send private message
connyosis
n00b
n00b


Joined: 04 Oct 2002
Posts: 53

PostPosted: Fri Mar 21, 2003 9:32 am    Post subject: Reply with quote

xine has for some reason always been faster and more stable than mplayer for me. I used to play divx movies on my K6-2 350 MHz without any problems with xine.
_________________
If rubbin cold dirt in your crotch is wrong - I don't wanna be right!
Back to top
View user's profile Send private message
Beekster
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 268
Location: Sydney

PostPosted: Fri Mar 21, 2003 2:29 pm    Post subject: Reply with quote

How much work, if any, gets offloaded to more modern video cards?

Running movies (in mplayer), be they divx, xvid, or mpeg has my P4 1.7 averaging close to 0%. It does have periodic spikes every 5 seconds or so that usually hits 1%, with it hitting 2 or 3% occasionally. I assume that has more to do with fetching the data than decoding it.

This is with a Ti4600 GF4 video card. Is the video card doing a lot of the work? I probably have more processing power in the video card than the CPU, cerainly paid twice the price of the CPU for it...

I think you could play video on less than a 486DX4-100 if you could find a board for it with an AGP slot and stuck a modern video card in it... :wink:
Back to top
View user's profile Send private message
connyosis
n00b
n00b


Joined: 04 Oct 2002
Posts: 53

PostPosted: Fri Mar 21, 2003 5:39 pm    Post subject: Reply with quote

Well to some extent a fast video card will take on some load from the processor. I remember being able to watch divx movies without any "choppiness" when I switched from a Nvidia TNT card to a GeForce.
_________________
If rubbin cold dirt in your crotch is wrong - I don't wanna be right!
Back to top
View user's profile Send private message
gilesjuk
Guru
Guru


Joined: 11 Feb 2003
Posts: 412
Location: Staffordshire, UK

PostPosted: Fri Mar 21, 2003 11:16 pm    Post subject: Reply with quote

Malakin wrote:
I've seen divx videos that need an 800mhz cpu (p3/althon) just to watch them


Given that it's a more advanced compression than mpeg2 I would imagine more CPU grunt would be required.
_________________
^<^>^<^>^
G. Jones
-=-=-=-=-=-
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Sat Mar 22, 2003 1:57 am    Post subject: Reply with quote

Quote:
How much work, if any, gets offloaded to more modern video cards?
Run mplayer on a video with "-vo x11" and then "-vo xv", this will pretty much show you the difference between the cpu doing everything and the video card doing what it does in xv, huge difference.
Back to top
View user's profile Send private message
Beekster
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 268
Location: Sydney

PostPosted: Sat Mar 22, 2003 3:54 am    Post subject: Reply with quote

Malakin wrote:
Quote:
How much work, if any, gets offloaded to more modern video cards?
Run mplayer on a video with "-vo x11" and then "-vo xv", this will pretty much show you the difference between the cpu doing everything and the video card doing what it does in xv, huge difference.


My default is sdl, straight from the mplayer install. I have switched between x11, xv, and sdl and can see very little difference between the different drivers in terms of cpu usage. x11 doesn't scale to full screen when in full-screen mode though.

I was editing ~/.mplayer/config to set vo=x11, xv, and blank for sdl, and the output did change.

With x11:
Code:
beekster01 movies # mplayer Undercover.Brother.DVD.SCREENER.XviD-RSP.avi
*snip*
MPlayer 0.90rc5-3.2.2 (C) 2000-2003 Arpad Gereoffy (see DOCS)

CPU: Intel Pentium 4 Xeon Foster (Family: 8, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
*snip*
Playing Undercover.Brother.DVD.SCREENER.XviD-RSP.avi
Cache fill:  0.00% (0 bytes)    AVI file format detected.
VIDEO:  [XVID]  576x304  24bpp  23.98 fps  989.7 kbps (120.8 kbyte/s)
Clip info:
 Software: Nandub v1.0rc2
*snip*
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
*snip*
Starting playback...
VDec: vo config request - 576 x 304 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.89:1 - prescaling to correct movie aspect.
VO: [x11] 576x304 => 576x304 Planar YV12  [fs]
Using MMX2 for colorspace transform
SwScaler: using unscaled Planar YV12 -> BGR 32-bit special converter
A: 496.3 V: 496.2 A-V:  0.009 ct:  0.105  11899/11899   7%  4%  1.0% 0 0 49%
Exiting... (Quit)


With xv:
Code:
beekster01 movies # mplayer Undercover.Brother.DVD.SCREENER.XviD-RSP.avi
*snip*
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
*snip*
Starting playback...
VDec: vo config request - 576 x 304 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.89:1 - prescaling to correct movie aspect.
VO: [xv] 576x304 => 576x304 Planar YV12  [fs]
A: 662.0 V: 662.0 A-V: -0.000 ct:  0.110  15874/15874   5%  2%  0.9% 0 0 49%
Exiting... (Quit)


and with sdl:
Code:
beekster01 movies # mplayer Undercover.Brother.DVD.SCREENER.XviD-RSP.avi
*snip*
==========================================================================
SDL: Using driver: x11
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
*snip*
Starting playback...
VDec: vo config request - 576 x 304 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.89:1 - prescaling to correct movie aspect.
VO: [sdl] 576x304 => 576x304 Planar YV12  [fs]
SDL: Info - please use -vm or -zoom to switch to best resolution.
A: 403.9 V: 403.9 A-V:  0.005 ct:  0.108  9685/9685   6%  2%  1.0% 0 0 49%
Exiting... (Quit)


MMX2 is mentioned in the output when x11 is used, showing that the CPU is doing at least some of the work, and yet it is not noticable. The cpu still spends most of its time at 0%, with a few more jumps to a few % - the jumps are a little bit higher than before.

FYI, my CFLAGS are "-march=pentium4 -O3 -pipe -mmmx -msse -msse2 -fomit-frame-pointer".

Does anyone know what the percentages towards the end of the line
Code:
A: 403.9 V: 403.9 A-V:  0.005 ct:  0.108  9685/9685   6%  2%  1.0% 0 0

mean? They haven't varied much between drivers.
Back to top
View user's profile Send private message
pantherace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Mar 2003
Posts: 79

PostPosted: Mon Mar 24, 2003 1:33 am    Post subject: Numbers on that from a p3-800(dual) Reply with quote

Malakin wrote:
Quote:
To the person with the 800MHz p3/athlon required to play: What resolution, video card, sound card, player, and bitrate.
I just did some testing using this file http://www12.tomshardware.com/images/thg_vid2_ocing_xp.zip which according to this page (http://www6.tomshardware.com/column/20011124/video2_ocingxp-02.html) requires something in the 900Mhz range to work. With winxp/mplayer8 on an XP2000 it peaked around 46% cpu and in Linux on two different systems XP2000/XP2100 total cpu utilization was under 5% (all very similar systems, all using 24/32bpp). I thought I was doing something wrong but runnning mplayer in benchmark mode it ran a lot faster and cpu utilization correctly showed near 100% used, every other test I did seemed to agree with my original results. I suppose mplayer may just be a lot faster then it was the last time I did some benchmarking with it which was probably a couple years ago. I did some more testing with xine, cpu utilization seemed about the same as mplayer, I'd need a slower system to really tell any difference. When I turned on postprocessing in mplayer and put it to 100% cpu utilization did make it up to 22%.

So the point to all this babble - I guess mplayer and xine are a lot faster these days then they used to be. You should be able to successfully play videos on Linux with quite a bit lower cpu specs then you would need in windows if you're using windows media player. And something that would need an 800mhz cpu to play a few years ago should work fine on something quite a bit slower today if you're using mplayer or xine.

MPlayer is very fast. I downloaded the file linked above, and in one run (on a dual p3-800) got a your system is too slow, of course I had mythtv recording and eating up (99.9% according to top, so that cpu is pretty much out) I am in the middle of emerging something (using about 60% cpu (50%-80%) and mplayer is using about 20% (13-28% have been seen by me using top) and various other things increasing it to 100% on both cpus)

emerge done and mplayer uses approxamately the same amount of cpu, and as the poster before me, I don't see much difference between x11, xv and sdl. (I have a voodoo3, so the drivers are good, but on other systems I have noticed a large discrepency between them, mostly geforces. also to be noted, I use mplayer cvs)

To the poster asking about the numbers printed they can be supressed via -quiet (from mplayer's docs section 5.2):
A: 403.9 V: 403.9 A-V: 0.005 ct: 0.108 9685/9685 6% 2% 1.0% 0 0
"A: audio position in seconds
V: video position in seconds
A-V: audio-video difference in seconds (delay)
ct: total A-V sync correction done
frames played (counting from last seek)
frames decoded (counting from last seek)
video codec cpu usage in percent (for slices and DR this includes video_out)
video_out cpu usage
audio codec cpu usage in percent
frames needed to drop to maintain A-V sync
current level of image postprocessing (when using -autoq)
current cache size used (around 50% is normal)"
Back to top
View user's profile Send private message
Beekster
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 268
Location: Sydney

PostPosted: Mon Mar 24, 2003 2:23 am    Post subject: Reply with quote

Thanks for the info, pantherace. I knew there was package documentation under /usr/share/doc but had never spent much (read any) time browsing through it. I'm going to be busy for a while...
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Mon Mar 24, 2003 4:41 am    Post subject: Reply with quote

Quote:
My default is sdl, straight from the mplayer install. I have switched between x11, xv, and sdl and can see very little difference between the different drivers in terms of cpu usage. x11 doesn't scale to full screen when in full-screen mode though.

Here are my results with the video I linked to above. The difference I'm getting between xv and x11 is quite large.

xp2100/nforce 1/onboard video
x11 11%/21%, xv 8%/0%, sdl 8%/10%

xp2000/kt400/ti4200
x11 9%/12%, xv 7%/0%, sdl 7%/5%

Quote:
FYI, my CFLAGS are "-march=pentium4 -O3 -pipe -mmmx -msse -msse2 -fomit-frame-pointer".
This really shouldn't make much difference as mplayer generates it's own flags and does it's own cpu feature detection.

Quote:
MMX2 is mentioned in the output when x11 is used, showing that the CPU is doing at least some of the work, and yet it is not noticable. The cpu still spends most of its time at 0%, with a few more jumps to a few % - the jumps are a little bit higher than before.
Looking at your output Mplayer is reporting 11% total cpu utilization using x11 and 6% using xv, so xv is almost twice as fast. xv is 4X faster on one of my systems, suppose it depends on the video you're playing and your hardware.
Back to top
View user's profile Send private message
pantherace
Tux's lil' helper
Tux's lil' helper


Joined: 18 Mar 2003
Posts: 79

PostPosted: Mon Mar 24, 2003 9:46 pm    Post subject: Reply with quote

Beekster wrote:
Thanks for the info, pantherace. I knew there was package documentation under /usr/share/doc but had never spent much (read any) time browsing through it. I'm going to be busy for a while...


The latest documentation will be at http://mplayerhq.hu/DOCS/
I would also suggest reading the mplayer/mencoder man page, which lists every option it has (or should, and does have every stable option).
Back to top
View user's profile Send private message
trythil
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2002
Posts: 123
Location: RHIT, Terre Haute, IN, USA

PostPosted: Wed Mar 26, 2003 5:16 pm    Post subject: Reply with quote

SDL uses the XVideo extension for video output when it can, which is why you're not seeing much of a difference between Xv and SDL output modules.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum