[FFmpeg-user] Video filtering for chroma dot crawl and rainbow effect

Christian Johannesen chrisjohannesen at gmail.com
Mon Jan 25 03:05:35 CET 2016


On Sun, Jan 24, 2016 at 8:23 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Christian Johannesen <chrisjohannesen <at> gmail.com> writes:
>
> > Looked through all the documentation for FFMPEG and I can't
> > seem to find any video filters that deal with chroma dot
> > crawl & rainbow artifacts in files captured from analog
> > tape formats.
>
> One of the reasons we always ask for command line including
> complete, uncut console output is that it often helps
> understanding the original issue.
>
> I am not convinced I understand your issue but maybe you
> are searching for the interl option of the scale filter?
> $ ffmpeg -i test_720x486i_dotcrawl.mov -vf scale=interl=1,fieldmatch
>
> I opened ticket #5187 because of the green lines fieldmatch
> produces.
>
> Carl Eugen
>
> My goal was to remove some of the video artifacts before compressing to
x264. Sort of like this
http://home.earthlink.net/~tacosalad/video/dotcrawl.html

I think I named my files more generally when I uploaded them.
test_720x486i_dotcrawl.mov shows more of the rainbow effect in some of the
detail areas than the dot crawl. I tested processing that clip to 23.98 in
this command line example.

ffmpeg.exe  -r 30000/1001 -i D:\media\test_720x486i_dotcrawl.mov
-filter_complex
[0:0]crop=704:480:8:6,pullup,dejudder,idet,yadif=mode=1:deint=interlaced,atadenoise,scale=640x480,setsar=sar=1/1,setfield=prog[v_0];[0:1][0:2]amerge=inputs=2[amerge_0_0];"[amerge_0_0]pan=2c|c0=c0|c1=c1[pan_0_0]"
 -map "[v_0]" -map "[pan_0_0]" -r 24000/1001  -c:v libx264 -crf 19 -r
24000/1001 -c:a aac -movflags +faststart  -shortest
 D:\media\test_640x480.mp4
ffmpeg version N-77547-g2893dbf Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-nonfree --enable-libx264
--enable-libx265 --enable-libfdk_aac --enable-static --disable-shared
--enable-libfreetype --enable-libfontconfig
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 21.100 / 57. 21.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 22.100 /  6. 22.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'D:\media\test_720x486i_dotcrawl.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2016-01-22 21:27:58
    com.apple.quicktime.player.movie.audio.gain: 1.000000
    com.apple.quicktime.player.movie.audio.treble: 0.000000
    com.apple.quicktime.player.movie.audio.bass: 0.000000
    com.apple.quicktime.player.movie.audio.balance: 0.000000
    com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
    com.apple.quicktime.player.movie.audio.mute:
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.6.6 (7.6.6)
    com.apple.quicktime.version: 7.7.3 (2943) 0x7738000 (Mac OS X, 10.11.3,
15D21)
  Duration: 00:00:19.35, start: 0.000000, bitrate: 33131 kb/s
    Stream #0:0(und): Video: prores (apcs / 0x73637061),
yuv422p10le(bt470bg/smpte240m/bt709), 720x486, 28517 kb/s, SAR 10:11 DAR
400:297, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
    Metadata:
      creation_time   : 2016-01-22 21:27:58
      handler_name    : Apple Alias Data Handler
      encoder         : ProRes 422 (LT)
      timecode        : 00:59:20;00
    Stream #0:1(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2016-01-22 21:27:58
      handler_name    : Apple Alias Data Handler
    Stream #0:2(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2016-01-22 21:27:58
      handler_name    : Apple Alias Data Handler
    Stream #0:3(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2016-01-22 21:27:58
      handler_name    : Apple Alias Data Handler
    Stream #0:4(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1
channels, s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2016-01-22 21:27:58
      handler_name    : Apple Alias Data Handler
    Stream #0:5(und): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2016-01-22 21:27:58
      handler_name    : Apple Alias Data Handler
      timecode        : 00:59:20;00
[Parsed_idet_3 @ 00000051505b2e80] Repeated Fields: Neither:     0 Top:
0 Bottom:     0
[Parsed_idet_3 @ 00000051505b2e80] Single frame detection: TFF:     0 BFF:
    0 Progressive:     0 Undetermined:     0
[Parsed_idet_3 @ 00000051505b2e80] Multi frame detection: TFF:     0 BFF:
  0 Progressive:     0 Undetermined:     0
[Parsed_amerge_9 @ 00000051505ca3e0] No channel layout for input 1
[Parsed_amerge_9 @ 00000051505ca3e0] Input channel layouts overlap: output
layout will be determined by the number of distinct input channels
[Parsed_pan_10 @ 00000051505ca0e0] Pure channel mapping detected: 0 1
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 00000051505bef60] using SAR=1/1
[libx264 @ 00000051505bef60] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 00000051505bef60] profile High 4:2:2, level 3.0, 4:2:2 8-bit
[libx264 @ 00000051505bef60] 264 - core 148 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1
ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=15 lookahead_threads=2
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=19.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'D:\media\test_640x480.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    com.apple.quicktime.version: 7.7.3 (2943) 0x7738000 (Mac OS X, 10.11.3,
15D21)
    com.apple.quicktime.player.movie.audio.gain: 1.000000
    com.apple.quicktime.player.movie.audio.treble: 0.000000
    com.apple.quicktime.player.movie.audio.bass: 0.000000
    com.apple.quicktime.player.movie.audio.balance: 0.000000
    com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
    com.apple.quicktime.player.movie.audio.mute:
    com.apple.quicktime.player.movie.visual.brightness: 0.000000
    com.apple.quicktime.player.movie.visual.color: 1.000000
    com.apple.quicktime.player.movie.visual.tint: 0.000000
    com.apple.quicktime.player.movie.visual.contrast: 1.000000
    com.apple.quicktime.player.version: 7.6.6 (7.6.6)
    encoder         : Lavf57.21.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p,
640x480 [SAR 1:1 DAR 4:3], q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.20.100 libx264
    Side data:
      unknown side data type 10 (24 bytes)
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo,
fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc57.20.100 aac
Stream mapping:
  Stream #0:0 (prores) -> crop
  Stream #0:1 (pcm_s24le) -> amerge:in0
  Stream #0:2 (pcm_s24le) -> amerge:in1
  setfield -> Stream #0:0 (libx264)
  pan -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[mp4 @ 00000051505b47c0] Starting second pass: moving the moov atom to the
beginning of the filespeed=1.84x
frame=  464 fps= 43 q=-1.0 Lsize=    8515kB time=00:00:19.37
bitrate=3601.1kbits/s dup=1 drop=46 speed=1.79x
video:8195kB audio:306kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.164892%
[Parsed_idet_3 @ 00000051505ca9e0] Repeated Fields: Neither:   481 Top:
0 Bottom:     0
[Parsed_idet_3 @ 00000051505ca9e0] Single frame detection: TFF:    20 BFF:
   14 Progressive:    72 Undetermined:   375
[Parsed_idet_3 @ 00000051505ca9e0] Multi frame detection: TFF:    28 BFF:
  0 Progressive:   453 Undetermined:     0
[libx264 @ 00000051505bef60] frame I:3     Avg QP:18.73  size: 51198
[libx264 @ 00000051505bef60] frame P:233   Avg QP:20.90  size: 26067
[libx264 @ 00000051505bef60] frame B:228   Avg QP:22.59  size:  9490
[libx264 @ 00000051505bef60] consecutive B-frames: 12.9% 59.1% 16.8% 11.2%
[libx264 @ 00000051505bef60] mb I  I16..4:  4.9% 81.2% 13.8%
[libx264 @ 00000051505bef60] mb P  I16..4:  0.2%  4.1%  1.6%  P16..4: 42.4%
28.5% 20.2%  0.0%  0.0%    skip: 3.0%
[libx264 @ 00000051505bef60] mb B  I16..4:  0.0%  0.2%  0.3%  B16..8: 43.1%
 6.8%  2.6%  direct:14.7%  skip:32.3%  L0:42.5% L1:45.7% BI:11.7%
[libx264 @ 00000051505bef60] 8x8 transform intra:69.3% inter:49.1%
[libx264 @ 00000051505bef60] coded y,uvDC,uvAC intra: 96.9% 97.1% 85.5%
inter: 45.9% 63.2% 21.5%
[libx264 @ 00000051505bef60] i16 v,h,dc,p:  5% 25% 19% 51%
[libx264 @ 00000051505bef60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 10% 37%  7%
 7%  6%  7%  8% 10%
[libx264 @ 00000051505bef60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  9% 18% 15%  8%
11%  7% 12%  7% 12%
[libx264 @ 00000051505bef60] i8c dc,h,v,p: 57% 13% 16% 13%
[libx264 @ 00000051505bef60] Weighted P-Frames: Y:20.6% UV:3.0%
[libx264 @ 00000051505bef60] ref P L0: 56.0% 16.5% 16.4%  9.4%  1.7%
[libx264 @ 00000051505bef60] ref B L0: 65.2% 32.9%  1.9%
[libx264 @ 00000051505bef60] ref B L1: 95.1%  4.9%
[libx264 @ 00000051505bef60] kb/s:3468.61
[aac @ 00000051505c0060] Qavg: 434.865


More information about the ffmpeg-user mailing list