#10091 closed defect (fixed)

Not reading NCLC on mov/prores files

Reported by: agfline Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: prores
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
ffmpeg & ffprobe can't read NCLC tags (primaries, trc, matrix) out of .mov files containing prores video, although it's working for .mov files containing AVC video stream.

I can observe the same behavior when looking at AVCodecParameters members (color_primaries, color_trc and color_space). They're correctly set when decoding h264 and 'unknown' with prores.

All files have been verified with mediainfo, they do contain NCLC tags.

How to reproduce:

$ ffmpeg -i ./h264.mov -codec:v prores -profile:v 0 -pix_fmt yuv422p10 -color_primaries 1 -color_trc 1 -color_range 1 ./prores.mov
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-shared --extra-libs='-lpthread -lm -latomic' --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libpulse --enable-libx264 --enable-libtheora --enable-libxvid --enable-libspeex --enable-libsoxr --enable-openal --enable-cuda --pkg-config-flags=--static --enable-chromaprint --enable-librubberband --enable-libzimg --enable-libopenjpeg --enable-nvenc --enable-openssl --enable-libsnappy --enable-libx265 --enable-libwebp --enable-opengl --enable-libshine
  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

$ ffprobe -hide_banner -loglevel error -show_streams ./prores.mov | grep color_*
color_range=tv
color_space=unknown
color_transfer=unknown
color_primaries=unknown

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (5)

comment:1 by Carl Eugen Hoyos, 18 months ago

Component: undeterminedavformat
Keywords: NCLC tags prores removed
Priority: importantwish
Type: defectenhancement

Please test current FFmpeg git head and provide an input file to make this a valid ticket.

comment:2 by Balling, 18 months ago

although it's working for .mov files containing AVC video stream.

That is because NCLC is duplicated in AVC bitstream.

comment:3 by Carl Eugen Hoyos, 18 months ago

Component: avformatavcodec
Keywords: prores added; mov removed
Priority: wishnormal
Type: enhancementdefect

comment:4 by Balling, 17 months ago

Status: newopen

Workaround in https://patchwork.ffmpeg.org/project/ffmpeg/patch/20221210153319.2831-1-jamrial@gmail.com/

Is there really bitstream colorspace data too in prores? BTW, hevc and avc also have a problem that container metadata does not have priority.

comment:5 by James, 17 months ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.