FFmpeg escurecimento de vídeo

0

Estou tentando mudar minha configuração de codificação do Mac para o Windows. Como parte disso, estou tentando fazer o FFmpeg funcionar como meu codificador ProRes.

Estou convertendo de 10 bits não-compactados para o ProRes 422 HQ. Quando faço isso, as cores são visivelmente mais escuras, em comparação com o original descompactado, e um ProRes do Adobe Media Encoder.

Estou usando

./ffmpeg -i testfile.mov -c:v prores_ks -profile:v 3 -pix_fmt yuv422p10le -c:a copy prores422_ks4.mov

Eu tentei o codec ProRes e Prores_KS, com o mesmo resultado. Eu corri MediaInfo nos arquivos e tenho o seguinte:

Adobe Media Encoder (cor correta)

Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt   2005.03 (qt  )
File size                                : 208 MiB
Duration                                 : 13 s 13 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 134 Mb/s
Encoded date                             : UTC 2018-03-14 22:08:26
Tagged date                              : UTC 2018-03-14 22:09:38
Writing library                          : Apple QuickTime
TIM                                      : 00:59:53:00
TSC                                      : 24000
TSZ                                      : 1001

Video
ID                                       : 1
Format                                   : ProRes
Format version                           : Version 0
Format profile                           : 422 HQ
Codec ID                                 : apch
Duration                                 : 13 s 13 ms
Bit rate mode                            : Variable
Bit rate                                 : 132 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 2.654
Stream size                              : 205 MiB (98%)
Writing library                          : Apple
Language                                 : English
Encoded date                             : UTC 2018-03-14 22:08:26
Tagged date                              : UTC 2018-03-14 22:08:26
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

FFmpeg (cores mais escuras)

Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt   0000.02 (qt  )
File size                                : 195 MiB
Duration                                 : 13 s 55 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 125 Mb/s
Writing application                      : Lavf57.83.100

Video
ID                                       : 1
Format                                   : ProRes
Format version                           : Version 0
Format profile                           : 422 HQ
Codec ID                                 : apch
Duration                                 : 13 s 55 ms
Bit rate mode                            : Variable
Bit rate                                 : 124 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 2.485
Stream size                              : 192 MiB (99%)
Writing library                          : Lavc
Language                                 : English
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Imagens originais

Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt   2005.03 (qt  )
File size                                : 2.42 GiB
Duration                                 : 13 s 55 ms
Overall bit rate                         : 1 592 Mb/s
Encoded date                             : UTC 2018-03-14 20:32:39
Tagged date                              : UTC 2018-03-14 20:32:39

Video
ID                                       : 1
Format                                   : RGB
Codec ID                                 : r210
Codec ID/Hint                            : Blackmagic Design
Duration                                 : 13 s 55 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 591 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 32.000
Stream size                              : 2.42 GiB (100%)
Language                                 : English
Encoded date                             : UTC 2018-03-14 20:32:39
Tagged date                              : UTC 2018-03-14 20:32:39
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Aqui está a saída do FFMpeg

Guessed Channel Layout for Input Stream #0.2 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testfile.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2018-03-14T20:32:39.000000Z
  Duration: 00:00:13.05, start: 0.000000, bitrate: 1592473 kb/s
    Stream #0:0(eng): Video: r210 (r210 / 0x30313272), rgb48le(10 bpc, bt709, progressive), 1920x1080, 1590933 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
    Metadata:
      creation_time   : 2018-03-14T20:32:39.000000Z
      handler_name    : Linux Alias Data Handler
      encoder         : 10 bit packed RGB (r210)
      timecode        : 00:59:53:00
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      rotate          : 0
      creation_time   : 2018-03-14T20:32:39.000000Z
      handler_name    : Libquicktime Time Code Media Handler
      reel_name       : untitled
      timecode        : 00:59:53:00
    Stream #0:2(eng): Audio: pcm_s16be (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2018-03-14T20:32:39.000000Z
      handler_name    : Linux Alias Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (r210 (native) -> prores (prores_ks))
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, mov, to 'prores422_ks9.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    encoder         : Lavf57.83.100
    Stream #0:0(eng): Video: prores (prores_ks) (apch / 0x68637061), yuv422p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 24k tbn, 23.98 tbc (default)
    Metadata:
      creation_time   : 2018-03-14T20:32:39.000000Z
      handler_name    : Linux Alias Data Handler
      timecode        : 00:59:53:00
      encoder         : Lavc57.107.100 prores_ks
    Stream #0:1(eng): Audio: pcm_s16be (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2018-03-14T20:32:39.000000Z
      handler_name    : Linux Alias Data Handler

Aqui estão algumas imagens de exemplo da aparência da mudança. Não posso postar quadros completos ou qualquer coisa que identifique o conteúdo, mas aqui estão algumas amostras de cores.

Media Encoder Beige

FFMpeg Bege

Media Encoder Blue

FFMpeg Blue

Barras de cores corretas

Barras de cores FFMpeg

Nota: eu aparado um quadro preto ou dois no final no Media Encoder

Eu sou um noob no FFmpeg, então qualquer ajuda seria muito apreciada! Eu suponho que estou perdendo algo óbvio.

    
por Muindor 20.03.2018 / 00:56

0 respostas