[FFmpeg-trac] #10182(avcodec:closed): prores_videotoolbox results are inaccurate color
FFmpeg
trac at avcodec.org
Wed Mar 1 07:08:01 EET 2023
#10182: prores_videotoolbox results are inaccurate color
-------------------------------------+-------------------------------------
Reporter: Mils | Owner: (none)
Type: defect | Status: closed
Priority: normal | Component: avcodec
Version: 5.1.2 | Resolution:
Keywords: prores, | worksforme
prores_videotoolbox, videotoolbox | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by Mils):
* status: new => closed
* resolution: => worksforme
Old description:
> Summary of the bug:
> Hi,
> I would like to utilise the hardware acceleration of the Apple Silicon.
> I have tried using hevc_videotoolbox h264_videotoolbox both came out
> fine. Even the old -c:v prores_ks is also fine (just very slow at 0.2x)
> But when I use the prores_videotoolbox the results came like it has been
> applied too much exposure/gamma
>
> Hardware: M2 Pro Mac Mini (Ventura 13.2)
> FFMPEG version 5.1.2
> Video source: 3840x1610, HEVC (Main 10 at L5), HDR10
>
> Attached are the comparison and YES I own the movie right through Bluray
> AND Digital iTunes. This is for personal use/project.
>
> How to reproduce:
> {{{
> % ffmpeg -i H2-30s.mkv -c:v prores_videotoolbox H2-30sPR.mov
> ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
> built with Apple clang version 14.0.0 (clang-1400.0.29.202)
> configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_4 --enable-
> shared --enable-pthreads --enable-version3 --cc=clang --host-cflags=
> --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-
> libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-
> libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-
> librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1
> --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-
> libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
> libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma
> --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-
> libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
> libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-
> libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
> --enable-neon
> libavutil 57. 28.100 / 57. 28.100
> libavcodec 59. 37.100 / 59. 37.100
> libavformat 59. 27.100 / 59. 27.100
> libavdevice 59. 7.100 / 59. 7.100
> libavfilter 8. 44.100 / 8. 44.100
> libswscale 6. 7.100 / 6. 7.100
> libswresample 4. 7.100 / 4. 7.100
> libpostproc 56. 6.100 / 56. 6.100
> Input #0, matroska,webm, from 'H2-30s.mkv':
> Metadata:
> ENCODER : Lavf59.27.100
> Duration: 00:00:32.50, start: 0.009000, bitrate: 20065 kb/s
> Chapters:
> Chapter #0:0: start 0.000000, end 30.000000
> Metadata:
> title : Chapter 05
> Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv,
> bt2020nc/bt2020/smpte2084), 3840x1608, SAR 1:1 DAR 160:67, 23.98 fps,
> 23.98 tbr, 1k tbn (default)
> Metadata:
> BPS-eng : 16298452
> DURATION-eng : 03:06:34.517000000
> NUMBER_OF_FRAMES-eng: 268400
> NUMBER_OF_BYTES-eng: 22806662308
> _STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type')
> 64-bit
> _STATISTICS_WRITING_DATE_UTC-eng: 2020-12-10 01:14:57
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> DURATION : 00:00:30.257000000
> }}}
New description:
Summary of the bug:
Hi,
I would like to utilise the hardware acceleration of the Apple Silicon.
I have tried using hevc_videotoolbox h264_videotoolbox both came out fine.
Even the old -c:v prores_ks is also fine (just very slow at 0.2x)
But when I use the prores_videotoolbox the results came like it has been
applied too much exposure/gamma
Hardware: M2 Pro Mac Mini (Ventura 13.2)
FFMPEG version 5.1.2
Video source: 3840x1610, HEVC (Main 10 at L5), HDR10
Attached are the comparison and YES I own the movie right through Bluray
AND Digital iTunes. This is for personal use/project.
How to reproduce:
{{{
% ffmpeg -i H2-30s.mkv -c:v prores_videotoolbox H2-30sPR.mov
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 14.0.0 (clang-1400.0.29.202)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_4 --enable-
shared --enable-pthreads --enable-version3 --cc=clang --host-cflags=
--host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-
libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-
libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-
librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1
--enable-libtesseract --enable-libtheora --enable-libvidstab --enable-
libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma
--enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-
libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-
libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
--enable-neon
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, matroska,webm, from 'H2-30s.mkv':
Metadata:
ENCODER : Lavf59.27.100
Duration: 00:00:32.50, start: 0.009000, bitrate: 20065 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 30.000000
Metadata:
title : Chapter 05
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv,
bt2020nc/bt2020/smpte2084), 3840x1608, SAR 1:1 DAR 160:67, 23.98 fps,
23.98 tbr, 1k tbn (default)
Metadata:
BPS-eng : 16298452
DURATION-eng : 03:06:34.517000000
NUMBER_OF_FRAMES-eng: 268400
NUMBER_OF_BYTES-eng: 22806662308
_STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type')
64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-12-10 01:14:57
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:30.257000000
}}}
===============RESOLUTION: Works for me==================
Hi all,
I found by adding -pix_fmt and the following formats solved the issue:
uyvy422, p210le, p216le, ayuv64le.
Supported pixel formats: videotoolbox_vld yuv420p nv12 ayuv64le uyvy422
p010le nv16 p210le p216le nv24 p410le p416le bgra
The rest of the available formats gave the same issue as auto.
So in summary, the following ffmpeg line works for me (I exclude Audio
conversion / -an):
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt uyvy422 -an [output.mov]
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt p010le -an [output.mov]
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt p210le -an [output.mov]
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt p216le -an [output.mov]
I'm going to close the ticket.
Thank you all.
--
Comment:
Hi all,
I found by adding -pix_fmt and the following formats solved the issue:
uyvy422, p210le, p216le, ayuv64le. The rest of the available formats gave
the same issue as auto.
So in summary, the following ffmpeg line works for me (I exclude Audio
conversion / -an):
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt uyvy422 -an [output.mov]
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt p010le -an [output.mov]
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt p210le -an [output.mov]
ffmpeg -i [input.mkv] -c:v prores_videotoolbox -profile:v 3 -vendor apl0
-pix_fmt p216le -an [output.mov]
I'm going to close the ticket.
Thank you all.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10182#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list