OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: lardman on March 02, 2005, 04:27:45 pm

Title: Mplayer And Video
Post by: lardman on March 02, 2005, 04:27:45 pm
The words dead, horse and beating come to mind (due to the number of threads about mplayer of late). Nevertheless...

Whenever I play an AVI file it appears in fullscreen mode (is this the norm?) - this tends to skew things out of their natural aspect ratio. Unfortunately mplayer doesn't seem to obey the size info contained in the .avi files I'm trying to watch (and it doesn't like changing mode while playing). Any ideas how to make it obey the aspect ratio/not play full screen and indeed does anyone know why it defaults to fullscreen mode?

Cheers,


Si

P.S. Is ac3 supported (I have some soundless DVD rips)? I think I may have to remove the ac=mad from the config file; is there a way to override this, or to just make this true for mp3 files?
Title: Mplayer And Video
Post by: lardman on March 02, 2005, 04:38:24 pm
Okay, so removing the ac=mad solves the no-audio problem.

Unfortunately XVid video + ac3 audio seems to be a little too much for my Z as I just get snatches of audio and very very slow video now.

Anyway, why do we need the ac=mad setting (as I imagine it'll be a pain to have to keep adding/removing it) - i.e. why isn't this codec selected automagically?

I'd also still like to know about the fullscreen mode default if anyone knows anything.

Cheers,


Si
Title: Mplayer And Video
Post by: GenericAnimeBoy on March 02, 2005, 08:38:48 pm
I found out the long way (read, forum digging) that ac=mad is needed because without it mplayer tries to use a library called mp3lib (a floating point mp3 library, thus very slow) to decode mp3 audio.  I'm not sure why this is, and the thread I found it in (https://www.oesf.org/forums/index.php?showtopic=9636&hl=mplayer) isn't all that helpful on that subject.  Perhaps it has something to do with the recent change in the OZ distro...
Title: Mplayer And Video
Post by: adf on March 03, 2005, 12:52:10 am
It does the inefficient library bit on sharprom too. On a pxa 25x based z I would say just use the stacially linked mplayer and be done with it.  

The full screen thing (assuming your vids are smaller than qvga) is almost certainly done in your config somewhare.

A way to test stuff out is by passing the command to mplayer in-line when you launch it.. these options override the config file options. (do mplayer -h to see what can be passed)

MrSquishy has seemed to be successful w/ mplayer on OZ/OPie/5500.  Maybe prod him for a config file?

finally... I think maybe the stsically linked mplayer idea is a good option, if OE isn't compiling it and passing options per machine-type (which would be ideal--smallest and fastest). only 3 versions would be needed- an arm (for the 5500) the extant pxa25x, and and a pxa 270 (if there is that much difference from the 255)  The guy that did the staticaly linked version posted a link to his compiling stuff, to make it repeatable. ( I have to dl it myself ). It is around here somewhere
Title: Mplayer And Video
Post by: MrSquishy on March 03, 2005, 01:05:49 am
Is it rotating your video?

You can press "c" to rotate it back.
you can also use "-aspect=16:9" or "-aspect=3"  to set the aspect ratio.

There are different values that work better depending on if you have a 4:3/16:9 in Portrait or Landscape.

In Landscape, just call the "real" aspect ratio (ie -aspect=16:9 for widescreen)

In Portrait, it streches it on its own, so you need to further squash it
I find "-aspect=3" (which is the max) works pretty well for 16:9 videos in Portrait.

Again, I'll just point you back to my Opie-SH-Mplayer script, it does what I need it to do, and the ARGS box will let you easily change options.
Title: Mplayer And Video
Post by: lardman on March 03, 2005, 06:45:03 am
@GenericAnimeBoy:

Quote
I found out the long way (read, forum digging) that ac=mad is needed because without it mplayer tries to use a library called mp3lib (a floating point mp3 library, thus very slow) to decode mp3 audio.

Thanks for the info.

@MrSquishy:

Quote
Is it rotating your video?

No, it plays in landscape without troubles, however if I press 'f' to get out of fullscreen mode it locks up. Kill -9'ing it via ssh results in opie being pretty screwed up - rotated, very large, blurred and tiled on the screen - very odd. I have to issue a reboot command as even an /etc/init.d/opie restart doesn't fix it.

Quote
Again, I'll just point you back to my Opie-SH-Mplayer script, it does what I need it to do, and the ARGS box will let you easily change options.

Great, I'll try this now.

@adf:

My main reason for the post was that I was wondering why mplayer seemed to have a mind of its own - I always start it from the command line, and had removed my ~/.mplayer/config file - I suppose there may be another global config file somewhere under /etc, or the fullscreen thing may have been coded in as the default.

@everyone:

The other thing that confuses me is why mplayer insists on altering the aspect ratio anyway when playing fulscreen - if I have an avi file which I've encoded as 320x176 (due to the size on the input stream which was 960x528), why can't full screen just expand it uniformly in each direction by default so that the aspect ratio stays constant - this is what happens on Windows when I go for full screen mode.

I suppose it's possible that some people encode videos which need to be stretched more in one direction that another, or have black bands which can be ignored when going to full screen but it's a bit of a pain (and I can't really understand why these people would encode videos like this anyway - except to save space while reducing resolution in one direction).

Cheers all,


Si
Title: Mplayer And Video
Post by: DeGT on March 04, 2005, 01:04:16 pm
Quote
@everyone:

The other thing that confuses me is why mplayer insists on altering the aspect ratio anyway when playing fulscreen - if I have an avi file which I've encoded as 320x176 (due to the size on the input stream which was 960x528), why can't full screen just expand it uniformly in each direction by default so that the aspect ratio stays constant - this is what happens on Windows when I go for full screen mode.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69238\"][{POST_SNAPBACK}][/a][/div]

Maybe it's for people who have weird pixel, not squares but really flat ones...  

And I think ac3 is really not what you need for your Z... except you have some psychoacoustic(?) encoders. I don't know if s.th. like this exist.  
Title: Mplayer And Video
Post by: lardman on March 04, 2005, 01:08:35 pm
About ac3 - yeah, I would have gone for mp3 or somesuch, but the software I was using to re-scale the avi (VirtualDub on WinXP) couldn't process the audiostream so I elected to just have it passed through as was.

Si
Title: Mplayer And Video
Post by: Greg2 on March 04, 2005, 02:03:33 pm
Quote
About ac3 - yeah, I would have gone for mp3 or somesuch, but the software I was using to re-scale the avi (VirtualDub on WinXP) couldn't process the audiostream so I elected to just have it passed through as was.
In another thread somewhere maslovsky mentioned using the PocketDivXEncoder with windows. I still use a dual boot on my desktop for my Micro$ Flight Sim fix (mildly addicted), so I installed it and it works great.

You might also give MrSquighy's Opie-sh-mplayer script a try... it works good to.

Greg