Opened 2 years ago

Last modified 2 years ago

#5867 new defect

colorspace is not preserved

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

Description

I try to specify -colorspace and -color_range but it has no effect on resulting file.
Tried with several formats, concrete example below.

Tried to find colorspace on resulting file with ffprobe, mediaInfo and via api: no result.

If this is by design and cannot be properly supported please consider adding error message.

ffmpeg.exe -i color.tga -pix_fmt yuv444p -c:v ffvhuff -colorspace 1 -color_range 2 color.mov

ffmpeg version N-81729-g7d17d31 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 30.100 / 55. 30.100
  libavcodec     57. 57.101 / 57. 57.101
  libavformat    57. 50.100 / 57. 50.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, image2, from 'color.tga':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 188168 kb/s
    Stream #0:0: Video: targa, bgr24, 784x400, 25 tbr, 25 tbn, 25 tbc
[mov @ 0000000001216c20] Using MS style video codec tag, the file may be unplayable!
Output #0, mov, to 'color.mov':
  Metadata:
    encoder         : Lavf57.50.100
    Stream #0:0: Video: ffvhuff, yuv444p(pc, bt709/unknown/unknown), 784x400, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.57.101 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (targa (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=-0.0 Lsize=     279kB time=00:00:00.00 bitrate=29291487.2kbits/s speed=0.00299x    
video:278kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.294994%
ffprobe.exe color.mov -export_all 1

ffprobe version N-81729-g7d17d31 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 30.100 / 55. 30.100
  libavcodec     57. 57.101 / 57. 57.101
  libavformat    57. 50.100 / 57. 50.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'color.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf57.50.100
  Duration: 00:00:00.04, start: 0.000000, bitrate: 57118 kb/s
    Stream #0:0(eng): Video: ffvhuff (FFVH / 0x48564646), yuv444p, 784x400, 56950 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc57.57.101 ffvhuff

Change History (4)

comment:1 follow-up: Changed 2 years ago by cehoyos

The color_range of color.mov is "mpeg" / 1 (because you specified it with -pix_fmt yuv444p on the command line), why do you also specify color_range "jpeg" / 2?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 2 years ago by shekh

Replying to cehoyos:

Do you mean my setting is replaced by default?
But conversion still says "Metadata: ... yuv444p(pc, bt709/unknown/unknown)"
At this point it is not important for me to also have rgb->yuv conversion done right, I just want to see that the settings can be retrieved from resulting file.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 2 years ago by cehoyos

Replying to shekh:

Do you mean my setting is replaced by default?

Not default: You explicitely requested tv (mpeg) range and you get it, specifying a contradicting range (later) to the encoder cannot do any good afaict.

But conversion still says "Metadata: ... yuv444p(pc, bt709/unknown/unknown)"

Why do you believe that this line is related to "Metadata"?

comment:4 in reply to: ↑ 3 Changed 2 years ago by shekh

Replying to cehoyos:

But conversion still says "Metadata: ... yuv444p(pc, bt709/unknown/unknown)"

Why do you believe that this line is related to "Metadata"?

Because it is indented under Metadata block. If it is not related to metadata then what it is saying anyway?

Can you give example of good command line that will identify huffyuv as "pc, bt709"?

Note: See TracTickets for help on using tickets.