PDA

View Full Version : poor video playback in mplayer, vlc, and patched mplayer


collapsed
December 23rd, 2007, 07:35 AM
When I run video, I find that it is somewhat laggy with some occasional tearing or frame loss. Most of the videos that I have are in 720p or 1080p mkv files, and I experience it most when I play these types of files. Rarely do I notice this when playing regular DVD's or divx files.

OK, so when I try videos in mplayer or VLC, the effect of the lag is quite noticeable.
When I use the patched version of mplayer (http://smspillaz.wordpress.com/2007/10/18/unlocking-the-full-video-potential-of-your-video-card/), I do notice some performance gains, but there is still some occasional lag and tearing. Also, the audio often gets out of sync after a few minutes.
With the patched mplayer, I also often get these two errors:
Too many video packets in the buffer:
and
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
often times, after these errors compiz will crash.

Here are my specs.
Intel C2Duo E6600 @2.4Ghz
nVidia GF 7950GT PCIe
2GB Corsair XMS
2x WD Raptor 10000rpm, RAID0
I am running Gentoo2007.0 amd64, and using nvidia-drivers-100.14.19

Obviously my computer should be fast enough to run 720p and 1080p. I never had any issues in either Windows XP or Vista running videos of this resolution.

Any thoughts?

FYI, is this helps, this is how I run compiz:
compiz --indirect-rendering --sm-disable --replace ccp &

lmk if anyone would want to see any of my xorg.conf.

collapsed
January 3rd, 2008, 09:42 PM
any thoughts on this? need any additional information?

bump

Fyda
January 4th, 2008, 07:57 AM
I'm not sure I could help, but just to be certain: have you read the VideoPlayback (http://wiki.compiz-fusion.org/VideoPlayback) page at the Compiz Fusion Wiki (http://wiki.compiz-fusion.org)? Also, to get the benefits from the patched mplayer, the Video Playback (http://wiki.compiz-fusion.org/Plugins/Video) plugin needs to be enabled.

Also, I'm fairly certain the second error about the missing/unloadable subtitle font is an issue with your mplayer configuration, unrelated to Compiz. Presumably, it's looking for a font file at ~/.mplayer/subfont.ttf, which would be used to render subtitles during video playback (where applicable).

collapsed
January 4th, 2008, 07:21 PM
I'm not sure I could help, but just to be certain: have you read the VideoPlayback (http://wiki.compiz-fusion.org/VideoPlayback) page at the Compiz Fusion Wiki (http://wiki.compiz-fusion.org)? Also, to get the benefits from the patched mplayer, the Video Playback (http://wiki.compiz-fusion.org/Plugins/Video) plugin needs to be enabled.

Also, I'm fairly certain the second error about the missing/unloadable subtitle font is an issue with your mplayer configuration, unrelated to Compiz. Presumably, it's looking for a font file at ~/.mplayer/subfont.ttf, which would be used to render subtitles during video playback (where applicable).

I have tried the settings from the Video Playback page, but notice that MPlayer will not enlarge the screen at all when using X11 ( XImage/Shm.) Instead, I get the video playing at normal size inside of a fullscreen black box. Also, the picture quality gets kinda blocky. I have checked to make sure that the setting is enabled in CCSM, also. In MPlayer, I recieve best results using the standard opengl output. FYI I am using MPlayer 1.0_RC2 for the patch. I also have MPlayer-bin 1.0_RC2 installed, but performance is less in this player. I have this one installed so that I could force it to compile with USE=Win32codecs for Gentoo2007.0 x86_64.

So far as VLC goes, I have tried running through all of the output modules, and find that it works best if I just leave it at default. If I switch to X11, then the image quality of the video drops right off just as it did in MPlayer, and I notice that the performance does not increase at all. I am however able to get it to go fullscreen, and not just a small video in a big black box. So in this respect VLC works much better. Also, In VLC, If I try using the Opengl output module, it instantly crashes when I press play.

CPU usage is around 47% when playing a DVD or even a 720p video, so I know that my hardware is powerful enough to play these types of videos. If I disable compiz and play the same videos, performance increases considerably, however I still don't think that it compares to the quality and smoothness that I noticed in any versions of Windows. This seems counter-intuitive because in Windows I would experience CPU usage of nearly 70%+ when playing 720p video, whereas in Gentoo it is only 47%.

Do you think that changing to a beta graphics driver may help with some of these issues? I am currently using 100.14.19, and I know that version 100.14.23 is now masked in portage, and beta versions 169.04, and 169.07 are also available.

Some additional information, and I dont know if this helps. I am using xorg-X11 7.3 and xorg-server 1.4.0.90.

coz
January 5th, 2008, 03:06 AM
Hey collapsed,
I am running ubuntu / gnome / nvidia / 169.07 driver and using the patched mplayer with no issues , so..
First, yeah upgrade to the 169.07 driver.
Then open mplayer , I use the gui version for this, right click the main window go to "preferences'
then the video tab. Under video tab try the xv X11/Xv option...then move over to the Codecs & demuxer tab... Video codec family =FFmpeg's libavcodec codec family
Audio codec family = MPEG layer-2, layer-3
What I then do it "disable" the video playback plugin in ccsm. I get full screen videos no issues.
restart mplayer for the settings to take effect and give it a try.
I am not sure why, however disabling the video playback plugin in ccsm seems to work better at least on this system.

let me know

coz

kreon28
January 5th, 2008, 01:09 PM
I have the same problem even with the newest nvidia drivers. I think it's an emerald bug or sth.
If some divx has bitrate over 900 kb/s the picture isn't smooth.
Under kwin and without compiz-fusion it worked perfect.

collapsed
January 6th, 2008, 07:40 AM
Hey collapsed,
I am running ubuntu / gnome / nvidia / 169.07 driver and using the patched mplayer with no issues , so..
First, yeah upgrade to the 169.07 driver.
Then open mplayer , I use the gui version for this, right click the main window go to "preferences'
then the video tab. Under video tab try the xv X11/Xv option...then move over to the Codecs & demuxer tab... Video codec family =FFmpeg's libavcodec codec family
Audio codec family = MPEG layer-2, layer-3
What I then do it "disable" the video playback plugin in ccsm. I get full screen videos no issues.
restart mplayer for the settings to take effect and give it a try.
I am not sure why, however disabling the video playback plugin in ccsm seems to work better at least on this system.

let me know

coz

Indeed, switching to X11/Xv with the corresponding codecs suggested makes video more smooth, however its still not perfect as I am still experiencing some slight lag or frame loss. (Only tested with a 720p mkv, so I can imagine it is more noticeable with a 1080p video.) After the change in settings, CPU utilization is up to ~51%, as well. I guess that may be a good thing depending on how you look at it.

With respect to the emerald comment, I haven't had any issues with emerald at all. Starting and stopping emerald makes no difference whatsoever.

I will try updating to the latest nvidia drivers as soon as I get some time. I have never tried doing an overlay with portage before, so it may be a bit of a challenge for me.

Deciare
January 6th, 2008, 09:11 AM
I don't have a solution to your problem, but I have some information about using MPlayer with the x11 output.

I have tried the settings from the Video Playback page, but notice that MPlayer will not enlarge the screen at all when using X11 ( XImage/Shm.) Instead, I get the video playing at normal size inside of a fullscreen black box. Also, the picture quality gets kinda blocky.
MPlayer is capable of software scaling videos to fit the whole screen when using the x11 output. Start mplayer with the -zoom parameter to achieve that. Alternatively, you may add the following line to your ~/.mplayer/config file:
zoom = on

Unfortunately, since it is software scaling, the blockiness may become even more evident... But at least it should be fast!

eneru
January 13th, 2008, 07:19 PM
the zoom option is very CPU hungry though...
To avoid out of sync problems between audio and video, you can also add "framedrop = yes". It won't ameliorate the quality, but at least the video won't be far behind if your computer cannot manage it properly (I do have problems with videos and compiz too).