ffmpeg-6.x supported?

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Segfault
Posts: 37
Joined: Sat Jun 17, 2017 3:08 am

ffmpeg-6.x supported?

Post by Segfault »

Cannot open video files properly, distorted output (also in preview).
HandBrake version 1.6.1
Gentoo amd64, testing version, up to date.

Code: Select all

23:50:54] gtkgui: HandBrake 1.6.1 (2023071800) - Linux x86_64 - https://handbrake.fr
[23:50:54] Compile-time hardening features are enabled
[23:50:54] nvenc: version 12.1 is available
[23:50:54] nvdec: is not compiled into this build
[23:50:54] hb_init: starting libhb thread
[23:50:54] hb_init: starting libhb thread
[23:50:54] hb_init: starting libhb thread
[23:50:55] CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
[23:50:55]  - Intel microarchitecture Kaby Lake
[23:50:55]  - logical processor count: 8
[23:50:55] hb_scan: path=/home/saul/work/Hugs_And_Mugs_1950.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image /home/saul/work/Hugs_And_Mugs_1950.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
[23:50:55] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[23:50:55] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/saul/work/Hugs_And_Mugs_1950.mkv':
  Metadata:
    ENCODER         : Lavf60.3.100
  Duration: 00:15:59.16, start: 0.067000, bitrate: 1786 kb/s
  Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 704x480 [SAR 40:33 DAR 16:9], Closed Captions, SAR 1:1 DAR 22:15, 29.97 fps, 29.97 tbr, 1k tbn
    Metadata:
      DURATION        : 00:15:59.091000000
    Side data:
      cpb: bitrate max/min/avg: 4874800/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:1(eng): Audio: ac3, 48000 Hz, 2 channels, fltp
    Metadata:
      DURATION        : 00:15:59.158000000
  Stream #0:2(spa): Audio: ac3, 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      DURATION        : 00:15:59.158000000
[23:50:55] scan: decoding previews for title 1
[23:50:55] scan: audio 0x2: ac3, rate=48000Hz, bitrate=128000 español (AC3) (2.0 ch) (128 kbps)
[23:50:55] scan: audio 0x1: ac3, rate=48000Hz, bitrate=128000 English (AC3) (2.0 ch) (128 kbps)
[23:50:55] WARNING: Video PAR 40:33 != container PAR 1:1
[23:50:55] scan: 12 previews, 704x480, 23.976 fps, autocrop = 0/0/48/48, aspect 16:9, PAR 40:33, color profile: 6-1-6, chroma location: left
[23:50:55] scan: supported video decoders: avcodec nvdec
[23:50:55] libhb: scan thread found 1 valid title(s)
[AVFilterGraph @ 0x55b4bf94c8c0] No such filter: 'zscale'
[AVFilterGraph @ 0x55b4bf94c8c0] Error creating filters
[23:50:55] hb_avfilter_graph_init: avfilter_graph_parse2 failed (crop='x=48:y=0:w=608:h=480',zscale='width=608:height=396:filter=lanczos',format='pix_fmts=yuv420p',zscale='width=608:height=3
[23:50:55] hb_get_preview3: Failure to initialise filter 'AVFilter'
[AVFilterGraph @ 0x55b4bf946740] No such filter: 'zscale'
[AVFilterGraph @ 0x55b4bf946740] Error creating filters
[23:50:55] hb_get_preview3: Failure to initialise filter 'AVFilter'
User avatar
Ritsuka
HandBrake Team
Posts: 1658
Joined: Fri Jan 12, 2007 11:29 am

Re: ffmpeg-6.x supported?

Post by Ritsuka »

You should use the FFmpeg version shipped with HandBrake, we have some essential patches, and it's been tested.
Using another version without our patches is unsupported, and prone to failure.
Furthermore your version is missing the zscale filter too.

Linux distributions like to make a system library out of FFmpeg, but it's such a moving target and can be compiled with so many different options that it's not really something we can use.
Segfault
Posts: 37
Joined: Sat Jun 17, 2017 3:08 am

Re: ffmpeg-6.x supported?

Post by Segfault »

Thanks. Unfortunately Gentoo ebuild does not have the option to use embedded FFmpeg. Maybe this ebuild allows adding custom build options easily, need to investigate. Other options are creating a custom ebuild or build by hand from git.
Segfault
Posts: 37
Joined: Sat Jun 17, 2017 3:08 am

Re: ffmpeg-6.x supported?

Post by Segfault »

Thanks even more! I rebuilt the system FFmpeg with --enable-libzimg (USE=zimg) and the problem is solved. :)
User avatar
Ritsuka
HandBrake Team
Posts: 1658
Joined: Fri Jan 12, 2007 11:29 am

Re: ffmpeg-6.x supported?

Post by Ritsuka »

That issue, not the others ten or more. We ship a Flatpak build too, probably it will be more stable.
Segfault
Posts: 37
Joined: Sat Jun 17, 2017 3:08 am

Re: ffmpeg-6.x supported?

Post by Segfault »

I fully understand what you mean. However, as I use NVEnc for video output and audio is either passthru or processed separately (not encoded in Handbrake) I think FFmpeg is used only for decoding the input video and it seems to be working fine now.
Deleted User 11865

Re: ffmpeg-6.x supported?

Post by Deleted User 11865 »

Anything HDR?
Segfault
Posts: 37
Joined: Sat Jun 17, 2017 3:08 am

Re: ffmpeg-6.x supported?

Post by Segfault »

Nope. I'm a buff of old pre-60 movies. I do not own any HDR TV sets.
digifuzzy
Posts: 3
Joined: Thu Jun 10, 2021 6:17 pm

Re: ffmpeg-6.x supported?

Post by digifuzzy »

I'm bumping this as it seems I was bitten by this arrangement, as well.

It was gnawing at me since the last upgrade that any video preview was messed up - multiple frames appeared in the preview pane and output was unresponsive to changes in the video settings (i.e. cropping).

In desperation, I searched this forum with nothing more than the keyword "preview" going through the results one-by-one. Then I struck gold. A quick rebuild with changes and problem solved.

I'll have to put a bug in some Gentoo Dev's ear about the need for 'zimg' USE flag in the ebuild.

Segfault - THANK YOU for posting!!!
Post Reply