Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8423 closed defect (invalid)

hvec decoder missing while encoder available

Reported by: th0ma7 Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When compiling ffmpeg with libx265 support (--enable-libx265) I end-up getting only the encoder although decoder is missing:

$ /usr/local/ffmpeg/bin/ffmpeg -codecs 2>/dev/null | grep -Ei -e 'h26[45]' -e 'hevc'
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m h264_vaapi )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 hevc_vaapi )

While I would normally expect:

$ ffmpeg -codecs 2>/dev/null | grep -Ei -e 'h26[45]' -e 'hevc'
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_omx h264_v4l2m2m h264_vaapi )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_v4l2m2m ) (encoders: libx265 hevc_v4l2m2m hevc_vaapi )

From the configure output it does show:

Enabled decoders:
...
adpcm_ea_xas            h264                    ra_288
adpcm_g722              hap                     ralf
adpcm_g726              hcom                    rasc
adpcm_g726le            hevc                    rawvideo
...

configure options:

./configure  --target-os=linux --cross-prefix=/home/th0ma7/git-ffmpeg/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags="-I/home/th0ma7/git-ffmpeg/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/include" --extra-ldflags="-L/home/th0ma7/git-ffmpeg/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/lib" --extra-libs="-lxml2 -ldl" --pkg-config=/usr/bin/pkg-config --ranlib=/home/th0ma7/git-ffmpeg/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-fontconfig --enable-libass --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-gnutls --disable-debug --disable-doc --disable-static --enable-libaom --arch=x86_64 --enable-thumb --enable-vaapi

Hints of where to look into to trace this would be much appreciated. Thnx!

Attachments (1)

ffmpeg-codecs.out (27.0 KB ) - added by th0ma7 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by James, 3 years ago

Are you sure you're looking at the just compiled ffmpeg binary and not some other one you had in your system?

comment:2 by th0ma7, 3 years ago

Pretty sure... :)

1st: is the self-compiled version from spksrc build environment of synocommunuity I built and installed on my synology nas on apollolake (x86_64) arch
2nd: is the default build on my 19.10 ubuntu linux, x86_64 arch as well.

Question is: using my personnal build on my synology nas, why isn't there a section such as:

H.265 / HEVC (decoders: ...)

I'm thinking it may be related to how x265 is being built in the first place and presented to ffmpeg... Advices on what to look for would be appreciated.

comment:3 by James, 3 years ago

I asked because if the hevc decoder shows up in the configure output, then there's no reason for it to not be available in the compiled binary.

I see you used --enable-shared, so make sure the ffmpeg cli is not loading the wrong shared libraries, and post the full output of ffmpeg -codecs.

comment:4 by Carl Eugen Hoyos, 3 years ago

Resolution: invalid
Status: newclosed
Version: 4.2unspecified

There is only one (software) hevc decoder, x265 is not supposed to provide a second decoder.

by th0ma7, 3 years ago

Attachment: ffmpeg-codecs.out added

comment:5 by th0ma7, 3 years ago

Resolution: invalid
Status: closedreopened

You'll notice in the codecs output that it really is 4.2.1 version.
This time I recompiled (crossed-compiling) adding the missing codecs enablement switches in hope they would show up (and they didn't):

 --enable-encoder=hevc --enable-encoder=hevc_v4l2m2m

As well here is the ldd output:

$ /opt/bin/ldd /usr/local/ffmpeg/bin/ffmpeg
	linux-vdso.so.1 (0x00007ffd61dfa000)
	libavdevice.so.58 => /var/packages/ffmpeg/target/lib/libavdevice.so.58 (0x00007ff9787ea000)
	libavfilter.so.7 => /var/packages/ffmpeg/target/lib/libavfilter.so.7 (0x00007ff9782b5000)
	libavformat.so.58 => /var/packages/ffmpeg/target/lib/libavformat.so.58 (0x00007ff977e55000)
	libavcodec.so.58 => /var/packages/ffmpeg/target/lib/libavcodec.so.58 (0x00007ff9766f1000)
	libavresample.so.4 => /var/packages/ffmpeg/target/lib/libavresample.so.4 (0x00007ff9764d2000)
	libpostproc.so.55 => /var/packages/ffmpeg/target/lib/libpostproc.so.55 (0x00007ff9762af000)
	libswresample.so.3 => /var/packages/ffmpeg/target/lib/libswresample.so.3 (0x00007ff976090000)
	libswscale.so.5 => /var/packages/ffmpeg/target/lib/libswscale.so.5 (0x00007ff975e06000)
	libavutil.so.56 => /var/packages/ffmpeg/target/lib/libavutil.so.56 (0x00007ff975af2000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007ff9757ed000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007ff9755d1000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007ff97522c000)
	libfribidi.so.0 => /var/packages/ffmpeg/target/lib/libfribidi.so.0 (0x00007ff97500d000)
	libass.so.9 => /var/packages/ffmpeg/target/lib/libass.so.9 (0x00007ff974dcb000)
	libva.so.2 => /var/packages/ffmpeg/target/lib/libva.so.2 (0x00007ff974ba2000)
	libfontconfig.so.1 => /var/packages/ffmpeg/target/lib/libfontconfig.so.1 (0x00007ff974953000)
	libfreetype.so.6 => /var/packages/ffmpeg/target/lib/libfreetype.so.6 (0x00007ff974673000)
	libbluray.so.2 => /var/packages/ffmpeg/target/lib/libbluray.so.2 (0x00007ff974425000)
	libz.so => /var/packages/ffmpeg/target/lib/libz.so (0x00007ff974206000)
	libgnutls.so.30 => /var/packages/ffmpeg/target/lib/libgnutls.so.30 (0x00007ff973dfd000)
	libvpx.so.4 => /var/packages/ffmpeg/target/lib/libvpx.so.4 (0x00007ff9739d3000)
	libaom.so.0 => /var/packages/ffmpeg/target/lib/libaom.so.0 (0x00007ff973027000)
	libmp3lame.so.0 => /var/packages/ffmpeg/target/lib/libmp3lame.so.0 (0x00007ff972d95000)
	libopus.so.0 => /var/packages/ffmpeg/target/lib/libopus.so.0 (0x00007ff972b10000)
	libvorbis.so.0 => /var/packages/ffmpeg/target/lib/libvorbis.so.0 (0x00007ff9728d7000)
	libvorbisenc.so.2 => /var/packages/ffmpeg/target/lib/libvorbisenc.so.2 (0x00007ff972621000)
	libx264.so.155 => /var/packages/ffmpeg/target/lib/libx264.so.155 (0x00007ff9720fb000)
	libx265.so.179 => /var/packages/ffmpeg/target/lib/libx265.so.179 (0x00007ff970b6c000)
	libsoxr.so.0 => /var/packages/ffmpeg/target/lib/libsoxr.so.0 (0x00007ff9708ef000)
	libva-drm.so.2 => /var/packages/ffmpeg/target/lib/libva-drm.so.2 (0x00007ff9706eb000)
	/lib64/ld-linux-x86-64.so.2 => /opt/lib/ld-linux-x86-64.so.2 (0x000055a90759b000)
	libexpat.so.1 => /var/packages/ffmpeg/target/lib/libexpat.so.1 (0x00007ff9704b7000)
	libuuid.so.1 => /var/packages/ffmpeg/target/lib/libuuid.so.1 (0x00007ff9702b0000)
	libpng16.so.16 => /var/packages/ffmpeg/target/lib/libpng16.so.16 (0x00007ff97006f000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007ff96fe6b000)
	libxml2.so.2 => /var/packages/ffmpeg/target/lib/libxml2.so.2 (0x00007ff96faa2000)
	libunistring.so.2 => /var/packages/ffmpeg/target/lib/libunistring.so.2 (0x00007ff96f702000)
	libtasn1.so.6 => /var/packages/ffmpeg/target/lib/libtasn1.so.6 (0x00007ff96f4ec000)
	libnettle.so.7 => /var/packages/ffmpeg/target/lib/libnettle.so.7 (0x00007ff96f2a8000)
	libhogweed.so.5 => /var/packages/ffmpeg/target/lib/libhogweed.so.5 (0x00007ff96f06c000)
	libgmp.so.10 => /var/packages/ffmpeg/target/lib/libgmp.so.10 (0x00007ff96edd5000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ff96eae2000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007ff96e8d1000)
	libogg.so.0 => /var/packages/ffmpeg/target/lib/libogg.so.0 (0x00007ff96e6c9000)
	libdrm.so.2 => /var/packages/ffmpeg/target/lib/libdrm.so.2 (0x00007ff96e4b5000)
Last edited 3 years ago by th0ma7 (previous) (diff)

comment:6 by th0ma7, 3 years ago

Version: unspecified4.2

comment:7 by mkver, 3 years ago

Resolution: invalid
Status: reopenedclosed
  1. Why would enabling encoders lead to the inclusion of a decoder?
  2. You have the native hevc decoder: The relevant line has the "D" at the beginning. Notice that the list in parentheses only shows up if you have more than one decoder/encoder.

comment:8 by th0ma7, 3 years ago

*sigh* ...

  1. thnx for pointing that out, clearly a typo...
  2. and I wasn't aware when encoder/decoder details where actually showing up or not, that explains a few things.

Still, odly enough, the h264 output changed where the second decoder disapeared when comparing with previous output :

$ /usr/local/ffmpeg/bin/ffmpeg -codecs 2>/dev/null | grep -Ei -e 'h26[45]' -e 'hevc'
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 libx264rgb h264_vaapi )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 hevc_vaapi )

And btw, I'm ramping up on this and having much to learn still. Thnx for your time...

comment:9 by Carl Eugen Hoyos, 3 years ago

Version: 4.2unspecified
Note: See TracTickets for help on using tickets.