Re: [FFmpeg-user] Chroma problem converting mp4 to prores
Sorry about the slow response, that has fixed the issue, thanks chronek! The file still seems a bit soft in quality though. I have tried turning the -qscale right down to 1 and adjusting the bits_per_mb up to 2400 and the picture improved but it still wasn’t 100%, but the file grew to 2.5x the size. I tried with the prores codec as opposed to the prores_ks codec and it was better, but again not 100% interestingly the file size didn’t grow when using the bits_per_mb with prores. Here is an example output: $ ffmpeg -y -i "5082197_Soccer Enrique Upd.mp4" -acodec pcm_s16le -vcodec prores_ks -profile:v 1 -vf scale=interl=1 -sws_flags full_chroma_inp+full_chroma_int -copytb -1 "5082197_Soccer Enrique Upd.mov" ffmpeg version 3.2.2-tessus Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 8.0.0 (clang-800.0.42.1) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '5082197_Soccer Enrique Upd.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42mp41 creation_time : 2017-03-01T23:52:21.000000Z Duration: 00:02:15.83, start: 0.000000, bitrate: 10170 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 9915 kb/s, 25 fps, 25 tbr, 50k tbn, 50 tbc (default) Metadata: creation_time : 2017-03-01T23:52:22.000000Z handler_name : Alias Data Handler encoder : AVC Coding Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default) Metadata: creation_time : 2017-03-01T23:52:22.000000Z handler_name : Alias Data Handler Output #0, mov, to '5082197_Soccer Enrique Upd.mov': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42mp41 encoder : Lavf57.56.100 Stream #0:0(eng): Video: prores (prores_ks) (apcs / 0x73637061), yuv422p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default) Metadata: creation_time : 2017-03-01T23:52:22.000000Z handler_name : Alias Data Handler encoder : Lavc57.64.101 prores_ks Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2017-03-01T23:52:22.000000Z handler_name : Alias Data Handler encoder : Lavc57.64.101 pcm_s16le Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> prores (prores_ks)) Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help frame= 3394 fps=7.7 q=-0.0 Lsize= 1522742kB time=00:02:15.80 bitrate=91852.6kbits/s speed=0.31x video:1497227kB audio:25464kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.003344% Thanks! dave
Try -sws_flags full_chroma_inp+full_chroma_int W dniu 2017-02-23 o 23:05, Dave pisze: > Hi guys,
I am having a issue where all the clips that I convert have a chroma problem. The red is saturated on all clips and there are red horizontal lines in the chroma.
$ ffmpeg -y -i 5079162_NHL\ Marleau.mp4 -acodec pcm_s16le -vcodec prores_ks -profile:v 1 -copytb -1 -vf yadif=1 -qscale:v 10 mp4-yadif1-q10.mov I thought this might be the chroma bug but I have experimented with a couple of different options replacing yadif=1 with the following:
-vf scale=out_color_matrix=bt709 -pix_fmt yuv422p10le -vf colormatrix=bt601:bt709 -vf yadif
The yadif=1 option provides the closest results and specifying multiple options seems to make it worse not better. The problem is more obvious on a broadcast monitor.
We are also having a problem where the converted clips are 1 frame shorter than the original, missing a black frame at the start of the clip.
Here are the details of the clip I am trying to convert:
$ ffprobe -v error -show_format -show_streams 5079162_NHL\ Marleau.mp4 [STREAM] index=0 codec_name=h264 codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 profile=Main codec_type=video codec_time_base=1/50 codec_tag_string=avc1 codec_tag=0x31637661 width=1920 height=1080 coded_width=1920 coded_height=1080 has_b_frames=1 sample_aspect_ratio=1:1 display_aspect_ratio=16:9 pix_fmt=yuv420p level=41 color_range=tv color_space=unknown color_transfer=unknown color_primaries=unknown chroma_location=left field_order=unknown timecode=N/A refs=1 is_avc=true nal_length_size=4 id=N/A r_frame_rate=25/1 avg_frame_rate=25/1 time_base=1/50000 start_pts=0 start_time=0.000000 duration_ts=2354000 duration=47.080000 bit_rate=9081205 max_bit_rate=N/A bits_per_raw_sample=8 nb_frames=1177 nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 TAG:creation_time=2017-02-03T23:55:00.000000Z TAG:language=eng TAG:handler_name=Alias Data Handler TAG:encoder=AVC Coding [/STREAM] [STREAM] index=1 codec_name=aac codec_long_name=AAC (Advanced Audio Coding) profile=LC codec_type=audio codec_time_base=1/48000 codec_tag_string=mp4a codec_tag=0x6134706d sample_fmt=fltp sample_rate=48000 channels=2 channel_layout=stereo bits_per_sample=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 time_base=1/48000 start_pts=0 start_time=0.000000 duration_ts=2259840 duration=47.080000 bit_rate=253262 max_bit_rate=283875 bits_per_raw_sample=N/A nb_frames=2210 nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=1 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 DISPOSITION:timed_thumbnails=0 TAG:creation_time=2017-02-03T23:55:01.000000Z TAG:language=eng TAG:handler_name=Alias Data Handler [/STREAM] [FORMAT] filename=5079162_NHL Marleau.mp4 nb_streams=2 nb_programs=0 format_name=mov,mp4,m4a,3gp,3g2,mj2 format_long_name=QuickTime / MOV start_time=0.000000 duration=47.146600 size=54956371 bit_rate=9325189 probe_score=100 TAG:major_brand=mp42 TAG:minor_version=0 TAG:compatible_brands=mp42mp41 TAG:creation_time=2017-02-03T23:54:57.000000Z [/FORMAT] _______________________________________________ ffmpeg-user mailing list ffmpeg-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
David Cecco wrote:
Sorry about the slow response, that has fixed the issue, thanks chronek!
The file still seems a bit soft in quality though. I have tried turning the -qscale right down to 1 and adjusting the bits_per_mb up to 2400 and the picture improved but it still wasn’t 100%, but the file grew to 2.5x the size.
I tried with the prores codec as opposed to the prores_ks codec and it was better, but again not 100% interestingly the file size didn’t grow when using the bits_per_mb with prores.
Here is an example output:
$ ffmpeg -y -i "5082197_Soccer Enrique Upd.mp4" -acodec pcm_s16le -vcodec prores_ks -profile:v 1 -vf scale=interl=1 -sws_flags full_chroma_inp+full_chroma_int -copytb -1 "5082197_Soccer Enrique Upd.mov" ffmpeg version 3.2.2-tessus Copyright (c) 2000-2016 the FFmpeg developers
Note scale=interl=1 recently changed (hopefully for the better). You may want to test again with git. Sometimes adding +accurate_rnd can help, though IIRC it 420 -> 422 8 bit was unaffected, don't know about 10bit. Interlaced 420 -> rgb really does need it + the other flags.
participants (2)
-
Andy Furniss -
David Cecco