Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How To Play Quicktime movies and useful mplayer tips:
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Fri Apr 11, 2003 2:36 pm    Post subject: How To Play Quicktime movies and useful mplayer tips: Reply with quote

A guide to playing Quicktime movies and other formats using mplayer :

Playing Quicktime 6 Movies using Mplayer :
No sound or video when playing Quicktime movies? Then this is how you check what codecs you need and how to install then. First you need to find the "Fourcc" value of the audio and video parts of the movie :

Code:
mplayer -noloop -vo null -ao null -frames 1 matrix.mov 2> /dev/null | grep -i fourcc
Fourcc: SVQ3  Codec: 'Sorenson Video 3'
Fourcc: mp4a

( This pages lists information on most of the video and audio fourcc's : http://www.fourcc.org/fcccodec.htm )

Unfortunately the fourcc value of the audio track is not listed on the mplayers page so you need to look out for the error on the missing codec :
Quote:
"Cannot find codec for audio format 0x6134706D"


And use the "0x6134706D" and the fourcc value to look up the codec on this page :
http://www.mplayerhq.hu/DOCS/codecs-status.html


A] Installing Mplayer :

1] The Simple Install (just for Quicktime movies):
1.1) Install faad2 for aac mpeg audio support. (Faad2 has been recently added to portage although it is still masked):
Code:
emerge sync
emerge -u faad2


1.2) Once you have that installed, install the lastest mplayer (0.90). However i would also install other packages aswell
like mad/xvid and win32codec etc..:
Code:
emerge win32codecs mplayer


And now you can play your favourite quicktime movie files.

PS : Xine can also play Quicktime movies because it has a version of faad2 packaged within it.

2] Complete mplayer install (to be completed):
Mplayer uses a lot of other codecs to play stuff. So to make the most of mplayer here is some useful codecs to install :

Video Drivers :
If you have a nvidia card some of these drivers will not work properly. This is coz of the closed drivers that Nvidia supply.At the
moment the best vider driver for Nvidia cards is the XV or the SDL driver. Here is how to set the driver to be xv:
Code:
mplayer -vo xv movie.avi

or you can set is as the default in /etc/mplayer.conf or for a local user in ~/.mplayer/config :
Code:
#mplayer settings :
vo=xv

Look at /etc/mplayer.conf for examples of different settings. For more info on video drivers read this section : http://www.mplayerhq.hu/DOCS/video.html

If you want to see the list of installed Video drivers run this command :
Code:
mplayer -vo help


You can benchmark each one of this drivers with this command :
Code:
mplayer -fs  -benchmark -ao sdl  -frames 100  -vo xv  -osdlevel 0  -ss 00:23:10 movie.avi  2> /dev/null | grep BENCH
BENCHMARK%: VC: 13.2017% VO:  4.9512% A:  0.7360% Sys: 81.1111% = 100.0000%


XV :
This driver works on most computers and offers very good performance.

SDL :
The SDL driver is very good and can use XV/X11 and fb drivers depending on the situation.

X11 :
This driver is not as fast as the XV driver and does not support dynamic scaling.
You only need X to installed to use this one. This driver can be used by most cards and it the most stable.
Rather use the xv/sdl or vidix as they perform alot better.

AA :
This uses asci to print you movie to the console window. Don't really know why you would want this
other than it looks cool :)

GGI :
Fast and safe graphics and drivers for about any graphics card to the Linux kernel (sometimes). Does not seem to
work to well with Nvidia cards.

VIDIX :
VIDIX is the abbreviation for VIDeo Interface for *niX. It was designed and introduced as an interface for fast user-space
drivers providing such video performance as mga_vid does for Matrox cards. It's also very portable.


MGA_VID :
Ideal for Matrox cards.This section is about the Matrox G200/G400/G450/G550 BES (Back-End Scaler) support,
the mga_vid kernel driver. It's actively developed by A'rpi, and it has hardware VSYNC support with
triple buffering. It works on both framebuffer console and under X.


DirectFD :
A framebuffer driver which performs alot better than the fbdev.


Audio Drivers :
For more info on soundcards and mplayer go here for info on which driver to use.

SDL :
You need to install SDL. If you have arts runnig or are using either alsa or oss drivers it autodetects it and uses what is avaiable.
If you have any performance problems and have tried with the different video drivers it is advisable to try the SDL drivers.

OSS :
These are the old soundcard drivers that come with the 2.4 kernel. This will sound be depricated in the kernel and be replaced by the
newer ALSA drivers.

ARTS :
Kde Sound Server. Not really idea for playing movies. But it works .. kinda.

ALSA :
This is going to replace OSS in the kernel, however some older cards are still only support by OSS drivers. If this driver does for
work well, then use the OSS driver.

Codecs :
Here is how to get a list of audio codecs installed :
Code:
mplayer  -ac help
mplayer  -vc help


Realplayer :
Using mplayer as a realplayer replacement for playing rtsp:// streams.
Code:
emerge realplayer realone live mplayer

You can use kmplayer/mplayerplug-in or plugger to play the rtsp:// streams in the web browser (Although Realone seems to be an
improvement to be an improvement over Realplayer8).

Playing OGMs :
OGM's stands for "OGG media streams". OGM's allow for multiple video/audio and subtiltes. It is a wonderfull format especially
for anime fans. If you want to create your own one get ogmtools.
emerge libvorbis libogg

XVID Playing :
If you want to use mencoder to create xvid mpeg4 then you need the xvid package. However you do not need the xvid codec for playing
xvid avis as mplayer comes with the ffmpeg codec which seems to do a better job. However if you do want to try out the xvid decoder for
xvid encoded movies you can with the -vc command:
Code:
emerge xvid


Xanim Codecs :
Mplayer also codecs the xanim codecs.
Code:
emerge xanim



AAC MPEG audio :]/i]
This is what some of the Quicktime movies use.
Code:
emerge faad2


[i]Mp3 playing and encoding :

From my experience the mad mp3 decoder performs the best. You can force the mad decoder with the
"-ac" command like so : mplayer -ac mad movie.avi.
Code:
emerge lame mad


Misc :[i]
Flaac Playback :
Code:
emerge flaac


B] Playing Qucktime Movie :

Most of the time Quicktime movies play fine on mplayer, however there is an exception or two.

One exception is Quicktime movies with multiple audio tracks and or multiple video codecs here are ways of
overcoming those Quicktime movies. An example of these is some of the animatrix trailers
For example the The Second Renaissance Trailer:
http://progressive1.stream.aol.com/wb/gl/wbonline/progressive/thematrix/us/med/animatrixlgfinal_dl.mov

1)Fixing out of Sync Audio : :
OK, even though now you can play most mov files. It does not mean it plays fine. Sometimes the audio it
out of sync. Here is how you can fix it :

[i]1.1) What type of audio codec does it use :


Code:
mplayer -frames 1 -noloop -vo null -ao null   -v  the_second_renaissance.mov  2> /dev/null | grep -i faad


This is the output if it is aac mpeg audio :
Selected audio codec: [faad] afm:faad (AAC MPEG2/MPEG4 Audio)

1.2) Playing the Quicktime movie :

1.2a)Quicktime movies with aac mpeg audio :
Here is how you play Quicktime movies with out of sync audio :
Code:
mplayer -aid 2 -dumpaudio -dumpfile begin.aac animatrix.mov
 mplayer -aid 1 -dumpaudio -dumpfile main.aac animatrix.mov
 cat begin.aac main.aac > animatrix.aac
 faad animatrix.aac 
 mplayer -audiofile animatrix.wav animatrix.mov


1.2b)Quicktime movies with aac mpeg audio :

First you need to calculate the amount of delay there is. This will print out the length of the first audio track :
Code:
 mencoder -aid 2 -ofps 24  -oac copy -ovc copy -o /dev/null  the_second_renaissance.mov 2> /dev/null | grep "Audio stream"

This should print out something like this :
Audio stream: 47.888 kbit/s (5986 bps) size: 61160 bytes 10.217 secs
So the audio delay is "10.217" as mplayer does cannot yet play the first track and only the second (Hopefully
this will be sorted out soon). To play this Quicktime movie with the audio in sync run :

Code:
mplayer -delay -10.217 the_second_renaissance.mov


You can save yourself time by storing that value for the specific file like so :
Code:
echo "delay=-10.217" > ~/.mplayer/the_second_renaissance.mov .conf


Now the_second_renaissance.mov will use -delay -10.217 by default. You can specify any setting you want that has a
commandline in mplayer like this :

the_second_renaissance.mov.conf
Code:
#the_second_renaissance.mov.conf
vo=xv
ao=sdl
fs=yes
loop=yes
delay="-10.217"


This will play the the_second_renaissance.mov movie fullscreen with the Video driver being xv and the sound driver being sdl,
it will loop playback.

2)Converting and Fixing Out of sync mov :
So you downloaded the animatrix movie. But now you don't want to worry about setting the delay each time you play it.

1] Reencoding Quicktime movies with aac mpeg audio :
Tools needs :
mplayer/ogmtools/vorbis and faad2

This is thanks to a Gentoo posting by Gabor.

This only works if the sound is AAC MPEG2/4 Advanced Audio:
Code:
mplayer -frames 1 -noloop -vo null -ao null   -v  animatrix.mov 2> /dev/null | grep -i faad


Here is how :
1) Get the aac mpeg audio out :
Code:
mplayer -aid 2 -dumpaudio -dumpfile begin.aac animatrix.mov
 mplayer -aid 1 -dumpaudio -dumpfile main.aac animatrix.mov
 cat begin.aac main.aac > animatrix.aac
 faad animatrix.aac 


2) Do a 2-pass encode to get better quality :
Pass 1 :
Code:
mencoder -fps 23.976  -nosound -sws 2  -pp 6 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=2000:vpass=1 -o /dev/null animatrix.mov

Pass 2 :
Code:
mencoder -fps 23.976 -nosound -sws 2  -pp 6 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=2000:vpass=2 -o animatrix.avi animatrix.mov 

Now you have animatrix.mov and animatrix.wav and animatrix.avi

3) OGGenc complete.wav created by faad :
Code:
oggenc -q 6 animatrix.wav
rm -f  animatrix.wav

Now you have animatrix.mov and animatrix.ogg and animatrix.avi

4)Join the audio to the avi :
Code:
ogmmerge -o animatrix.ogm animatrix.avi animatrix.ogg
rm -f  animatrix.ogg animatrix.avi


Now you have animatrix.mov and animatrix.ogm . So now you have a nice ogm of the movie.

2] This is a sloppy way but it works for non-aac sound in Quicktime
I need to come up with a another way of doing this but it works:
1) Do a 2-pass encode to get better quality :
Code:
mencoder -fps 23.976 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=2000:vpass=1 -o /dev/null the_second_renaissance.mov
 mencoder -fps 23.976 -oac mp3lame -lameopts  preset=172 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=2000:vpass=2 -o the_second_renaissance.avi the_second_renaissance.mov


2) Strip out the mp3. Unfortunatley mencoder does not do vorbis encoding :
Code:
mplayer -dumpaudio -dumpfile stream.mp3 the_second_renaissance.avi


3) Resync the audio :
Here is a small script to rsync the audio (this seems to be fixed in the lastest cvs versions of mplayer.):

Code:
seconds=`mencoder -aid 2 -ofps 24 -oac copy -ovc copy -o /dev/null the_seccond_renaissance.mov 2> /dev/null | grep "Audio streaam" | awk '{print $10 * 1000}'`
 ogmmerge -o the_second_renaissance.ogm -A the_second_renaissance.avi -s $seconds stream.mp3


3] How to watch Quicktime trailers in your browser :

Ok so you want to play your favourite trailer or Apple.com or at Matrix.com, but you do not want to mission with reading the
html source to be able to see the trailers. So here are some browser plugins to help you get sorted :

Konqueror :
Also supports Mozilla plugins :
Kmplayer : http://www.xs4all.nl/~jjvrieze/kmplayer.html
To install do :
Code:
emerge kmplayer


[img:0609ef70e8]http://dts.sourceforge.net/kmplayer.png[/img:0609ef70e8]
[img:0609ef70e8]http://dts.sourceforge.net/kmplayer-options.png[/img:0609ef70e8]

Mozilla or Phoenix :
Mplayerplug-in : http://mplayerplug-in.sourceforge.net/
Code:
emerge mplayerplug-in


[img:0609ef70e8]http://dts.sourceforge.net/mplayerplug-in.png[/img:0609ef70e8]

Options for this plugin is stored in /etc/mplayerplug-in.conf

Opera :
Opera now supports Mozilla plugger. Although i have not used plugger. But it is supposed to be very configurable.


PS : Xine users can install totem is comes with a mozilla plugin. Although it does not work like the others.

Here is a easy way to get a copy of a web stream or a trailer :
If it is one of those embedded trailers then look for the embed html tag like this one :

Code:
<EMBED  SRC="http://progressive1.stream.aol.com/wb/gl/wbonline/progressive/thematrix/us/med/trailer_final_320_dl.mov"
WIDTH="320" HEIGHT="188">
</EMBED>


so for this Quicktime mov the url is :
http://progressive1.stream.aol.com/wb/gl/wbonline/progressive/thematrix/us/med/trailer_final_320_dl.mov

So to rip this to your hardrive you can do this :
Code:
mplayer -dumpstream -dumpfile matrix.mov http://progressive1.stream.aol.com/wb/gl/wbonline/progressive/thematrix/us/med/trailer_final_320_dl.mov


For Shoutcasts etc.. :
Code:
mplayer -dumpaudio -dumpfile radio.mp3 http://webradio.com/radio.mp3



Some Mplayer Tips and Tricks :

Howto set the playback defaults for a specific movie only :
You can specify any setting you want that has a commandline in mplayer like this. ie :

animatrix.mov.conf
Code:
#animatrix.mov.conf
vo=xv
ao=sdl
fs=yes
loop=yes
sid=3
aid=2


This will play the animatrix movie fullscreen with the Video driver being xv and the sound driver being sdl, it will loop playback.

By the way you can set the sid and aid like this to for a specific movie :

Cowboy_Beboy-The_Movie.ogm.conf
Code:
#Cowboy_Beboy-The_Movie.ogm.conf
sid=3
aid=2


Setting the SID and AID is handy for OGM files which have subtitles and multiple audio id stored in the movie file. You can
find the SID like so :

Code:

mplayer -noloop  -frames 1 -vo null -ao null  -v cowboy_bebop_-_01.ogm 2> /dev/null | grep "text"


And the Audio ID like so :

Code:

mplayer -noloop  -frames 1 -vo null -ao null  -v cowboy_bebop_-_01.ogm 2> /dev/null | grep "audio"


Global settings for mplayer is stored in /etc/mplayer.conf and local settings in ~/.mplayer/config

Running Mplayer in the root window :

Kdesktop prevents you from running something on the root window as it will always be ontop and mplayer will be underneath it :?.
You can remedy this by killing kdesktop like so :

Code:
ps -ef | grep kdesktop
mikeb      4385     1  0 Feb05 ?        00:04:07 kdeinit: kdesktop
kill -9 4385


And now you can run it :
Code:
 mplayer -vo xv -rootwin -dvd 1


And if you want you desktop back just run kdesktop.

Maintaining Aspect Ratio while resizing a mplayer window :

Malakin wrote:
I suppose there still isn't a way to make mplayer keep the aspect ratio correct when resizing?


You can maintain aspect ratio with mplayer with the -aspect command:
Code:
mplayer -zoom -vo x11 -aspect 16:9 movie.avi


This only works with the xvidix and x11 drivers at the moment. The xv and the sdl drivers use the initial value,
but after you resizing it, it loses the aspect ratio.

Or you can store the aspect ratio in the movie with mencoder :
Code:
mencoder -aspect 16:9 -ovc copy -oac copy -o fixed.avi noaspect-ratio.avi


Fine Tuning Mplayer Playback :
If you playback generate messages about your pc being too slow then you can try benchmark you playback with this command.
I will print information at the end. Now you can check what is using all the cpu time by switching the -vo and -ao options.
First try with null to see how much just decoding uses.

Code:
mplayer -benchmark -ss 00:00:30 -noloop -frames 100 -nofs -ao null -vo null  trailer_final_1000_dl.mov 2> /dev/null | grep BENCHMARK


Once you have found the victim you can do some system tuning. However if it is the raw decoding there is not much you can do other then tweak you comps performance itself. Check if you have dma is set etc..

I am going to try it myself and post results on :
https://forums.gentoo.org/viewtopic.php?t=47041

For now here is my findings :

With the Video driver and Audio driver being set to null.
Code:
mplayer -benchmark -ss 00:00:20 -noloop -frames 100 -ao null -vo null  trailer_final_1000_dl.mov 2> /dev/null | grep BENCHMARK
BENCHMARKs: VC:   1.562s VO:   0.001s A:   0.084s Sys:   2.577s =    4.223s
BENCHMARK%: VC: 36.9945% VO:  0.0119% A:  1.9824% Sys: 61.0112% = 100.0000%


Playing fullscreen with the xv and sdl drivers :
Code:

mplayer -osdlevel 0 -fps 24  -noloop -benchmark -frames 100 -ss 00:00:20 -ao sdl -vo xv   trailer_final_1000_dl.mov 2> /dev/null | grep BENCH
BENCHMARKs: VC:   1.577s VO:   0.531s A:   0.084s Sys:   2.032s =    4.224s
BENCHMARK%: VC: 37.3292% VO: 12.5627% A:  1.9949% Sys: 48.1133% = 100.0000%


As you can see there is about a 12-15% difference between raw playback and displaying the movie.

TIP:
Try different -sws and -pp value. -pp 0 disables win32 posprocessing and -pp 6 will use alot more cpu.

Tips,Fixes and Bugs :

The mplayer gui right click does not work :
If when you right click on gmplayer and nothing appears then you probably have the "gtk2" build of gmplayer. To fix this build
mplayer without gtk2 support:
Code:
USE="-gtk2" emerge mplayer

I think that there might be something wrong with the gtk2 patch.

Howto force a single session only of mplayer :
You know that nice feature of xmms that always for only one instance. Well here is how you do it for divx/avi/svcds etc..

1)Xmms-mplayer :
Make avi/mpeg etc.. default to xmms and install then xmms-mplayer from
here.

And now when you click on movies it will run in the one instance of xmms only and therefore the one instance of mplayer. :)
Cool or what.

NOTE : Xmms-mplayer is still very much beta code BUT is it awsome :). avi-xmms plugin could also work like this, but is does
not support as many file formats and does not have the performance of mplayer.

2) Kmplayer
Kmplayer should also be able to do the same with its dcop interface and when 0.7.4 comes out there will be some nice
lots of nice improvements. Here is how to use the dcop interface of kmplayer :

Code:
 Thanks to the KMediaPlayer::Player interface, KMPlayer can be controlled by DCOP. Eg. to open a movie, run
dcop kmplayer-<pid> KMediaPlayer openURL <your movie file>


It should be easy for the author of kmplayer to mimic the behaviour of xmms where can force only one instance of kmplayer.

Kmplayer also allows for embedded playback inside of konqueror while file browsing.

Pornview
Pornview is a file explorer that plays movies in an embedded pane. The new beta version of Pornview uses mplayer or xine for playback.

NOTE : The mplayer command interface has a "run" function, which does not seem to be enabled as yet, this should could also
allow for the same kind of functionality.

So what is stopping you now :
Here is the end result. Although ideally you should use mplayer and not gmplayer.

[img:0609ef70e8]http://dts.sourceforge.net/mplayer.png[/img:0609ef70e8]

Good luck.. I hope the helps you in anyway.

Userful Web Recourses on Mplayer tools/docs etc :
A list of projects using mplayer - http://www.mplayerhq.hu/homepage/design6/projects.html

Useful Docs :
Fine-tuning MPlayer by Arpi - http://freshmeat.net/articles/view/747/
Mplayer Docs ie : RTFM - http://www.mplayerhq.hu/DOCS/

Mplayer GUI's:
Namp - A good gtk2 mplayer gui - http://j.a.l.free.fr/namp/
kmplayer - MPlayer frontend for KDE. - http://www.xs4all.nl/~jjvrieze/kmplayer.html

Browser Plugins :
mplayerplug-in - A browser plugin that uses mplayer to play videos from websites. http://mplayerplug-in.sourceforge.net/
kmplayer - MPlayer frontend for KDE. - http://www.xs4all.nl/~jjvrieze/kmplayer.html
kplayer - A very good KDE frontend - http://kplayer.sourceforge.net/
plugger -Streaming Multimedia Plugin for Unix Netscape - http://fredrik.hubbe.net/plugger.html

Mencoder Frontends :
Gmencoder - a GTK2 mencoder frontend - http://gmencoder.sourceforge.net/
AcidRip - a Gtk::Perl application for ripping and encoding DVD's. - http://acidrip.thirtythreeandathird.net/
QuickRip - a basic DVD ripper for GNU/Linux written in Python and PyQt - [url/]http://quickrip.sourceforge.net/[/url]
ogmencoder - Uses MPlayer/Mencoder and Transcode to create a OGG-OGM backup of your DVD - http://it.geocities.com/fnt400/ogmencoder/
kmencoder - frontend to mencoder/mplayer for KDE. - http://sourceforge.net/projects/kmencoder/
moviesplit - An amazing divx movie splitter, :) - https://forums.gentoo.org/viewtopic.php?t=47519

Xmms Plugins
xmms mplayer - usefull little mplayer plugin for xmms - http://www.cse.iitb.ac.in/~nandan/xmmsmplayer/xmmsmplayer.html

Codec Homepages :
Binary codecs for MPlayer - http://www.mplayerhq.hu/MPlayer/releases/codecs/

Linux Drivers
Alsa Soundcard Matrix : http://alsa-project.org/alsa-doc/
Low Latancy Howto for Alsa : http://www.djcj.org/LAU/guide/Low_latency-Mini-HOWTO.php3
OSS Soundcard Support Matrix (commercial) : http://www.opensound.com/osshw.html


TODO : Get a list of links etc..
TODO : Go though and fix gramar and smelling (lol).
TODO : Write a table of contents for the impatient
TODO : Add some tv view and encoding tips


Last edited by mikepb78 on Fri Jun 06, 2003 6:57 pm; edited 89 times in total
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1398
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Fri Apr 11, 2003 3:07 pm    Post subject: Reply with quote

Very nice tip! I will have to give most of this a try sometime! Thanks for the information, nicely presented as well!

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
duff
Guru
Guru


Joined: 19 Jun 2002
Posts: 466
Location: Clemson, SC

PostPosted: Fri Apr 11, 2003 4:11 pm    Post subject: Reply with quote

That didn't take long :wink: Looks great!

Glad to see it here.
Back to top
View user's profile Send private message
ghetto
Guru
Guru


Joined: 10 Jul 2002
Posts: 369
Location: BC, Canada

PostPosted: Fri Apr 11, 2003 8:16 pm    Post subject: Reply with quote

Yeah it looks good to me 2

This is a great way to learn some of the mplayer function's and flags..

Good Howto dude.
_________________
Blizzard you suck.
Back to top
View user's profile Send private message
Ian Tindale
n00b
n00b


Joined: 13 Dec 2002
Posts: 16
Location: London

PostPosted: Fri Apr 11, 2003 10:40 pm    Post subject: Reply with quote

"Play Any Quicktime 6 movie" - excellent. I've been looking for a way of playing all my QTVR panoramas and object movies in Linux for a while now. Must try this.
_________________
Ian Tindale
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Fri Apr 11, 2003 11:23 pm    Post subject: Reply with quote

Wicked howto!

Finally I could watch that matrix reloaded mov that has been sitting on my HDD for days!

I converted it to ogm, and it's 66% of the original file size, and the same quality!

Thanks alot man!
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Sun Apr 13, 2003 11:58 pm    Post subject: Hi Reply with quote

Please post suggestions of things to cover here :
https://forums.gentoo.org/viewtopic.php?t=47473

and please send me any major errata, i am still working on the small stuff.
Back to top
View user's profile Send private message
metalhedd
l33t
l33t


Joined: 30 May 2002
Posts: 692
Location: Ontario Canada

PostPosted: Tue Apr 15, 2003 10:29 pm    Post subject: Reply with quote

Just wondering why -vo xv is recommended for Nvidia cards. I just use the default, I believe it is SDL, it seems to work fine. When I try -vo XV, if I make the video fullscreen, my mousecursor still shows up (Wierd) and when it's windowed, I can't move or resize the window!
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 Apr 15, 2003 11:03 pm    Post subject: Reply with quote

Quote:
Just wondering why -vo xv is recommended for Nvidia cards. I just use the default, I believe it is SDL, it seems to work fine.
xv has a slightly lower cpu utilization, even though sdl usually ends up using xv.

Quote:
When I try -vo XV, if I make the video fullscreen, my mousecursor still shows up (Wierd) and when it's windowed, I can't move or resize the window!
Still seeing the mouse is normal, I just push it to the right so it's offscreen. Not being able to move or resize the window is not normal, I've never seen this behaviour before...

If sdl works for you there's no reason to change.
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Tue Apr 15, 2003 11:17 pm    Post subject: Xv driver : Reply with quote

metalhedd wrote:
Just wondering why -vo xv is recommended for Nvidia cards. I just use the default, I believe it is SDL, it seems to work fine. When I try -vo XV, if I make the video fullscreen, my mousecursor still shows up (Wierd) and when it's windowed, I can't move or resize the window!

Well the SDL driver also plays quite well. You can benchmark the drivers like this :
Code:
mplayer -fs  -benchmark  -frames 100 -ao null -vo sdl -osdlevel 0  -ss 00:23:10 movie.avi  2> /dev/null | grep BENCH


With XV the cursor should disappear after a couple of seconds. You well see that the x11 drivers perform very badly.
Back to top
View user's profile Send private message
smokeslikeapoet
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2003
Posts: 96
Location: Cordova, TN USA

PostPosted: Wed Apr 16, 2003 4:49 am    Post subject: Reply with quote

Wow this will really get my started. I made the switch from WinXP to Gentoo about a month ago and I've had to put my video coding passion aside for a during the switch. I have about 300 divx and xvid movies that i've encoded myself but having tried to watch any of them in Linux yet. Thanks.
_________________
-SmokesLikeaPoet

Folding@Home
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Thu Apr 17, 2003 8:49 pm    Post subject: Very nice kde mplayer frontend ,does xv fixed aspect ratios: Reply with quote

First ... a picture speaks a thousand words :

[img:7af9e42f09]http://dts.sourceforge.net/kplayer-aspect.png[/img:7af9e42f09]

Kplayer
One of many mplayer front ends :
Code:
emerge kplayer


As you see you can do some funky little things with this player. Like zoom in and out, changing aspect ratio (i mapped it to a key word) and maintaining aspect ratio.

NOTE : For the screenshot only i modified the source to use the X11 driver otherwise all you will see is blue, as it uses the xv driver by default.

And yes the "Maintain Current Aspect Ratio" works with XV as well with kplayer
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


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

PostPosted: Fri Apr 18, 2003 12:22 am    Post subject: Reply with quote

Quote:
And yes the "Maintain Current Aspect Ratio" works with XV as well with kplayer
Instead of clamping down the video output to fit the aspect ratio the main window keeps popping bigger, not an elegant solution but it does work.
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Fri Apr 18, 2003 1:25 am    Post subject: Reply with quote

Malakin wrote:
Quote:
And yes the "Maintain Current Aspect Ratio" works with XV as well with kplayer
Instead of clamping down the video output to fit the aspect ratio the main window keeps popping bigger, not an elegant solution but it does work.


Yes, i know, until someone copy and pastes the x11 code for fixed aspect ratio into the xv output driver. :)
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Mon Apr 21, 2003 9:43 pm    Post subject: For non gentoo users or gentoo users that use cvs versions Reply with quote

To compile faad2 :

This is for non-gentoo users :

wget -c http://faac.sourceforge.net/files/faad2-1.1.tar.gz
extract source and then from the faad dir :
patch -p1 < gentoo.diff
./bootstrap
cd frontend
cp Makefile Makefile.orig
sed -e "s:CCLD = \$(CC):CCLD = \$(CXX):" Makefile.orig > Makefile

Files needed:
gentoo.patch
Code:
--- faad2/frontend/audio.c      2002-07-25 14:42:54.000000000 +0200
+++ faad2/frontend/audio.c      2003-01-23 17:48:01.000000000 +0100
@@ -52,7 +52,7 @@
         break;
     }
     aufile->sfinfo.channels = channels;
-    aufile->sfinfo.samples  = 0;
+    aufile->sfinfo.frames  = 0;
 #ifdef _WIN32
     if(infile[0] == '-')
     {
@@ -90,4 +90,4 @@
     sf_close(aufile->sndfile);
 
     if (aufile) free(aufile);
-}
\ No newline at end of file
+}


PS : in future use gentoo :)
Back to top
View user's profile Send private message
vanguardist
n00b
n00b


Joined: 24 Apr 2003
Posts: 10

PostPosted: Thu Apr 24, 2003 12:39 pm    Post subject: Still no video.... Reply with quote

Well, I was able to get faad and mplayer compiled with the quicktime codecs, yet I get the following error on animatrixlgfinal_dl.mov:

Opening audio decoder: [qtaudio] QuickTime Audio Decoder
win32 libquicktime loader (c) Sascha Sommer
Standard init done you may now call supported functions
loader_init DONE???
loader_init DONE!
Error no 12
VirtualAlloc(0x0x66800000, 4259840) failed
External func COMCTL32.dll:17
External func COMCTL32.dll:16
Unsupported QuickTime version (0x172e7330)
InitializeQTML:268498899
ADecoder preinit failed :(
ADecoder init failed :(

Then it all fails.

Also, I get this error with trailer_final_320_dl.mov
Opening video decoder: [qtvideo] Quicktime Video decoder
Error no 12
VirtualAlloc(0x0x66800000, 4259840) failed
External func COMCTL32.dll:17
External func COMCTL32.dll:16
Unsupported QuickTime version (0x172b2330)
InitializeQTML returned 268498899
Count = 128977
Found it! ID = 0x1F7D1
ci=0x1f7d1
ImageCodecInitialize->0x1f7d1 size=0 (0)
Flags: compr: 0x0 decomp: 0x0 format: 0x0
Codec name:
ImageDescription size: 111

Any clues?
Back to top
View user's profile Send private message
silverter
Guru
Guru


Joined: 10 Apr 2002
Posts: 491
Location: Ulm, DE

PostPosted: Thu Apr 24, 2003 12:50 pm    Post subject: Reply with quote

Hello,
just out of curiosity, what quicktime dlls are you using?
_________________
-- A Guru was once a Beginner --
Back to top
View user's profile Send private message
vanguardist
n00b
n00b


Joined: 24 Apr 2003
Posts: 10

PostPosted: Thu Apr 24, 2003 12:57 pm    Post subject: Reply with quote

The ones from the mplayer page which are installed with emerge win32codecs. Reading the ebuild and the changelog for the latest verison, it does download all the qt stuff, and it's in /usr/lib/win32 already.

ml
Back to top
View user's profile Send private message
silverter
Guru
Guru


Joined: 10 Apr 2002
Posts: 491
Location: Ulm, DE

PostPosted: Thu Apr 24, 2003 1:06 pm    Post subject: Reply with quote

strange, I have the same codecs installed and everything works fine on mine... I'll look further and post more suggestion if I find any...

regards,
_________________
-- A Guru was once a Beginner --
Back to top
View user's profile Send private message
vanguardist
n00b
n00b


Joined: 24 Apr 2003
Posts: 10

PostPosted: Thu Apr 24, 2003 5:57 pm    Post subject: Reply with quote

I unmerged and re-emerged everything and I still get the same issue. I wonder if there's something else that's going on here. Do I need any package other than faad, win32codecs and mplayer?

I did emerge mplayer and it downloaded and installed win32codecs (quicktime is in USE).
Back to top
View user's profile Send private message
mikepb78
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 171
Location: London

PostPosted: Thu Apr 24, 2003 9:28 pm    Post subject: Reply with quote

Debug time :

1) Do you have win32codecs-0.90.1-r2 installed not win32codecs-0.90.1-r1. Also make sure USE=quicktime is set.

Code:
emerge sync
USE="quicktime" emerge win32codecs


NOTE : is does not work on ppc, sparc and alpha.

2) Do you have faad2-1.1 installed? Is it masked so you need to set KEYWORDS="~x86" or force the install :

Code:
emerge sync
emerge media-libs/faad2/faad2-1.1.ebuild


3) Now compile mplayer 0.90, is it also masked at the moment : KEYWORDS="~x86 ~ppc", Or set that or force the install

Code:
emerge sync
emerge media-video/mplayer/mplayer-0.90.ebuild


4) If that is all installed etc. Try find out what format the movie is :

Code:
mplayer -v  -vo null -ao null -frames 0 -identify trailer_final_1000_dl.mov  2>/dev/null | grep -i fourcc


5) Remove old .mplayer/codecs.conf

6) Check that you have the right codecs installed in mplayer
Code:
mplayer -ac help
mplayer -vc help


7) If it still does not work join irc.freenode for help on the mplayer channel
Back to top
View user's profile Send private message
vanguardist
n00b
n00b


Joined: 24 Apr 2003
Posts: 10

PostPosted: Fri Apr 25, 2003 12:26 am    Post subject: Reply with quote

Alright, I did everything again and I still have the same problems. Also, check this out:

$ mplayer -vc help | grep qt
can't open '/home/manuel/.mplayer/codecs.conf': No such file or directory
qtrle qtrle working Quicktime Animation (RLE)
qtrpza qtrpza working Quicktime Apple Video
qtsmc qtsmc working Apple Graphics (SMC) codec
qt3ivx qtvideo working win32/quicktime 3IV1 (3ivx) decoder [3ivx Delta 3.5.qtx]
qth263 qtvideo crashing win32/quicktime H.263 decoder [QuickTime.qts]
qtrlerpza qtvideo crashing win32/quicktime RLE/RPZA decoder [QuickTime.qts]
qtvp3 qtvideo crashing win32/quicktime VP3 decoder [On2_VP3.qtx]
qtzygo qtvideo problems win32/quicktime ZyGo decoder [ZyGoVideo.qtx]
qtbhiv qtvideo untested win32/quicktime BeHereiVideo decoder [BeHereiVideo.qtx]
qtcvid qtvideo working win32/quicktime Cinepak decoder [QuickTime.qts]qtindeo qtvideo crashing win32/quicktime Indeo decoder [QuickTime.qts]
qtmjpeg qtvideo crashing win32/quicktime MJPEG decoder [QuickTime.qts]
qtmpeg4 qtvideo crashing win32/quicktime MPEG-4 decoder [QuickTime.qts]
qtsvq3 qtvideo working win32/quicktime SVQ3 decoder [QuickTimeEssentials.qtx]
qtsvq1 qtvideo problems win32/quicktime SVQ1 decoder [QuickTime.qts]

Still crashes. :(

ml
Back to top
View user's profile Send private message
silverter
Guru
Guru


Joined: 10 Apr 2002
Posts: 491
Location: Ulm, DE

PostPosted: Fri Apr 25, 2003 6:12 am    Post subject: Reply with quote

What happens if you copy the codecs.conf from the mplayer source tree (it must be under <mplayer source>/etc/codec.conf) in your .mplayer/ folder?
_________________
-- A Guru was once a Beginner --
Back to top
View user's profile Send private message
vanguardist
n00b
n00b


Joined: 24 Apr 2003
Posts: 10

PostPosted: Fri Apr 25, 2003 11:00 am    Post subject: Reply with quote

Same
Back to top
View user's profile Send private message
vanguardist
n00b
n00b


Joined: 24 Apr 2003
Posts: 10

PostPosted: Fri Apr 25, 2003 5:58 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic.php?t=23782&postdays=0&postorder=asc&start=100


I wonder if this could really be a kernel issue?
hhhmm
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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