Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No video when I'm trying to use VDPAU in mplayer #324

Closed
NicholasShatokhin opened this issue Feb 4, 2013 · 6 comments
Closed

No video when I'm trying to use VDPAU in mplayer #324

NicholasShatokhin opened this issue Feb 4, 2013 · 6 comments

Comments

@NicholasShatokhin
Copy link

Ubuntu 12.10
Lenovo Ideapad Y570 (with hack installed)

When I'm trying to watch movie with VDPAU I see NV-GLX error:

robotex@robotex-laptop:/media/truecrypt1$ optirun mplayer -vo vdpau -vc ffmpeg12vdpau movie.mp4 
MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team
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 movie.mp4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  704x394  24bpp  29.970 fps  1041.2 kbps (127.1 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 1
 compatible_brands: isomavc1
 creation_time: 2013-01-24 11:09:18
Load subtitles in .
Xlib:  extension "NV-GLX" missing on display ":0.0".
Xlib:  extension "NV-GLX" missing on display ":0.0".
[vdpau] Error when calling vdp_device_create_x11: 1
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 124.7 kbit/8.12% (ratio: 15593->192000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   3.5 (03.5) of 12539.9 ( 3:28:59.8)  0.2% 


MPlayer interrupted by signal 2 in module: unknown
[  248.524409] [WARN]Received Interrupt signal.

Exiting... (Quit)
robotex@robotex-laptop:/media/truecrypt1$ primusrun mplayer -vo vdpau -vc ffmpeg12vdpau movie.mp4 
MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team
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 movie.mp4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  704x394  24bpp  29.970 fps  1041.2 kbps (127.1 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 1
 compatible_brands: isomavc1
 creation_time: 2013-01-24 11:09:18
Load subtitles in .
Xlib:  extension "NV-GLX" missing on display ":0.0".
Xlib:  extension "NV-GLX" missing on display ":0.0".
[vdpau] Error when calling vdp_device_create_x11: 1
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 124.7 kbit/8.12% (ratio: 15593->192000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   2.6 (02.5) of 12539.9 ( 3:28:59.8)  0.2% 


MPlayer interrupted by signal 2 in module: unknown

Exiting... (Quit)```
@amonakov
Copy link
Contributor

amonakov commented Feb 4, 2013

Bumblebee does not offer VDPAU offloading, only OpenGL offloading. Intel GPU also has decent support for hardware video decoding, supported in software via libva.

@gua1
Copy link

gua1 commented Feb 5, 2013

This has always been an issue with Bumblebee, even in the dark olden days [0] and it hasn't been looked into in quite a while (commits on hybrid-windump and LLStarks' last videos for example, all around 2011). It's been a while since I've looked into this but I'll try to dig up what I know for others searching about this issue.

Afaik the actual fix to get VDPAU is pretty involved and basically requires that the proprietary driver gets deeper access, either through DMA-BUF or (what it seems nvidia is doing now) by writing their own version of DMA-BUF.

The only workaround I've found currently is to use windump [1] / hybrid-windump [2], most recently promoted / sorta-maintained by the awesome @LLStarks (but who seems to have deleted his github profile since last I looked[3], but @LLStarks might have not committed anything and could just be the work of @erappleman, either way I just uploaded the latest I got from @LLStarks' github repo of it [4]. A quick perusal comparing commits of mine vs @erappleman shows they're the same, but eh, consider mine a mirror). Also for Gentoo user's there's [10].

hybrid-windump helps you create a virtualgl thing that a window on your desktop is created for, so you can see the accelerated stuff. The youtube videos linked by the Windump wikipage [1] are very good, along with another video or two on LLStarks' youtube [5], specifically the following (I have saved copies of the videos and youtube pages with comments, so if any go down just ping me. Also some of the videos are green, but I listed all the ones I found that are relevant to VDPAU, either way it's a wealth of good information): [6].

So definitely use @erappleman's stuff, rather than @harp1n's. I don't know the specifics I just know the one I used worked and is newer.


Personally after getting hybrid-windump working and comparing FPS stuff, I just used libva and the Intel HD 4000 in my CPU. Since the main reason I wanted it is because I have this weird semi-tearing issue where it's as if some part of the graphics stack isn't keeping up enough, and VDPAU plus hybrid-windump didn't fix that. So libva works well enough with vlc. (Although as soon as the proprietary Nvidia driver, or nouveau gets good enough, I'll switch back to my favorite combination of VDPAU and SMPlayer.)

Though before DMA-BUF or a DMA-BUF-like thing happens (which I guess is being worked on, according to occasional [recent] Phoronix articles mentioning DMA-BUF), adding hybrid-windump to the main Bumblebee repository and adding more documentation and general support for using it would be nice [7][8].


Also this bug is good, to have a more recent place to consolidate information, perhaps bits from these bugs would be relevant here: [7][8][9][10].


Btw semi-offtopic just to put it out there, I've always read and pronounce "VDPAU" as "vee dee pow", so people should feel fine saying it that way.

[0] MrMEEE/bumblebee-Old-and-abbandoned#16
[1] https://github.com/Bumblebee-Project/Bumblebee/wiki/Windump
[2] https://github.com/erappleman/hybrid-windump
[3] https://www.google.com/search?q=hybrid-windump+llstarks
[4] https://github.com/gua1/hybrid-windump
[5] https://www.youtube.com/user/tehstarks/videos
[6] https://gist.github.com/gua1/4712451
[7] MrMEEE/bumblebee-Old-and-abbandoned#16
[8] MrMEEE/bumblebee-Old-and-abbandoned#531
[9] #36
[10] #169

@ArchangeGabriel
Copy link
Member

JFYI: @erappleman = @LLStarks (he has only changed his pseudo).

@starks
Copy link
Member

starks commented Feb 5, 2013

Windump is really only useful as a proof of concept.

Yes, you are decoding using VDPAU, but you're then using the CPU to copy everything from the dGPU to the screen instead of a memory buffer like dma-buf aims to do.

It's just a waste of resources considering that most Optimus laptops would be better served using CPU decoding or VAAPI.

@gua1
Copy link

gua1 commented Feb 5, 2013

Thanks for the clarification @ArchangeGabriel, good to know, and thanks for the reply @erappleman.

So is Bumblebee's official stance waiting for DMA-BUF or a DMA-BUF-like solution to land in the Linux kernel and proprietary nvidia driver? (If so maybe that should be said in some FAQ or documentation somewhere)

How likely is integratating hybrid-windump into the Bumblebee Project, or is CPU decoding / VAAPI good enough and people are directed to use that?

I haven't done or seen benchmarks, but maybe even with the overhead / waste of resources the performance one gets could be significant enough to support using hybrid-windump in the meantime before DMA-BUF.

@ArchangeGabriel
Copy link
Member

Bumblebee is still developing a little (see latest 3.1 release for example), although most of the work is now made on primus by @amonakov.

CPU decoding and VAAPI should work perfectly fine on every computer that has Optimus (the less powerfull one that does exist is mine, and it works with Blu-Rays and 1080p files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants