tokam@localhost:~$ ffmpeg -i record.avi -vf "select=gt(scene\,0.003),setpts=N/(25*TB)" output.mp4
ffmpeg version 3.3.4-2 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7 (Ubuntu 7.2.0-8ubuntu2)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, avi, from 'record.avi':
Metadata:
encoder : Lavf57.71.100
Duration: 00:00:30.00, start: 0.000000, bitrate: 1078 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 160x90, 1075 kb/s, 20 fps, 20 tbr, 20 tbn, 20 tbc
File 'output.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x55ff3e48b1e0] deprecated pixel format used, make sure you did set range correctly
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x55ff3e4665a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x55ff3e4665a0] profile High 4:4:4 Predictive, level 1.0, 4:4:4 8-bit
[libx264 @ 0x55ff3e4665a0] 264 - core 148 r2795 aaa9aa8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=4 threads=3 lookahead_threads=1 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=20 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf57.71.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 160x90, q=-1--1, 20 fps, 10240 tbn, 20 tbc
Metadata:
encoder : Lavc57.89.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Past duration 0.999992 too large
Last message repeated 3 times
frame= 47 fps=0.0 q=-1.0 Lsize= 18kB time=00:00:02.20 bitrate= 68.7kbits/s dup=0 drop=10 speed=11.3x
video:17kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.752424%
[libx264 @ 0x55ff3e4665a0] frame I:1 Avg QP:24.13 size: 3161
[libx264 @ 0x55ff3e4665a0] frame P:19 Avg QP:24.84 size: 531
[libx264 @ 0x55ff3e4665a0] frame B:27 Avg QP:28.15 size: 133
[libx264 @ 0x55ff3e4665a0] consecutive B-frames: 12.8% 25.5% 19.1% 42.6%
[libx264 @ 0x55ff3e4665a0] mb I I16..4: 10.0% 26.7% 63.3%
[libx264 @ 0x55ff3e4665a0] mb P I16..4: 0.8% 0.8% 1.4% P16..4: 26.2% 13.1% 15.8% 0.0% 0.0% skip:41.9%
[libx264 @ 0x55ff3e4665a0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 17.8% 8.8% 3.6% direct: 2.4% skip:67.3% L0:54.4% L1:34.3% BI:11.3%
[libx264 @ 0x55ff3e4665a0] 8x8 transform intra:26.6% inter:62.5%
[libx264 @ 0x55ff3e4665a0] coded y,u,v intra: 76.3% 53.2% 60.4% inter: 13.2% 3.4% 7.6%
[libx264 @ 0x55ff3e4665a0] i16 v,h,dc,p: 27% 13% 60% 0%
[libx264 @ 0x55ff3e4665a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 15% 22% 1% 4% 4% 5% 10% 4%
[libx264 @ 0x55ff3e4665a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 23% 13% 6% 6% 5% 6% 5% 6%
[libx264 @ 0x55ff3e4665a0] Weighted P-Frames: Y:5.3% UV:5.3%
[libx264 @ 0x55ff3e4665a0] ref P L0: 51.9% 13.4% 21.3% 13.4%
[libx264 @ 0x55ff3e4665a0] ref B L0: 90.7% 7.8% 1.5%
[libx264 @ 0x55ff3e4665a0] ref B L1: 92.1% 7.9%
[libx264 @ 0x55ff3e4665a0] kb/s:57.33