# How To Play Quicktime movies and useful mplayer tips:

## mikepb78

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 :

```
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):

```
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..:

```
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:

```
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 :

```
#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 :

```
mplayer -vo help
```

You can benchmark each one of this drivers with this command :

```
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  :Smile: 

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  :

```
mplayer  -ac help

mplayer  -vc help
```

Realplayer :

Using mplayer as a realplayer replacement for playing rtsp:// streams.

```
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:

```
emerge xvid
```

Xanim Codecs :

Mplayer also codecs the xanim codecs.

```
emerge xanim
```

AAC MPEG audio :]/i]

This is what some of the Quicktime movies use.

```
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.

```
emerge lame mad
```

Misc :[i]

Flaac Playback :

```
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 :

```
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 :

```
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 :

```
 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 :

```
mplayer -delay -10.217 the_second_renaissance.mov
```

You can save yourself time by storing that value for the specific file like so :

```
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 

```
#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:

```
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 :

```
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 :

```
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 :

```
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 :

```
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 : 

```
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 : 

```
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 : 

```
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.): 

```
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 :

```
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/

```
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 :

```
<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 :

```
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.. :

```
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 

```
#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

```
#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 :

```

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

```

And the Audio ID  like so :

```

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   :Confused: . 

You can remedy this by killing kdesktop like so :

```
ps -ef | grep kdesktop

mikeb      4385     1  0 Feb05 ?        00:04:07 kdeinit: kdesktop

kill -9 4385

```

And now you can run it :

```
 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:

```
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 :

```
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.

```
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.

```
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 :

```

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:

```
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.  :Smile: 

Cool or what.

NOTE : Xmms-mplayer is still very much beta code BUT is it awsome  :Smile: . 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 :

```
 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,  :Smile:  -  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 tipsLast edited by mikepb78 on Fri Jun 06, 2003 6:57 pm; edited 89 times in total

----------

## BonezTheGoon

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

Regards,

BonezTheGoon

----------

## duff

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

Glad to see it here.

----------

## ghetto

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.

----------

## Ian Tindale

"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.

----------

## puddpunk

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!

----------

## mikepb78

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.

----------

## metalhedd

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!

----------

## Malakin

 *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.

----------

## mikepb78

 *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 : 

```
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.

----------

## smokeslikeapoet

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.

----------

## mikepb78

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 :

```
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

----------

## Malakin

 *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.

----------

## mikepb78

 *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.  :Smile: 

----------

## mikepb78

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

```
--- 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  :Smile: 

----------

## vanguardist

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  :Sad: 

ADecoder init failed  :Sad: 

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?

----------

## silverter

Hello, 

just out of curiosity, what quicktime dlls are you using?

----------

## vanguardist

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

----------

## silverter

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,

----------

## vanguardist

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).

----------

## mikepb78

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.

```
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 :

```
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

```
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 :

```
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 

```
mplayer -ac help 

mplayer -vc help
```

7) If it still does not work join irc.freenode for help on the mplayer channel

----------

## vanguardist

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.   :Sad: 

ml

----------

## silverter

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?

----------

## vanguardist

Same

----------

## vanguardist

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

----------

## vanguardist

wheeeeeeeeeeeeeeeeeeeeeeeeee  :Smile:   :Smile:   :Smile: 

Finally. I emerged gentoo-sources-2.4.20-r3 and everything's great.

 :Wink:   :Rolling Eyes:   :Cool: 

----------

## tactless

Since faad makes everything run extremely slowly on my box, I've ripped the audio and encoded it to ogg. Reencoding the movie seems to make it much bigger (by about 60% before adding the audio), and I'm short on hard drive space. Is there any way to leave the video as-is, only replacing the audio?

----------

## mikepb78

 *vanguardist wrote:*   

> Finally. I emerged gentoo-sources-2.4.20-r3 and everything's great.

 

So you think it was the kernel or something related to that that caused the crash? I have heard of other people also having mplayer crashes with the win32 codecs and quciktime. So that might be a possible solution. If only there was an explaination i could give as to why it occurs

----------

## mikepb78

XMMPlayer

This one works better then than Xmms-MPlayer, although i am sure the latter will have its bugs sorted out.

XMMPlayer features : 

 *Quote:*   

> 
> 
> local file playback of AVI, MPEG, QuickTime and OGG movies using MPlayer
> 
> uses magic to detect AVI, MPEG and QuickTime movies (checks for .ogm extension to detect OGG movies)
> ...

 

TODO :

 *Quote:*   

> 
> 
> 1) stream playback
> 
> 2) configuration screen
> ...

 

I will be very please to see that project have no. 3 done in the TODO list.

XMMPlayer :

http://thegraveyard.org/xmmplayer/

Xmms-Mplayer : 

http://www.cse.iitb.ac.in/~nandan/xmmsmplayer/xmmsmplayer.html

----------

## Praxxus

Man, thanks for that, Vanguardist.  It was a kernel config issue for me, too.

Even more frustrating, Mplayer was working great on my laptop, but kept barfing out (same errors you were getting) on the desktop.   :Razz: 

A kernel reconfig/recompile fixed it.    :Very Happy: 

----------

## gondoi

I'm a little confused about something....

I saw the tip on the animatrix movies.. (putting both audio channels in one then playing that file, etc)... well, here is the thing, I don't have trouble with any of the movies playing except for the detective story.

All the others I can just do 

```
mplayer animatrix.mov
```

and they work just fine, but with the detective one i have to extract the audio.....

Anyone have any idea about this one?

Thanks

----------

## jay

Could someone post tips how to play mplayer on the framebuffer, especially when you have one of those nifty splash-screens on the background?

----------

## mikepb78

I will go through all of the video output drivers for mplayer. The most usefull one is directfb. Basically you should 

```

emerge DirectFB 

emerge mplayer
```

You need to have set up your kernel for framebuffer support etc.. and then you can play your movie like so :

```
mplayer -vo directfb -fs movie.avi
```

I will go into more detail when i have time during the weekend.

PS : GGI/SDL/Vesa/SVGAlib and fbdev all can run on the frambuffer, directfb generally performs the best.

----------

## mikepb78

 *tactless wrote:*   

> Since faad makes everything run extremely slowly on my box, I've ripped the audio and encoded it to ogg. Reencoding the movie seems to make it much bigger (by about 60% before adding the audio), and I'm short on hard drive space. Is there any way to leave the video as-is, only replacing the audio?

 

This is due to the win32 quicktime codecs used to play the movie. Try rencoding with "v4mv", "vme=1" etc in your "lavcopts" for mencoder. And also do a 2pass encoding.

You can reduce the cpu usage when playing the original, by adding "-pp 0" to your mplayer cmd.

----------

## mikepb78

 *gondoi wrote:*   

> I'm a little confused about something....
> 
> I saw the tip on the animatrix movies.. (putting both audio channels in one then playing that file, etc)... well, here is the thing, I don't have trouble with any of the movies playing except for the detective story.
> 
> All the others I can just do 
> ...

 

with the detective eps you need to append the 2 audio channels so that it is in sync.

----------

## acid_kewpie

 *Quote:*   

> 
> 
> AcidRip - a Gtk::Perl application for ripping and encoding DVD's. - http://acidrip.thirtythreeandathird.net/ 

 

ooh that's mine! tell me what you think of it!

----------

## mikepb78

 *acid_kewpie wrote:*   

>  *Quote:*   
> 
> AcidRip - a Gtk::Perl application for ripping and encoding DVD's. - http://acidrip.thirtythreeandathird.net/  
> 
> ooh that's mine! tell me what you think of it!

 

Oh it is cool, i just want one feature. The ability to convert already ripped vobs on the harddrive.  :Smile:  I do not remember is being able to do that. Otherwise it is quite cool

----------

## mikepb78

m00dawg made step 3 in the audio resyncing a little easier :

```
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
```

----------

## cybermans

when i try to see the apple keynot about the G5 (maybe intressting when paladium hardware is introduced) (http://stream.apple.akadns.net/) i get the error message:    

MOV: Reference Media file!!!

QuickTime/MOV file format detected.

RTSP protocol support requires the "LIVE.COM Streaming Media" libraries!

Unable to open URL: rtsp://a2047.v1424b.c1424.g.vq.akamaistream.net/5/2047/1424/pri_250_1/1a1a1a0377e94eaf1c4abb2fa5d334a41480e51376e55281e65cc12fa31645af2492c1298afa6ae342b93094f7/wwdc_250.sdp

Playing rtsp://a2047.v1424b.c1424.g.vq.akamaistream.net/5/2047/1424/pri_250_1/1a1a1a0377e94eaf1c4abb2fa5d334a41480e51376e55281e65cc12fa31645af2492c1298afa6ae342b93094f7/wwdc_250.sdp

Exiting...

i already downloaded that libraries en maked the thing but it aint working yet. Anyone knows a solution?

----------

## grzewho

here`s my tip:

to disable xscreensaver during mplayer`s playback add

```
stop_xscreensaver=yes
```

to your .mplayer/config file

----------

## 0ctane

I have been having trouble viewing AVIs with mplayer so I figured I should upgrade.  I had a strange error pop up when trying to emerge the latest mplayer.  I was trying to emerge it, but would get some sort of error.  So I figured my problem might be quicktime related.  I added quicktime to my USE list in make.conf.  I got this new error after emerging the latest quicktime.

```
bash-2.05b# emerge -u mplayer

Calculating dependencies ...done!

!!! Error: the <dev-perl/File-Spec-0.84-r1 package conflicts with this package and both can't be installed on the same system together.
```

Any ideas?  BTW, here is my current version info from "emerge -p mplayer":

```
[ebuild    U ] media-video/mplayer-0.90-r2 [0.90_rc5]
```

[edit]

Well, I am now at mplayer-1.0pre2 so my problems emerging are not an issue anymore.

----------

## joseh

 *Quote:*   

> 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)

 

Uh.. how?

----------

## evoweiss

Hi,

This seems like the appropriate thread to ask this and, if not, please feel free to bash me about the head  :Razz: .

I have gotten video to work pretty well save in one area, i.e., video off the internet (I'm using konqueror as my browser). The video for a movie trailer comes through just dandy, but I get no audio.

The problem appears to be that the command konqueror uses to bring up mplayer does not have a 9 after the -ao alsa. Hence, it's trying to output to a sound system that is not recognized.

mplayer -wid 33557770 -slave  -vo xv -ao alsa [snipped rest]

Does anybody know which configuration file is behind the execution of this command so that I can fix it in about 2 seconds?

Best,

Alex

----------

## joseh

 *Quote:*   

> mplayer -wid 33557770 -slave -vo xv -ao alsa [snipped rest] 

 

That line is in the kmplayer source. Upgrade, try adding the command line option in kmplayer, or change the source and recompile. I'd recommend upgrading both kmplayer and mplayer and simply changing the audio driver from the configuration dialog.

----------

## evoweiss

Hi,

Ok, I tried to re-emerge kmplayer (8.1) and this did not resolve the problem. Unfortunately, I am not that adept at modifying the source code, recompiling, etc., so I wouldn't know where or with what file to start.

Best,

Alex

----------

## evoweiss

P.S. - I tried to use the command line option and it didn't help any.

----------

## joseh

First, I use the CVS version of KMplayer with mplayer 1.0pre3-3.2.3. If you don't have these following options or equivalents, then you won't be able to change the command line to run mplayer.

first option :

```
Settings -> Configure KMPlayer -> General Options -> Output -> Audio driver
```

change to Default from MPlayer Config, then add 'ao=alsa9' to ~/.mplayer/config

second option:

Make sure to add the '-ao alsa9' option to the edit box at 

```
Settings -> Configure KMPlayer -> General Options -> Mplayer -> Additional command line arguments
```

Doing the second option even works for my version, so I'd try to find that in the options to your version.

----------

## joseh

First, I use the CVS version of KMplayer with mplayer 1.0pre3-3.2.3. If you don't have these following options or equivalents, then you won't be able to change the command line to run mplayer.

first option :

```
Settings -> Configure KMPlayer -> General Options -> Output -> Audio driver
```

change to Default from MPlayer Config, then add 'ao=alsa9' to ~/.mplayer/config

second option:

Make sure to add the '-ao alsa9' option to the edit box at 

```
Settings -> Configure KMPlayer -> General Options -> Mplayer -> Additional command line arguments
```

Doing the second option even works for my version, so I'd try to find that in the options to your version.

----------

## joseh

Oops. Double post. You should probably also file a bug report at bugs.gentoo.org and recommend that the maintainer add a patch to the kmplayer ebuild (which would be very simple), so others don't experience the same trouble. Doing so would be very helpful.

----------

## evoweiss

That did the trick, it's working now.

Alex

----------

## evoweiss

Hi,

I submitted the bug to bugzilla. Let's hope it's taken care of and thanks again.

Alex

----------

## hiroki

hi!

when trying to download a trailer f.i. from http://www.apple.com/trailers/wb/scooby_doo_2/ the output of

```
mencoder -oac copy -ovc copy -o ScoobyDoo2.mov <LONG URL>
```

is 

```
MEncoder 1.0pre3-3.3.2 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Duron MG Morgan 801.5 MHz (Family: 6, Stepping: 0)

Detected cache-line size is 64 bytes

CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0

Kompiliert für x86 CPU mit folgenden Erweiterungen: MMX MMX2 3DNow 3DNowEx SSE

Reading /home/norman/.mplayer/codecs.conf: Can't open '/home/norman/.mplayer/codecs.conf': Datei oder Verzeichnis nicht gefunden

Reading /usr/share/mplayer/codecs.conf: 61 audio & 169 video codecs

Datei nicht gefunden: 'frameno.avi'

Failed to open frameno.avi

Reading config file /home/norman/.mplayer/mencoder: Datei oder Verzeichnis nicht gefunden

font: can't open file: /home/norman/.mplayer/font/font.desc

Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)

Resolving a772.g.akamai.net for AF_INET6...

Couldn't resolve name for AF_INET6: a772.g.akamai.net

Resolving a772.g.akamai.net for AF_INET...

Connecting to server a772.g.akamai.net[212.23.33.32]:80 ...

Cache size set to 320 KBytes

Verbunden mit Server: a772.g.akamai.net

success: format: 7  data: 0x0 - 0x0

MOV: Reference Media file!!!

QuickTime/MOV-Dateiformat erkannt!

Video stream is mandatory!

Exiting...
```

when using 

```
mencoder -dumpstream -dumpfile scooby.mov <LONG URL>
```

mencoder simply terminates (the same way as above) but the last 2 lines are:

```
Stream not seekable!

Core dumped ;)

```

what i can i do?

hiroki

----------

## discostu

http://www.digitaltutors.com/ (a website for Maya tutorial videos) has some free videos in .MOV format. First a short advertisement .MOV plays, then you're supposed to click on it and it goes to the tutorial .MOV video. It doesn't work with mplayerplug-in. On the page source there is an <embed> tag with src="../path/to/advertisement.mov" href="../path/to/maya/tutorial.mov". Sometimes the advertisment movie runs, other times it hangs at 97% or says stopped. I can download the advertisement with wget, but they use some fancy thing to block from downloading the tutorial.mov directly with wget (unless all of their links are broken, which I doubt since it's a professional site). I used to be able to use wget to get them, but not now. Anyway, does anybody no if this can work with mplayerplug-in? The gxine plugin doesn't work either. It says something about demuxer not found.

Thanks,

Stu

----------

