Author Topic: Mplayer Speed Question  (Read 5874 times)

hjwind

  • Newbie
  • *
  • Posts: 4
    • View Profile
Mplayer Speed Question
« on: January 23, 2005, 02:19:43 am »
I've been throwing some different size videos at mplayer (from the oz feed) on my 5500, and it seems to play everything slow unless it's exactly 320x240.  It is scaling or doing something weird, that slows it down so much?  I would not mind loosing some of the extra pixels if it would run well.  I've tried a bunch of mplayer options/filters (scale, crop, etc.) and can't get the videos playing well.

Any thoughts?  Am I misinterpreting what i'm seeing, or is there a way to speed up video slightly larger than the screen res?

thanks

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Mplayer Speed Question
« Reply #1 on: January 23, 2005, 02:54:36 am »
scaling is just too much work for the processor. Your best bet would be to re-encode the stuff to 320x240.

I have had some luck with borderless 320xXXX widescreen video,but even there I think most people prefer to encode with black borders to get an exact 32x240.  Are you using a full mplayer, or mplayer embedded (not ssure what the diff is)? using mplayer from the prompt with a plain output to framebuffer is your best bet.

the xmms front end and scaling and rotating on the fly are really nice, but seem to invite less efficient use.
there is alot of stuff around here on mplayer and mplayer config files.  search around and poke at it till it works
adf
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Mplayer Speed Question
« Reply #2 on: January 23, 2005, 02:55:34 am »
Quote
scaling is just too much work for the processor. Your best bet would be to re-encode the stuff to 320x240.

I have had some luck with borderless 320xXXX widescreen video,but even there I think most people prefer to encode with black borders to get an exact 32x240.  Are you using a full mplayer, or mplayer-embedded-for-xmms-embedded (not ssure what the diff is)? using mplayer from the prompt with a plain output to framebuffer is your best bet.

the xmms front end and scaling and rotating on the fly are really nice, but seem to invite less efficient use.
there is alot of stuff around here on mplayer and mplayer config files.  search around and poke at it till it works
adf
[div align=\"right\"][a href=\"index.php?act=findpost&pid=63634\"][{POST_SNAPBACK}][/a][/div]
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

hjwind

  • Newbie
  • *
  • Posts: 4
    • View Profile
Mplayer Speed Question
« Reply #3 on: January 24, 2005, 10:45:33 am »
thanks for your thoughts.

i was just messing with it some more. and discovered that if i turn off the audio (-nosound) the movies i was testing play well.  i was looking for a video problem, heh.  they appear to be mpeg2. sorta weird. i would not expect mplayer to have trouble with the audio.

kahm

  • Hero Member
  • *****
  • Posts: 657
    • View Profile
Mplayer Speed Question
« Reply #4 on: January 24, 2005, 11:53:43 pm »
Quote
thanks for your thoughts.

i was just messing with it some more. and discovered that if i turn off the audio (-nosound) the movies i was testing play well.  i was looking for a video problem, heh.  they appear to be mpeg2. sorta weird. i would not expect mplayer to have trouble with the audio.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=63734\"][{POST_SNAPBACK}][/a][/div]

In my encoding experience making sure the audio is encoded at 48khz vastly improves performance. I think the internal chip on the Z runs at that encoding rate, and anything else has to be internally re-sampled.

I encoded the same video with 48khz 192 kb/s sound and it played perfectly. The same video with a 22khz audio stream stuttered like mad.

Right now I do my encoding at 320x240, 600kbps DIVX5 video at 24fps and 128kb/s 48khz MP3 audio. I haven't extensively profiled all the options, so I haven't hit optimal settings yet, though.
Fujitsu U8240 "Stormtrooper" -  Zaurus Supplement
Libretto U100 | Sony Librie, Sony Reader
SL-C3100: Sharp 1.11JP (Kanji Dictionary/Translator) - LCD Top swap with C1000.
SL-C3000: pdaXii13 5.4.7, SL-C3000 5.4.9 - microdrive replaced with 8gb Sandisk
SL-C1000: PDAXRom Beta3 | SL-6000L: Sharp 1.12 | SL-5500: Cacko, 64-0 kernel | SL-5000D: OZ-Opie
Linksys WCF12; Sharp CE-AG06, CE-RH2, CE-170TS; iRiver USB OTG Host cable; Socket BT rev.E CF; Hitachi 6gb Microdrive

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Mplayer Speed Question
« Reply #5 on: January 25, 2005, 12:46:48 pm »
some stuff that seems to help--
encode at 24kbs audio  (from dvd)--1/2 48k  works nicely.

set your audio output -ao to something that uses integer rather than floating point--the floating point is what kill you on audio decoding.
on mplayer.config some people have had success popping in ac=mad
or you could try -ao or (ac= in the config) oss

I do that and have ffmpeg integer decoding. it is decent at least.

There has been much success using ogg audio as well. cmisip has a nice script for re-encoding vidio top zaurus sized video w/ ogg audio. You might occasionally have to tweak it, but it wil help you along a great deal, I think.

good luck
-adf
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

h4rdc0d3

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.hardcodelabs.org/
Mplayer Speed Question
« Reply #6 on: January 26, 2005, 07:58:09 pm »
 

I wish it wasn't so because command-line video-editing and encoding rocks... but I haven't had much success using mencoder, ogmmerge and the like... all my ogm movies do not advance correctly in mplayer and oftentimes trying to advance will stall/crash my Z, so I'm stuck using gui-based tools on windows...

 

I have had much success using video files (MPEG-1's) created using the smart ripper, dvd2avi, and tmpgenc tools.

Now, I have a significantly-sized library of converted dvd's and tv shows, down-encoded for exclusive use by my zaurus. I have found it particularly useful for traveling (without a laptop) to burn a bunch to a dvd-r and carry that along with a card reader and borrow somebody's computer or laptop to swap movies or shows for the flight home.

 

Essentially, I take any video file (or seperate AVI and WAV files, as produced by dvd2avi) and run it through tmpgenc with settings:

Resolution: 320x240
Frames per Second: 24 fps
Constant Bit Rate (CBR) (for video): 200 kbps
Layer-2 Audio
Audio Sample Rate: 44100 Hz
Audio Bit Rate: 96 kbps

At least for me, these settings are producing entire movies from dvd with total space used around 200-300 MB... good enough for around 1 movie per 256 MB card and 1-2 movies per 512 card, or about 90 MB per hour of tv (minus the commercials, which leaves about 40-45 minutes). And the quality, of course, isn't perfect, but I would call it very acceptable and not detracting (as was the case with the ogm's IMO).

Also, I would highly suggest running mplayer outside of qtopia!!! I don't know how you'd do that on a 5500, but on a 5600... you would reboot, then wait for when it counts down from 5, hit /, and then a, and then you'll be have a shell outside qtopia and nearly all cpu cycles can be devoted to mplayer. Remember to use -vo fbdev option for mplayer, instead of -vo sdl as you would inside qtopia.

Also, I have noticed that the -playlist option in mplayer is broke... anyone else confirm that? No biggy, I just wrote a script called mplaylist.pl that reads a .m3u playlist, runs mplayer, transfers command line options to mplayer and suppresses mplayer output between playlist items (the cursor just blinks a little bit).

mplaylist.pl:
Note: Another fix: more error correction. This one is current as of Sat Jan 29 14:44 UTC.
 [ Invalid Attachment ]
« Last Edit: January 29, 2005, 09:44:43 am by h4rdc0d3 »
h4rdc0d3
$model = 'SL-5600';
$proc = 'intel xscale pxa-255';
$rom = 'thekompany.rom';
@card = ('sandisk cf 128mb', 'sandisk sd 128mb', 'lexar sd 256mb', 'sandisk sd 512mb', 'dane-elec cf 512mb' x 2);
@other = ('zthincable rs-232 m-db9-4', 'garmin etrex', 'garmin data cable');
@bad = ('sandisk cf 1gb', 'sandisk ultraII sd 1gb', 'sandisk sd 1gb');

h4rdc0d3

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.hardcodelabs.org/
Mplayer Speed Question
« Reply #7 on: January 26, 2005, 08:34:54 pm »
It just took me some trial and error to arrive at the settings in my post above... but if you're trying to mimick my procedure with tmpgenc, having this file will help...

Here's the .mcf file (MPEG setting template) for tmpgenc (just remove the .txt extension):
 [ Invalid Attachment ]
h4rdc0d3
$model = 'SL-5600';
$proc = 'intel xscale pxa-255';
$rom = 'thekompany.rom';
@card = ('sandisk cf 128mb', 'sandisk sd 128mb', 'lexar sd 256mb', 'sandisk sd 512mb', 'dane-elec cf 512mb' x 2);
@other = ('zthincable rs-232 m-db9-4', 'garmin etrex', 'garmin data cable');
@bad = ('sandisk cf 1gb', 'sandisk ultraII sd 1gb', 'sandisk sd 1gb');

h4rdc0d3

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.hardcodelabs.org/
Mplayer Speed Question
« Reply #8 on: January 26, 2005, 08:40:58 pm »
For your viewing pleasure, here's a 30 second clip from CSI: NY's Tri-Borough episode produced via the above process:

 [ Invalid Attachment ]

P.S. That's 30 seconds... squeezed into 1,177,604 bytes!!!
h4rdc0d3
$model = 'SL-5600';
$proc = 'intel xscale pxa-255';
$rom = 'thekompany.rom';
@card = ('sandisk cf 128mb', 'sandisk sd 128mb', 'lexar sd 256mb', 'sandisk sd 512mb', 'dane-elec cf 512mb' x 2);
@other = ('zthincable rs-232 m-db9-4', 'garmin etrex', 'garmin data cable');
@bad = ('sandisk cf 1gb', 'sandisk ultraII sd 1gb', 'sandisk sd 1gb');

h4rdc0d3

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.hardcodelabs.org/
Mplayer Speed Question
« Reply #9 on: January 27, 2005, 09:01:26 am »
And for a notion of the performance I'm getting playing these on the zaurus, here's a clip of my 5600 playing the intro to Battlestar Galactica.

SORRY! Had to kill it... too much filespace.
« Last Edit: February 02, 2005, 07:28:01 am by h4rdc0d3 »
h4rdc0d3
$model = 'SL-5600';
$proc = 'intel xscale pxa-255';
$rom = 'thekompany.rom';
@card = ('sandisk cf 128mb', 'sandisk sd 128mb', 'lexar sd 256mb', 'sandisk sd 512mb', 'dane-elec cf 512mb' x 2);
@other = ('zthincable rs-232 m-db9-4', 'garmin etrex', 'garmin data cable');
@bad = ('sandisk cf 1gb', 'sandisk ultraII sd 1gb', 'sandisk sd 1gb');

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Mplayer Speed Question
« Reply #10 on: February 05, 2005, 04:48:45 pm »
Quote
For your viewing pleasure, here's a 30 second clip from CSI: NY's Tri-Borough episode produced via the above process:

 [ Invalid Attachment ]

P.S. That's 30 seconds... squeezed into 1,177,604 bytes!!!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=64103\"][{POST_SNAPBACK}][/a][/div]

MPEG (MPEG-1) is so... well... 1980's.

MPEG-4 can encode higher quality at half that bitrate, and Windows Media and Real Video can do even better than that (although, last I heard, Zaurus doesn't support Windows Media and Real Video yet, so MPEG-4, DIVX, On2 (did I get that right?), etc is all we can do for the time being.... but that's 80% good enough for now. :-) )
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

h4rdc0d3

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://www.hardcodelabs.org/
Mplayer Speed Question
« Reply #11 on: February 11, 2005, 05:07:39 pm »
Quote
MPEG (MPEG-1) is so... well... 1980's.

I wholeheartily agree... but it was all I knew at the time... luckily I've found a better way.

I have had much recent success with MeWiG on Windows. I highly recommend downloading and installing the windows binary (or compile it yourself) MPlayer / MEncoder from http://www.mplayerhq.hu/ and MeWiG (Mencoder Windows Gui) from http://mewig.sf.net/.

Here are my recommended MeWiG options, YMMV:
- Encode as mp3 (using lame)
- Audio Bitrate 96
- Increase volume by 10dB (optional)
- Encode video using ffmpeg (divx!)
- Codec mpeg4 (divx!)
- Video Bitrate 120
- 2 Pass
- High quality (1) fewest bits (vhq)
- 4 mvs
- trellis quant
- Crop as needed
- Scale to max 320 width or 240 height

This gets an hour of PVR'd TV (commercials cut out) down to 70-75 MB and a movie at around 225-230 MB. I'm still testing... but initial results appear to have a slight noticeable higher quality in both sound and video with a 25% reduction in filesize as compared to their counterparts encoded via my instructions above.

Another cool part about MeWiG is that you can use the GUI to create the command lines and then have a starting point to make your own scripts, or run a bunch as a batch job in a cmd prompt.

Also, I haven't tried any ogg/ogm's with MeWiG yet, but the option is in the GUI.
« Last Edit: February 11, 2005, 05:09:46 pm by h4rdc0d3 »
h4rdc0d3
$model = 'SL-5600';
$proc = 'intel xscale pxa-255';
$rom = 'thekompany.rom';
@card = ('sandisk cf 128mb', 'sandisk sd 128mb', 'lexar sd 256mb', 'sandisk sd 512mb', 'dane-elec cf 512mb' x 2);
@other = ('zthincable rs-232 m-db9-4', 'garmin etrex', 'garmin data cable');
@bad = ('sandisk cf 1gb', 'sandisk ultraII sd 1gb', 'sandisk sd 1gb');

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Mplayer Speed Question
« Reply #12 on: February 11, 2005, 05:41:48 pm »
dvd::rip and transcode provide excellent results as well, btw
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf