MPlayer + VDPAU + Divx = Fail

This problem was reported by somebody else over at Packman’s mailing list but got no response.

[packman] MPlayer issues with DivX and VDPAU](http://lists.links2linux.de/pipermail/packman/2011-January/009313.html)

The current mplayer cannot play divx videos using vdpau. It tries to force the use of ffodivxvdpau even though it’s not supported on certain video cards. I downgraded mplayer and it’s working fine but smplayer doesn’t support the old mplayer without ignoring warnings from yast.

I’ve been using vdpau for over a year and never had a problem until now.

Nobody else having this problem?

BTW, I’m using 11.3 and nvidia 8200 gpu.

I use vdpau a lot (on two different PCs). I don’t know if I have a problem.

Can you point to a specific video file on the web that I can download and test (try to play with vdpau) to see if I have a problem ?

Here’s a sample video that I cannot play:

Sample Movies

I tried that first one Divx AVI. I can play it with xv but not with vdpau.

I think this problem only affects cards with feature set A or B.

Nvidia PureVideo - Wikipedia, the free encyclopedia

Ahh… yes it turns out I can not test this. I note from Phoronix : [Phoronix] NVIDIA 190.32 Beta Brings New VDPAU Features](NVIDIA 190.32 Beta Brings New VDPAU Features - Phoronix)

My 32-bit PC has a nVidia 8400GS. Cleary that won’t play the new formats.

My Intel Core i7 920 PC has a nVidia GTX 260 … which is NOT the same as a GTS 260M. Hence that won’t play the new formats.

My wife’s Intel Core i7 860 PC has a nVidia G210 which is NOT the same as a G210M. Thus I can’t check if mplayer is functioning for DivX.

Sorry.

On second thought, looking at the table in the web page you quoted: Nvidia PureVideo - Wikipedia, the free encyclopedia My wife’s PC’s nVidia G210 does have the ‘feature set C’, even though her hardware is not mentioned in the Phoronix article. So I guess when she allows me access, I could try to test this on her PC - although that begs the question, is that update limited to ‘feature set C’ or limited even further to the hardware noted by Phoronix ?

I tested my wife’s PC with the G210 nVidia hardware, and it turns out it works fine with Vdpau and divx and xvid ! :slight_smile:

I tested the divx video you noted from here: Sample Movies … specifically this one: AVI_DVI_DivX.avi

I also tested an xvid sample called sample.avi from this underlined location.

To play, I used the commands:

mplayer -vo vdpau -vc ffodivxvdpau AVI_DVI_DivX.avi
mplayer -vo vdpau -vc ffodivxvdpau sample.avi

some detail on my wife’s openSUSE hardware/configuration … Her PC is running openSUSE-11.3 - 2.6.34.7-0.7-default x86_64 w/KDE-4.4.4. ‘release 3’ and for software she has:

MPlayer-1.0rc4_r32749-1.pm.2.2.x86_64
libvdpau1-0.4-5.6.x86_64

Here hardware is:

01:00.0 VGA compatible controller [0300]: nVidia Corporation GT218 **GeForce 210**] [10de:0a65] (rev a2)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8334]
        Kernel driver in use: nvidia

where that hardware has vdpau feature set ‘3’.

… and it turns out she does not have the very latest nVidia driver, but rather has the proprietary NVIDIA-260.19.29 driver (which is one before the latest). Her driver was installed ‘the hardway’ (which is NOT hard).

One note about the proprietary nVidia driver, … my experience with openSUSE is after one does a fresh install of the proprietary nVidia driver, to use vdpau it is necessary to re-install (each time) libvdpau1-0.4-5.6.x86_64 (or what ever the latest ‘libvdpau1’ version may be).

Either I do not understand what this user is complaining about, or they made a mistake.

My wife’s mplayer that has feature set C can play the videos with vdpau, and my PC which is not feature set C can play the videos without vdpau. By default mplayer does NOT use vdpau (but smplayer does use vdpau by default). When I type “mplayer sample.avi” on a PC with nVidia vdpau feature set b, the video plays with no problem (not using vdpau). MPlayer does NOT default to vdpau as the user incorrectly noted. At least it does not do so on my PC.

This problem was reported by somebody else over at Packman’s mailing list but got no response.

[packman] MPlayer issues with DivX and VDPAU

The current mplayer cannot play divx videos using vdpau. It tries to force the use of ffodivxvdpau even though it’s not supported on certain video cards. I downgraded mplayer and it’s working fine but smplayer doesn’t support the old mplayer without ignoring warnings from yast.

I’ve been using vdpau for over a year and never had a problem until now.

Nobody else having this problem?

BTW, I’m using 11.3 and nvidia 8200 gpu.

Yes, I’ve also run into this. I’ve been useing XV for some time now instead.

One note about the proprietary nVidia driver, … my experience with openSUSE is after one does a fresh install of the proprietary nVidia driver, to use vdpau it is necessary to re-install (each time) libvdpau1-0.4-5.6.x86_64 (or what ever the latest ‘libvdpau1’ version may be).

Thanks, I hadn’t thought about that. It seems to solve problems regarding other codecs and VDPAU.

By default mplayer does NOT use vdpau (but smplayer does use vdpau by default). When I type “mplayer sample.avi” on a PC with nVidia vdpau feature set b, the video plays with no problem (not using vdpau). MPlayer does NOT default to vdpau as the user incorrectly noted. At least it does not do so on my PC.

I think you might be wrong, mine does infact set itself to use VDPAU by default and I do not use SMPlayer/KMplayer etc.

Cheers,
Olav

Let me give an example of the problem.

With the old mplayer I can play a divx video like this:

mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffwmv3vdpau,ffvc1vdpau, test.avi

If the video is supported by one of the codecs listed, it will select that codec otherwise it’ll try some other codec. In this example (divx video), the old mplayer will select ffodivx and play the video. The new mplayer will select ffodivxvdpau, which isn’t supported on my card, and it won’t play the video.

The workaround is to:

-use xv all the time
-keep switching between xv and vdpau
-downgrade to the old mplayer (this is what I did)

I do not have xv specified in any ~/.mplayer config file.

To play a video without vdpau I simply type:

mplayer test.avi 

and with that on a feature set A (GTX 260) or feature set B (8400GS) nVidia card (or indeed on a nVidia card with no vdpau at all (FX5200)) I can play the DivX or XviD videos.

IF instead I try:

mplayer -vo vdpau -vc ffodivxvdpau test.avi 

the video will NOT play on my hardware with a feature set A (GTX 260) nor feature set B (8400GS) nor on a card with no vdpau (FX5200).

BUT it WILL play (with that command) on my wife’s PC which has feature set C (G210).

So that reads to be nominal behaviour to me. And its tested on 4 PCs with different nVidia hardware. There was no need to downgrade to any different mplayer version.

I do not know what you have done to cause that behaviour. Look at my post above, and description how this works. It appears nominal to me on 4 PCs all with different hardware: FX5200 (no vdapu), GTX 260 (feature set A), 8400Gs (feature set B), G210 (feature set C).

I do not know what you have done to cause that behaviour. Look at my post above, and description how this works. It appears nominal to me on 4 PCs all with different hardware: FX5200 (no vdapu), GTX 260 (feature set A), 8400Gs (feature set B), G210 (feature set C).

A possible misunderstanding, I do use the default MPlayer gui which default to VDPAU.

This is from command line:

olav@localhost:~/Multimedia/Video/Film> mplayer "Asylum (1972).avi"Creating config file: /home/olav/.mplayer/config
MPlayer dev-SVN-r32749-4.4-openSUSE Linux 11.2 (x86_64)-Packman (C) 2000-2010 MPlayer TeamCan't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing Asylum (1972).avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [DX50]  592x320  24bpp  25.000 fps  988.8 kbps (120.7 kbyte/s)
Clip info:
 Software: VirtualDubMod 1.5.10.1 (build 2439/release)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 32000 Hz, 2 ch, s16le, 128.0 kbit/12.50% (ratio: 16000->128000)
Selected audio codec:  afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 32000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[mpeg4 @ 0xcc0de0]Invalid and inefficient vfw-avi packed B frames detected
Movie-Aspect is 1.85:1 - prescaling to correct movie aspect.
VO: [vdpau] 592x320 => 592x320 Planar YV12 

So that reads to be nominal behaviour to me. And its tested on 4 PCs with different nVidia hardware. There was no need to downgrade to any different mplayer version.

The old mplayer can play any file with vdpau. That single line code I wrote in my previous post could play anything, but not anymore with the new mplayer. For me this is a good enough reason to downgrade to the old version.

Hopefully, this will be fixed in the next update.

BTW, how do you use vdpau? Do you use the command line and type out the video codec everytime you want to use it? Do you have it set up in the config file?

I rarely run vdpau from command line. I do not have vdpau in an mplayer config file, although it can be in an smplayer config file from time to time.

IMHO use of VDAPU really only makes any significant difference with my 32-bit athlon-2800 which needs VDPAU’s HD acceleration (offloading decode from CPU to GPU) for HD videos. The other 2 VDPAU capable PCs are both Core i7’s and they do not need VDPAU to play even the highest nominal HD bit rate videos.

So normally, we don’t need to use VDPAU.

Typically we (my wife and I) do not watch videos on my wife’s Core i7 860 (as her speakers are not as good as mine, and her PC is not in a location that is good for us to watch videos). Rather we watch most videos on my Intel Core i7 920. So only in cases when my Core i7 920 is busy encoding a large video project (with different software) do I prefer to use my 32-bit athlon w/VDPAU to watch a video. That happens reasonably often, as I will often run a batch job with the wine/virtual-dub/deshaker-plugin combination that can tie up my Core i7 920 for 12 hours or more.

On those occasions, I will use my 32-bit athlon-2800 w/nVidia 8400 GS (feature-set-B) to play a video. Before I play any video file on that PC, I usually have a very good idea as to what video codec it is using. Note I am not talking a browser/streaming video, as those play fine without vdpau. Its only a downloaded HD or family HD video. So its easy to find out what codec such a video happens to be, and based on that if not HD I may (or may not) use vlc (which does not support vdpau in current Packman version), or if it is definitely HD at a high bit rate I need to use VDPAU with mplayer/smplayer. So then I will launch smplayer with vdpau selected as an output video mode.

Only when testing and trying to prove a point do I normally resort to the command line for mplayer with the " -vc " and " -vo " options.

But I think I am reasonably pragmatic, and I use what works. To change from one output mode to another takes a handful (less than 5) seconds, and I have to do that so rarely, its not an issue for me to change a video mode if need be. My experience is the users with the most problems typically are those with the least experience in knowing the options or those who stubbornly stick to only one player/application (which sort of makes sence that if they are not willing to use different methods, they would find most problems on their favourite application more irritating).

The OTHER way I use vdpau on my athlon-2800 is on occasion (very rarely) I will edit a video project with kdenlive, where kdenlive uses vdpau :slight_smile: for video decoding which is handy.

It might help if you explained EXACTLY what Packman version is the “OLD” version and EXACTLY what Packman version is the “NEW” version in one summary post as to opposed to forcing users to scan trhough over a dozen posts to try and figure out what is meant. I just did a quick scan and I can’t tell.

For me this started a couple of upgrades ago, I can’t tell precisely. The latest version available from packman should be this one:

MPlayer dev-SVN-r32749-4.4 (released three days ago)

That is on my OS11.2 anyway, but I suppose 11.2 and 11.3 follows the same (mplayer) upgrade pattern.

And, oldcpu, I can confirm that MPlayer does start with VDPAU by default on my system: MSI NX8600GT NVIDIA Geforce, should be in the A category.

If the video is supported by one of the codecs listed, it will select that codec otherwise it’ll try some other codec. In this example (divx video), the old mplayer will select ffodivx and play the video. The new mplayer will select ffodivxvdpau, which isn’t supported on my card, and it won’t play the video.

Perhaps you could try and upgrade to the latest available MPlayer, released three days ago. If you look at my post above with the terminal output, MPlayer chooses the ffodivx while in VDPAU mode. However, running it from the gui it chooses this:

olav@localhost:~/Multimedia/Video/Film> gmplayer
MPlayer dev-SVN-r32749-4.4-openSUSE Linux 11.2 (x86_64)-Packman (C) 2000-2010 MPlayer TeamCan't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Loading extension-related profile 'vo.vdpau'

Playing /home/olav/Multimedia/Video/Film/Asylum (1972).avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [DX50]  592x320  24bpp  25.000 fps  988.8 kbps (120.7 kbyte/s)
Clip info:
 Software: VirtualDubMod 1.5.10.1 (build 2439/release)
==========================================================================
Forced video codec: ffmpeg12vdpau
Forced video codec: ffwmv3vdpau
Forced video codec: ffvc1vdpau
Forced video codec: ffh264vdpau
Forced video codec: ffodivxvdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] Trying pixfmt=0.
[vdpau] Failed creating VDPAU decoder: An invalid/unsupported VdpDecoderProfile value was supplied.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Selected video codec: [ffodivxvdpau] vfm: ffmpeg (FFmpeg MPEG-4,DIVX-4/5 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 32000 Hz, 2 ch, s16le, 128.0 kbit/12.50% (ratio: 16000->128000)
Selected audio codec:  afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xcc0de0]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!

FATAL: Could not initialize video filters (-vf) or video output (-vo).

Loading extension-related profile 'vo.vdpau'

So it seems to work running it from Konsole, but has some settings to the gui.config which forces the use of mpeg4_vdpau (in this case) and crash it when trying to run it from gui.

Just correct me if I interpret this wrongly oldcpu.

Its possible I have this wrong but I am not yet convinced of this.

I just tried to play the video (with my Core i7 920 w/8400GS (feature setA) that I noted above sample.avi:


oldcpu@core-i7:~/temp> **mplayer sample.avi** 
MPlayer dev-SVN-r32749-4.5-openSUSE Linux 11.3 (x86_64)-Packman (C) 2000-2010 MPlayer TeamCan't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing sample.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [XVID]  640x272  12bpp  25.000 fps  258.7 kbps (31.6 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
**Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)**
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 32.0 kbit/2.08% (ratio: 4000->192000)
Selected audio codec:  afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 2.35:1 - prescaling to correct movie aspect.
**VO: [vdpau] 640x272 => 640x272 Planar YV12 **
A:   0.9 V:   5.2 A-V: -4.290 ct: -0.516 131/131  4%  4%  0.3% 4 0 
..........

and it played ok. Note the vdpau references.

The version of MPlayer and vdpau:

MPlayer-1.0rc4_r32749-1.pm.2.2.x86_64
libvdpau-devel-0.4-5.6.x86_64                                                                                                                                                              
libvdpau1-0.4-5.6.x86_64

Typically if I wish to use vdpau from mplayer I am in the habit of directly specifying it with the ’ -vc ’ and ’ -vo’ options, and if I try:


oldcpu@core-i7:~/temp> **mplayer -vo vdpau -vc ffodivxvdpau sample.avi** 
MPlayer dev-SVN-r32749-4.5-openSUSE Linux 11.3 (x86_64)-Packman (C) 2000-2010 MPlayer TeamCan't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Loading extension-related profile 'vo.vdpau'

Playing sample.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [XVID]  640x272  12bpp  25.000 fps  258.7 kbps (31.6 kbyte/s)
==========================================================================
Forced video codec: ffmpeg12vdpau
Forced video codec: ffwmv3vdpau
Forced video codec: ffvc1vdpau
Forced video codec: ffh264vdpau
Forced video codec: ffodivxvdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] Trying pixfmt=0.
[vdpau] Failed creating VDPAU decoder: An invalid/unsupported VdpDecoderProfile value was supplied.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Selected video codec: [ffodivxvdpau] vfm: ffmpeg (FFmpeg MPEG-4,DIVX-4/5 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 32.0 kbit/2.08% (ratio: 4000->192000)
Selected audio codec:  afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!
[mpeg4_vdpau @ 0xc7a200]decoding to PIX_FMT_NONE is not supported.
Error while decoding frame!

FATAL: Could not initialize video filters (-vf) or video output (-vo).

Exiting... (End of file)

where that command DOES work on my wife’s PC with the G210 (feature set C).

So it works with just mplayer and no vdpau option in command line specified on a feature setA. If I specify the option it does not work (as expected) but there are vdpau references .

I’ll try my 8400GS (feature set B) next.