movie output doesn't match image source

Questions involving a Windows version of FFmpeg.
Post Reply
pobrien11
Posts: 3
Joined: Thu Oct 18, 2018 4:56 pm

movie output doesn't match image source

Post by pobrien11 » Wed Oct 16, 2019 3:35 pm

I can't seem to match the ffmpeg output with the source exr. Linking to the source exr and movie here: https://www.dropbox.com/sh/mc19q5m9bf17 ... rEZRa?dl=0. I've tried a lot of flags, the closest seems to be this:

C:\PyAniTools\apps\pyShoot\ffmpeg\bin\ffmpeg.exe -apply_trc iec61966_2_1 -i C:\Users\Patrick\Downloads\050_020_render_layer\char_back\char_back.1062.exr -vcodec libx264 -pix_fmt yuv420p -preset slow -crf 18 -r 25 C:\Users\Patrick\Downloads\050_020_render_layer\char_back\char_back.1062.mp4

It's still different though.I see slight color or brightness changes. Not always a huge deal, but in darker images it can be more noticeable. Here's a comparison of the difference: https://www.dropbox.com/home/examples?preview=diff1.png

Any help would be greatly appreciated, I've been trying things for days. Thanks, Patrick

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: movie output doesn't match image source

Post by pandy » Wed Oct 16, 2019 5:14 pm

I know you already has similar thread ongoing on videohelp.com - i pointed you that your problem may be solved by explicitly signalling to ffmpeg used colour space and quantization range.

pobrien11
Posts: 3
Joined: Thu Oct 18, 2018 4:56 pm

Re: movie output doesn't match image source

Post by pobrien11 » Wed Oct 16, 2019 6:27 pm

Hey, thanks for the reply. I didn't know I had a post on videohelp.com, and can't seem to find it. Could you tell me what the flags are to tell ffmpeg the right color space and quantization range. The exrs should be linear since they come from maya arnold and then srgb is applied when viewing them in an application. Thanks for your help,

Patrick

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: movie output doesn't match image source

Post by pandy » Thu Oct 17, 2019 7:01 pm

Code: Select all

  -color_primaries   <int>        ED.V..... color primaries (from 1 to INT_MAX) (default unknown)
     bt709                        ED.V..... BT.709
     unknown                      ED.V..... Unspecified
     bt470m                       ED.V..... BT.470 M
     bt470bg                      ED.V..... BT.470 BG
     smpte170m                    ED.V..... SMPTE 170 M
     smpte240m                    ED.V..... SMPTE 240 M
     film                         ED.V..... Film
     bt2020                       ED.V..... BT.2020
     smpte428                     ED.V..... SMPTE 428-1
     smpte428_1                   ED.V..... SMPTE 428-1
     smpte431                     ED.V..... SMPTE 431-2
     smpte432                     ED.V..... SMPTE 422-1
     jedec-p22                    ED.V..... JEDEC P22
     unspecified                  ED.V..... Unspecified
  -color_trc         <int>        ED.V..... color transfer characteristics (from 1 to INT_MAX) (default unknown)
     bt709                        ED.V..... BT.709
     unknown                      ED.V..... Unspecified
     gamma22                      ED.V..... BT.470 M
     gamma28                      ED.V..... BT.470 BG
     smpte170m                    ED.V..... SMPTE 170 M
     smpte240m                    ED.V..... SMPTE 240 M
     linear                       ED.V..... Linear
     log100                       ED.V..... Log
     log316                       ED.V..... Log square root
     iec61966-2-4                 ED.V..... IEC 61966-2-4
     bt1361e                      ED.V..... BT.1361
     iec61966-2-1                 ED.V..... IEC 61966-2-1
     bt2020-10                    ED.V..... BT.2020 - 10 bit
     bt2020-12                    ED.V..... BT.2020 - 12 bit
     smpte2084                    ED.V..... SMPTE 2084
     smpte428                     ED.V..... SMPTE 428-1
     arib-std-b67                 ED.V..... ARIB STD-B67
     unspecified                  ED.V..... Unspecified
     log                          ED.V..... Log
     log_sqrt                     ED.V..... Log square root
     iec61966_2_4                 ED.V..... IEC 61966-2-4
     bt1361                       ED.V..... BT.1361
     iec61966_2_1                 ED.V..... IEC 61966-2-1
     bt2020_10bit                 ED.V..... BT.2020 - 10 bit
     bt2020_12bit                 ED.V..... BT.2020 - 12 bit
     smpte428_1                   ED.V..... SMPTE 428-1
  -colorspace        <int>        ED.V..... color space (from 0 to INT_MAX) (default unknown)
     rgb                          ED.V..... RGB
     bt709                        ED.V..... BT.709
     unknown                      ED.V..... Unspecified
     fcc                          ED.V..... FCC
     bt470bg                      ED.V..... BT.470 BG
     smpte170m                    ED.V..... SMPTE 170 M
     smpte240m                    ED.V..... SMPTE 240 M
     ycgco                        ED.V..... YCGCO
     bt2020nc                     ED.V..... BT.2020 NCL
     bt2020c                      ED.V..... BT.2020 CL
     smpte2085                    ED.V..... SMPTE 2085
     unspecified                  ED.V..... Unspecified
     ycocg                        ED.V..... YCGCO
     bt2020_ncl                   ED.V..... BT.2020 NCL
     bt2020_cl                    ED.V..... BT.2020 CL
  -color_range       <int>        ED.V..... color range (from 0 to INT_MAX) (default unknown)
     unknown                      ED.V..... Unspecified
     tv                           ED.V..... MPEG (219*2^(n-8))
     pc                           ED.V..... JPEG (2^n-1)
     unspecified                  ED.V..... Unspecified
     mpeg                         ED.V..... MPEG (219*2^(n-8))
     jpeg                         ED.V..... JPEG (2^n-1)
so your ffmpeg commandline can look like this:

Code: Select all

ffmpeg -color_primaries bt709 -colorspace bt709 -color_trc bt709 -color_range pc -i filename ... -vf zscale... outputfilename
zscale is preferred over native swscale filter due higher quality and accordingly to many people higher processing speed.
examples of your video looked to me a bit like HDR video (or at least more than 8 bit)

Post Reply
'