Re: [FFmpeg-user] dpx to prores & h.264 - color shift
Andy Furniss wrote: Andreas Hummel wrote: Hello Kevin, thanks for the hint. I replaced the -colormatrix option with the -vf scale=.. option you suggested but i'm still getting a slight hue shift in the final converted movie. Even the added -sws_flags you suggested thx @Andy couldn't solve the problem. I tried various combinations but somehow i can't get a color correct output with ffmpeg so far. ffmpeg.exe -loglevel verbose -y -f image2 -start_number 0 -r 25 -i INPUT -r 25 -vcodec prores_ks -profile:v 3 -pix_fmt yuv422p10le -vf scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 -sws_flags accurate_rnd+full_chroma_int+full_chroma_inp+bitexact -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vendor ap10 OUTPUT.mov [Parsed_scale_0 @ 025899a0] w:iw h:ih flags:'bicubic' interl:0 [graph 0 input from stream 0:0 @ 02587ba0] w:1920 h:1080 pixfmt:gbrp10le tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [graph 0 input from stream 0:0 @ 02587ba0] TB:0.04 FRAME_RATE:25.00 SAMPLE_RATE:nan [Parsed_scale_0 @ 025899a0] w:1920 h:1080 fmt:gbrp10le sar:1/1 -> w:1920 h:1080 fmt:yuv422p10le sar:1/1 flags:0x4 I can see from that that the -sws_flags didn't take. More testing - Seems I am wrong here. Appending like I said will show different, but with loglevel debug you can see the flags do get set with -sws_flags and md5sum shows the same results. I don't have your input and like Carl Eugen said the upload site is so annoying I haven't seen your output either. Even if I had I don't know how it was made or how good any 10 -> 8 bit conversion was, plus I would be viewing on a crappy tn panel which likely doesn't even do 8 bit. I did a test with some 48 bit rgb sgi images In summary rather than -sws_flags appending below to the scale command :flags=accurate_rnd+full_chroma_int+full_chroma_inp+bitexact got a different output for me. I don't know how you would test 10 bit though as making/displaying jpg involves another conversion, which may give different output depending on what/what parameters are involved. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] dpx to prores & h.264 - color shift
Andreas Hummel wrote: Hello Kevin, thanks for the hint. I replaced the -colormatrix option with the -vf scale=.. option you suggested but i'm still getting a slight hue shift in the final converted movie. Even the added -sws_flags you suggested thx @Andy couldn't solve the problem. I tried various combinations but somehow i can't get a color correct output with ffmpeg so far. ffmpeg.exe -loglevel verbose -y -f image2 -start_number 0 -r 25 -i INPUT -r 25 -vcodec prores_ks -profile:v 3 -pix_fmt yuv422p10le -vf scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 -sws_flags accurate_rnd+full_chroma_int+full_chroma_inp+bitexact -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vendor ap10 OUTPUT.mov [Parsed_scale_0 @ 025899a0] w:iw h:ih flags:'bicubic' interl:0 [graph 0 input from stream 0:0 @ 02587ba0] w:1920 h:1080 pixfmt:gbrp10le tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [graph 0 input from stream 0:0 @ 02587ba0] TB:0.04 FRAME_RATE:25.00 SAMPLE_RATE:nan [Parsed_scale_0 @ 025899a0] w:1920 h:1080 fmt:gbrp10le sar:1/1 -> w:1920 h:1080 fmt:yuv422p10le sar:1/1 flags:0x4 I can see from that that the -sws_flags didn't take. I don't have your input and like Carl Eugen said the upload site is so annoying I haven't seen your output either. Even if I had I don't know how it was made or how good any 10 -> 8 bit conversion was, plus I would be viewing on a crappy tn panel which likely doesn't even do 8 bit. I did a test with some 48 bit rgb sgi images In summary rather than -sws_flags appending below to the scale command :flags=accurate_rnd+full_chroma_int+full_chroma_inp+bitexact got a different output for me. I don't know how you would test 10 bit though as making/displaying jpg involves another conversion, which may give different output depending on what/what parameters are involved. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] dpx to prores & h.264 - color shift
Hello Kevin, thanks for the hint. I replaced the -colormatrix option with the -vf scale=.. option you suggested but i'm still getting a slight hue shift in the final converted movie. Even the added -sws_flags you suggested thx @Andy couldn't solve the problem. I tried various combinations but somehow i can't get a color correct output with ffmpeg so far. ffmpeg.exe -loglevel verbose -y -f image2 -start_number 0 -r 25 -i INPUT -r 25 -vcodec prores_ks -profile:v 3 -pix_fmt yuv422p10le -vf scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 -sws_flags accurate_rnd+full_chroma_int+full_chroma_inp+bitexact -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vendor ap10 OUTPUT.mov The log looks currently like this: Input #0, image2, from 'INPUT': Duration: 00:01:04.48, start: 0.00, bitrate: N/A Stream #0:0: Video: dpx, 1 reference frame, gbrp10le, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc [Parsed_scale_0 @ 025899a0] w:iw h:ih flags:'bicubic' interl:0 [graph 0 input from stream 0:0 @ 02587ba0] w:1920 h:1080 pixfmt:gbrp10le tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [graph 0 input from stream 0:0 @ 02587ba0] TB:0.04 FRAME_RATE:25.00 SAMPLE_RATE:nan [Parsed_scale_0 @ 025899a0] w:1920 h:1080 fmt:gbrp10le sar:1/1 -> w:1920 h:1080 fmt:yuv422p10le sar:1/1 flags:0x4 Output #0, mov, to 'OUTPUT.mov': Metadata: encoder : Lavf57.51.103 Stream #0:0: Video: prores (prores_ks), 1 reference frame (apch / 0x68637061), yuv422p10le(bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc Metadata: encoder : Lavc57.61.102 prores_ks Stream mapping: Stream #0:0 -> #0:0 (dpx (native) -> prores (prores_ks)) Press [q] to stop, [?] for help No more output streams to write to, finishing.e=00:01:04.28 bitrate=115202.2kbits/s speed=0.42x frame= 1612 fps= 11 q=-0.0 Lsize= 904052kB time=00:01:04.44 bitrate=114928.4kbits/s speed=0.42x video:904040kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001372% Input file #0 (INPUT.dpx): Input stream #0:0 (video): 1612 packets read (13390381056 bytes); 1612 frames decoded; Total: 1612 packets (13390381056 bytes) demuxed Output file #0 (OUTPUT.mov): Output stream #0:0 (video): 1612 frames encoded; 1612 packets muxed (925736976 bytes); Total: 1612 packets (925736976 bytes) muxed I checked my input footage with ffprobe and mediainfo and the output is as follows: --> ffprobe Input #0, dpx_pipe, from 'INPUT': Duration: N/A, bitrate: N/A Stream #0:0: Video: dpx, gbrp10le, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc --> mediainfo Format : DPX Format version: Version 1.0 File size : 12.5 GiB Duration : 1 min 4 s Overall bit rate : 1 661 Mb/s Encoded date : 2016-10-05T10:36:57Mit Writing library : daVinci Video Format : DPX Format version : Version 1.0 Duration : 1 min 4 s Bit rate : 1 661 Mb/s Width: 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 FPS Color space : RGB Bit depth: 10 bits Scan type: Progressive Compression mode : Lossless Bits/(Pixel*Frame) : 32.047 Stream size : 12.5 GiB (100%) Writing library : daVinci Encoded date : 2016-10-05T10:36:57Mit Color primaries : Printing density The output file has the following info: -->ffprobe Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'OUTPUT.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf57.51.103 Duration: 00:01:04.48, start: 0.00, bitrate: 114857 kb/s Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 114855 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name: DataHandler encoder : Lavc57.61.102 prores_ks 2016-10-13 15:05 GMT+02:00 Andy Furniss : > Kevin Wheatley wrote: > >> Andreas, >> >> instead of using the -colormatrix option try instead using >> >> -vf scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_c >> olor_matrix=bt709 >> >> assuming your DPX files are utilising full range encoding >> > > also scale has flags which may or may not affect quality in this case. > > IIRC getting them to work can be a bit var
Re: [FFmpeg-user] dpx to prores & h.264 - color shift
Kevin Wheatley wrote: Andreas, instead of using the -colormatrix option try instead using -vf scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 assuming your DPX files are utilising full range encoding also scale has flags which may or may not affect quality in this case. IIRC getting them to work can be a bit variable, historically -sws-flags flag1+flag2 ... used to work, but not last time I tested so -vf scale=:flags=flag1+flag2. was what I last used - best to double check with -loglevel verbose + check output to be sure. https://www.ffmpeg.org/ffmpeg-scaler.html#scaler_005foptions I am thinking of trying accurate_rnd full_chroma_int full_chroma_inp bitexact not that I know what's best or relevant, so trial and error really. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] dpx to prores & h.264 - color shift
Andreas, instead of using the -colormatrix option try instead using -vf scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 assuming your DPX files are utilising full range encoding Kevin ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] dpx to prores & h.264 - color shift
Thanks for your response Carl Eugen,. Up until now i only had to deal with image sequences and didn't convert them myself. Therefore i wasn't sure if the results could have been better with other options. Thanks for your feedback. cheers, Andreas 2016-10-12 11:58 GMT+02:00 Carl Eugen Hoyos : > 2016-10-12 11:41 GMT+02:00 Andreas Hummel : > > > Here you may find a comparison image: > > http://www.directupload.net/file/d/4506/satnse88_jpg.htm > > > > Full resolution can be found here: > > http://uploaded.net/file/e02zd4ct > > (I have probably downloaded thousands of user-provided samples, > these sites are not acceptable, sorry. Our own upload site is > unfortunately down for months already.) > > > Or is that already the 'best' output i can get? > > I cannot really comment on your issue but your input file has 30bpp, > your h264 output file only 12, so there has to be a difference wrt the > colour representation. > > Carl Eugen > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] dpx to prores & h.264 - color shift
2016-10-12 11:41 GMT+02:00 Andreas Hummel : > Here you may find a comparison image: > http://www.directupload.net/file/d/4506/satnse88_jpg.htm > > Full resolution can be found here: > http://uploaded.net/file/e02zd4ct (I have probably downloaded thousands of user-provided samples, these sites are not acceptable, sorry. Our own upload site is unfortunately down for months already.) > Or is that already the 'best' output i can get? I cannot really comment on your issue but your input file has 30bpp, your h264 output file only 12, so there has to be a difference wrt the colour representation. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".