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

[videotoolbox] Transfer function smpte2084 is not supported #2237

Closed
Nomis101 opened this issue Aug 14, 2019 · 1 comment

Comments

@Nomis101
Copy link
Contributor

commented Aug 14, 2019

Description of the problem

If I encode 4k HDR movies in Handbrake on Mac using one of the videotoolbox encodes, I get in the encoding log:

[hevc_videotoolbox @ 0x7f9707b07000] Transfer function smpte2084 is not supported.
OR
[h264_videotoolbox @ 0x7f9709149600] Transfer function smpte2084 is not supported.

This is triggered from FFmpeg here
https://github.com/FFmpeg/FFmpeg/blob/98478c05edb674ec429c298fbe593bda493ba60f/libavcodec/videotoolboxenc.c#L931

So, I've opened this bug https://trac.ffmpeg.org/ticket/7953

Now this was fixed by this commit: FFmpeg/FFmpeg@391b67f

But, this is not included in FFmpeg 4.2. So, would it be fine to include this change in the set of ffmpeg patches inside HandBrake, until this is fixed in a FFmpeg release version?

HandBrake version (e.g., 1.0.0)

1.2.2 and master

Operating system and version (e.g., Ubuntu 18.04 LTS, macOS 10.14 Mojave, Windows 10 1809)

macOS 10.14 Mojave

Error message text or screenshot

Please provide any error messages or screenshots that may help.

HandBrake Activity Log (see https://handbrake.fr/docs/en/latest/help/activity-log.html)

[14:11:55] macgui: Handbrake Version: 1.2.2  (2019022300)
[14:11:55] hb_init: starting libhb thread
[14:11:55] hb_init: starting libhb thread
[14:12:01] macgui: trying to open a folder or file
[14:12:01] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[14:12:01] CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
[14:12:01]  - Intel microarchitecture Skylake
[14:12:01]  - logical processor count: 8
[14:12:01] hb_scan: path=/Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[14:12:01] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:12:01] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : The Last Jedi
    encoder         : Lavf58.26.101
  Duration: 02:31:51.73, start: 0.000000, bitrate: 46391 kb/s
    Stream #0:0(eng): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 45914 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 23.98 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(deu): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 7.1, fltp, 468 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[14:12:01] scan: decoding previews for title 1
[14:12:02] scan: audio 0x1: aac, rate=48000Hz, bitrate=468679 Deutsch (AAC LC) (7.1 ch)
[14:12:08] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 276/276/0/0, aspect 16:9, PAR 1:1
[14:12:08] libhb: scan thread found 1 valid title(s)
[14:12:08] macgui: ScanCore scan done
[14:12:41] macgui: QueueCore prevented sleep
[14:12:41] macgui: QueueCore scanning specifically for title: 1
[14:12:41] CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
[14:12:41]  - Intel microarchitecture Skylake
[14:12:41]  - logical processor count: 8
[14:12:41] hb_scan: path=/Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[14:12:41] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[14:12:41] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : The Last Jedi
    encoder         : Lavf58.26.101
  Duration: 02:31:51.73, start: 0.000000, bitrate: 46391 kb/s
    Stream #0:0(eng): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 45914 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 23.98 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(deu): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 7.1, fltp, 468 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[14:12:41] scan: decoding previews for title 1
[14:12:42] scan: audio 0x1: aac, rate=48000Hz, bitrate=468679 Deutsch (AAC LC) (7.1 ch)
[14:12:48] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 276/276/0/0, aspect 16:9, PAR 1:1
[14:12:48] libhb: scan thread found 1 valid title(s)
[14:12:48] macgui: QueueCore scan done
[14:12:48] 1 job(s) to process
[14:12:48] starting job
[14:12:48] macgui: QueueCore started encoding The Last Jedi (4k HDR10).mp4
[14:12:48] macgui: QueueCore with preset Apple 2160p60 4K HEVC Surround (Modifiziert)
[14:12:48] decomb filter thread started for segment 0
[14:12:48] decomb filter thread started for segment 5
[14:12:48] decomb filter thread started for segment 6
[14:12:48] decomb filter thread started for segment 3
[14:12:48] decomb filter thread started for segment 4
[14:12:48] decomb filter thread started for segment 1
[14:12:48] decomb filter thread started for segment 2
[14:12:48] decomb filter thread started for segment 7
[14:12:48] decomb check thread started for segment 0
[14:12:48] decomb check thread started for segment 1
[14:12:48] decomb check thread started for segment 2
[14:12:48] decomb check thread started for segment 3
[14:12:48] decomb check thread started for segment 4
[14:12:48] decomb check thread started for segment 5
[14:12:48] decomb check thread started for segment 6
[14:12:48] decomb check thread started for segment 7
[14:12:48] mask filter thread started for segment 1
[14:12:48] mask filter thread started for segment 0
[14:12:48] mask filter thread started for segment 2
[14:12:48] mask filter thread started for segment 3
[14:12:48] mask filter thread started for segment 4
[14:12:48] mask filter thread started for segment 5
[14:12:48] mask filter thread started for segment 6
[14:12:48] mask filter thread started for segment 7
[14:12:48] mask erode thread started for segment 0
[14:12:48] mask erode thread started for segment 1
[14:12:48] mask erode thread started for segment 2
[14:12:48] mask erode thread started for segment 3
[14:12:48] mask erode thread started for segment 4
[14:12:48] mask erode thread started for segment 6
[14:12:48] mask erode thread started for segment 5
[14:12:48] mask erode thread started for segment 7
[14:12:48] mask dilate thread started for segment 0
[14:12:48] mask dilate thread started for segment 1
[14:12:48] mask dilate thread started for segment 2
[14:12:48] mask dilate thread started for segment 3
[14:12:48] mask dilate thread started for segment 4
[14:12:48] mask dilate thread started for segment 5
[14:12:48] mask dilate thread started for segment 6
[14:12:48] mask dilate thread started for segment 7
[14:12:48] yadif thread started for segment 0
[14:12:48] yadif thread started for segment 1
[14:12:48] yadif thread started for segment 2
[14:12:48] yadif thread started for segment 3
[14:12:48] yadif thread started for segment 4
[14:12:48] yadif thread started for segment 5
[14:12:48] yadif thread started for segment 6
[14:12:48] yadif thread started for segment 7
[14:12:48] work: only 1 chapter, disabling chapter markers
[14:12:48] job configuration:
[14:12:48]  * source
[14:12:48]    + /Volumes/Macintosh HD 3/Filme/Für AppleTV/The Last Jedi (4k HDR10).mp4
[14:12:48]    + title 1, chapter(s) 1 to 1
[14:12:48]    + container: mov,mp4,m4a,3gp,3g2,mj2
[14:12:48]    + data rate: 46391 kbps
[14:12:48]  * destination
[14:12:48]    + /Users/polysom/Movies/The Last Jedi (4k HDR10).mp4
[14:12:48]    + container: MPEG-4 (libavformat)
[14:12:48]  * video track
[14:12:48]    + decoder: hevc
[14:12:48]      + bitrate 45914 kbps
[14:12:48]    + filters
[14:12:48]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[14:12:48]      + Decomb (mode=39)
[14:12:48]      + Framerate Shaper (mode=2:rate=27000000/450000)
[14:12:48]        + frame rate: 23.976 fps -> peak rate limited to 60.000 fps
[14:12:48]      + Crop and Scale (width=3840:height=1608:crop-top=276:crop-bottom=276:crop-left=0:crop-right=0)
[14:12:48]        + source: 3840 * 2160, crop (276/276/0/0): 3840 * 1608, scale: 3840 * 1608
[14:12:48]    + Output geometry
[14:12:48]      + storage dimensions: 3840 x 1608
[14:12:48]      + pixel aspect ratio: 1 : 1
[14:12:48]      + display dimensions: 3840 x 1608
[14:12:48]    + encoder: H.265 (libavcodec)
[14:12:48]      + preset:  default
[14:12:48]      + profile: main
[14:12:48]      + bitrate: 8000 kbps, pass: 0
[14:12:48]      + color profile: 9-16-9
[14:12:48]  * audio track 1
[14:12:48]    + decoder: Deutsch (AAC LC) (7.1 ch) (track 1, id 0x1)
[14:12:48]      + bitrate: 468 kbps, samplerate: 48000 Hz
[14:12:48]    + AAC Passthru
[14:12:48] sync: expecting 218463 video frames
[14:12:48] encavcodecInit: H.265 (VideoToolbox)
[14:12:48] encavcodec: encoding with stored aspect 1/1
[hevc_videotoolbox @ 0x7feb7b2be200] Transfer function smpte2084 is not supported.
[14:12:50] sync: first pts audio 0x1 is 0
[14:12:50] sync: first pts video is 1920
[14:12:50] sync: "Kapitel 1" (1) at frame 1 time 1920
[14:13:09] macgui: QueueCore encode canceled
[14:13:09] work: average encoding speed for job is 16.904724 fps
[14:13:09] comb detect: heavy 0 | light 0 | uncombed 302 | total 302
[14:13:09] decomb: deinterlaced 0 | blended 0 | unfiltered 293 | total 293
[14:13:09] vfr: 286 frames output, 0 dropped and 0 duped for CFR/PFR
[14:13:09] vfr: lost time: 0 (0 frames)
[14:13:09] vfr: gained time: 0 (0 frames) (0 not accounted for)
[14:13:09] aac-decoder done: 733 frames, 0 decoder errors
[14:13:09] hevc-decoder done: 355 frames, 0 decoder errors
[14:13:09] sync: got 317 frames, 218463 expected
[14:13:09] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
[14:13:10] mux: track 0, 269 frames, 11130756 bytes, 6713.74 kbps, fifo 256
[14:13:10] mux: track 1, 619 frames, 720275 bytes, 434.45 kbps, fifo 1024
[14:13:10] libhb: work result = 1
[14:13:10] macgui: QueueCore work canceled
[14:13:10] macgui: Queue manually stopped
[14:13:10] macgui: QueueCore stopped preventing sleep
@jstebbins

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2019

So, would it be fine to include this change in the set of ffmpeg patches inside HandBrake

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.