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

vdpau: Requested hardware decoder not compiled. Using software decoding. #3657

Closed
tsoernes opened this issue Oct 12, 2016 · 36 comments
Closed

Comments

@tsoernes
Copy link

tsoernes commented Oct 12, 2016

I'm using mpv-build to pull newest mpv and ffmpeg from github and install.

While trying to play with --vo=vdpau --hwdec=vdpau I get

[vd] Opening video decoder lavc:h264
[vd] Probing 'vdpau'...
[vd] Requested hardware decoder not compiled.
[vd] Using software decoding.

mpv -V:

mpv git-b5357e8 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
 built on Wed Oct 12 07:20:35 CEST 2016
ffmpeg library versions:
   libavutil       55.32.100
   libavcodec      57.61.102
   libavformat     57.51.106
   libswscale      4.1.100
   libavfilter     6.63.100
   libswresample   2.2.100
ffmpeg version: N-81972-g8063978

Full verbose mpv play log:
mpv log2.txt

ffmpeg_options:

--enable-vdpau
--enable-vda

mpv/build/config.log:
config .txt

Notice these lines:

Checking for libavcodec VAAPI hwaccel                                : yes 
Checking for libavcodec videotoolbox hwaccel                         : no 
Checking for Videotoolbox with OpenGL                                : videotoolbox-hwaccel, gl-cocoa not found 
Checking for libavcodec VDPAU hwaccel                                : no 

vdpauinfo:
vdpauinfo.txt

@mia-0
Copy link
Member

mia-0 commented Oct 12, 2016

Build FFmpeg with VDPAU support.

@mia-0 mia-0 closed this as completed Oct 12, 2016
@tsoernes
Copy link
Author

tsoernes commented Oct 12, 2016

As you can see I added --enable-vdpau to ffmpeg_options, do I need to do anything else?
Also, it is built with VDPAU, but not with libavcodec VDPAU accel whatever that is.

Checking for VDPAU acceleration                                   : yes 
Checking for VDPAU with OpenGL/X11                                : yes 
Checking for libavcodec VDPAU hwaccel                                : no

@igv
Copy link
Contributor

igv commented Oct 12, 2016

Use ffmpeg release.

@tsoernes
Copy link
Author

Incredible! ./use-ffmpeg-release did the trick. Thanks!

@mc4man
Copy link

mc4man commented Oct 14, 2016

likely what's seen in issue #3664

@sleeksorrow
Copy link

I have the same issue when using ffmpeg release, too. Is it possible the ffmpeg bug now has been released as stable? ffmpeg people see this as an mpv bug (https://ffmpeg.org/pipermail/ffmpeg-user/2016-October/033939.html) so I guess it will not go away automagically. Either we need an experienced developer convincing ffmpeg devs that this is their issue, or mpv needs a workaround...

@ghost
Copy link

ghost commented Feb 14, 2017

What's the contents of build_libs/lib/pkgconfig/libavutil.pc?

@mc4man
Copy link

mc4man commented Feb 14, 2017 via email

@ghost
Copy link

ghost commented Feb 14, 2017

So if this is with static linking, this is definitely a ffmpeg issue. It should link the hw decoding related libs in there. It doesn't, so linking of course fails.

@mc4man
Copy link

mc4man commented Feb 14, 2017 via email

@ghost
Copy link

ghost commented Feb 14, 2017

I just tried mpv-build, and even though the .pc files are not correct either, it worked for me for some reason. There must be something different about linking that on my system it probably eliminates unused functions completely, so there's nothing that can fail.

Which 2 ffmpeg commits?

@mc4man
Copy link

mc4man commented Feb 14, 2017 via email

@mc4man
Copy link

mc4man commented Feb 14, 2017

Just in case this would be the ffmpeg-config script in use here
http://sprunge.us/bKjb

@ghost
Copy link

ghost commented Feb 14, 2017

No, the builds before that must have been broken too. You just didn't notice it.

@mc4man
Copy link

mc4man commented Feb 14, 2017 via email

@ghost
Copy link

ghost commented Feb 14, 2017

Can you try this patch: http://sprunge.us/HjTF

Probably won't help.

@mc4man
Copy link

mc4man commented Feb 15, 2017 via email

@sleeksorrow
Copy link

I am sorry I didn't respond in a timely fashion. Although I am subscribed, I didn't get email notifications, maybe because this issue is closed already. Could you perhaps reopen it or should I create a new issue? I am willing to help, tho I am no developer, but I can apply patches and rebuild and provide info if that helps.

@kevmitch kevmitch reopened this Feb 16, 2017
@ghost
Copy link

ghost commented Feb 16, 2017

The only mystery is why it works for me but not for some others.

I suspect that my system has an implicit -Wl,--as-needed, which hides the error.

@sleeksorrow
Copy link

Adding -Wl,--as-needed does not change anything for me. config.log proves that this flag is being added for this check compilation, but the result is the same.

@ghost
Copy link

ghost commented Feb 16, 2017

Might depend on its position on the command line.

@sleeksorrow
Copy link

hmmm yes... setting it in LDFLAGS variable causes it to be appended to the very end

@igv
Copy link
Contributor

igv commented Feb 16, 2017

Works on Fedora, Debian, and I think Arch too.
Seems like only Ubuntu based distros affected by this issue.

@sleeksorrow
Copy link

Grumpage alert level raised from "meh" to "hmph!"

I set up a jessie vm and can confirm it works there... :-/

@mc4man
Copy link

mc4man commented Feb 16, 2017

At the time of that merge commit it caused 4 checks that had previously passed to fail & fail in exact same manner, the 3 other ones were (desc)
Checking for libavcodec avcodec_enum_to_chroma_pos API
Checking for libavcodec avcodec_profile_name()
Checking for libavcodec decode/encode API
Since then those 3 have been removed from wscript due to min. required ffmpeg version. So what's the reason this current check is still there?

@ghost
Copy link

ghost commented Feb 16, 2017

I think the availability of the vdpau FFmpeg API functions changes depending on whether it's compiled against vdpau or not. Normally this shouldn't happen, of course.

@mc4man
Copy link

mc4man commented Feb 16, 2017

It would seem to be a gcc linking order issue. If I were to force the static ffmpeg/mpv build to use gcc-4.4 which wasn't so strict about this then the check statement compiles/passes.
log snippet http://sprunge.us/hSTa
In any event only really concerned if using current ffmpeg statically linked is it ok to bypass this failing check_statement & allow support? (personally have seen no issue..

@Jj0YzL5nvJ
Copy link

Jj0YzL5nvJ commented Feb 17, 2017

Maybe this is related...

@sleeksorrow
Copy link

From a sysadmin perspective this sounds not related. If I compile mpv with vdpau hwaccel (using my debian VM) and run it on affected Ubuntu machine, it works just fine. Whereas the linked issue causes problems when using such an (assumingly correct) compiled-in hwaccel vdpau support.

@mc4man
Copy link

mc4man commented Feb 18, 2017 via email

@Jj0YzL5nvJ
Copy link

Jj0YzL5nvJ commented Feb 19, 2017

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4):
http://sprunge.us/UNTM

clang version 5.0.0-svn295460-0xpadoka0 (trunk):
http://sprunge.us/feQP

Doesn't detect libavcodec VDPAU hwaccel with gcc...

Edit:
Surprise!
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) without 'mpv-build':
http://sprunge.us/YWAZ

ffmpeg:

ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr/local --arch=amd64 --cpu=amd64 --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libfdk-aac --enable-libmp3lame --enable-librtmp --enable-openssl --enable-opengl --enable-libpulse --enable-libass --enable-libbluray --enable-libcaca --enable-libvpx --enable-libvorbis --enable-libtheora --enable-libopus --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --disable-debug
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

No comments

@mc4man
Copy link

mc4man commented Feb 19, 2017 via email

@Jj0YzL5nvJ
Copy link

Oops!, sorry =P

ffmpeg:

ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --extra-cflags=-fPIC --prefix=/usr/local --arch=amd64 --cpu=amd64 --enable-gpl --enable-version3 --enable-nonfree --enable-libfdk-aac --enable-libmp3lame --enable-librtmp --enable-openssl --enable-opengl --enable-libpulse --enable-libass --enable-libbluray --enable-libcaca --enable-libvpx --enable-libvorbis --enable-libtheora --enable-libopus --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --disable-debug
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

gcc:
http://sprunge.us/KfQb

clang:
http://sprunge.us/GISU

Only gcc doesn't detect the static libavcodec VDPAU hwaccel.

Note: I had to use "-fPIC" because without it I could not compile libmpv ...I don't know if that justify do a more formal report.
Whatever:

/usr/bin/ld: /usr/local/lib/libavfilter.a(allfilters.o): no se puede usar la reubicación R_X86_64_32 contra `ff_af_abench' cuando se hace un objeto compartido; recompile con -fPIC
/usr/local/lib/libavfilter.a: error adding symbols: Valor erróneo
collect2: error: ld returned 1 exit status

@tsoernes
Copy link
Author

tsoernes commented Feb 20, 2017

Just ran into this issue again and using ffmpeg release did not fix it this time. What's the status on this?

@mc4man
Copy link

mc4man commented Feb 23, 2017 via email

@DanielEckl
Copy link

Ubuntu 17.04 shipping gcc 6.3.0 works fine again

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

8 participants