[FFmpeg-user] How to create good video from low quality jpeg

Kawada Tsuyoshi tsuyoshi at turbosystems.co.jp
Tue Jul 28 03:46:33 EEST 2020


  Hi z!
> 
> thank you. I execute on Ubuntu 16.04.

Sorry. on Ubuntu 18.04

> 
> this is log
> 
> ====OK====
> $ ffmpeg -r 30 -i %03d.jpg -vcodec libx264 -pix_fmt yuv420p -r 30 out.mp4
> ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg 
> developers
>    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
>    configuration: --prefix=/usr --extra-version=0ubuntu0.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-libmysofa --enable-libopenjpeg 
> --enable-libopenmpt --enable-libopus --enable-libpulse 
> --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi 
> --enable-omx --enable-openal --enable-opengl --enable-sdl2 
> --enable-libdc1394 --enable-libdrm --enable-libiec61883 
> --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 
> --enable-shared
>    WARNING: library configuration mismatch
>    avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.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-libmysofa --enable-libopenjpeg 
> --enable-libopenmpt --enable-libopus --enable-libpulse 
> --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi 
> --enable-omx --enable-openal --enable-opengl --enable-sdl2 
> --enable-libdc1394 --enable-libdrm --enable-libiec61883 
> --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 
> --enable-shared --enable-version3 --disable-doc --disable-programs 
> --enable-libopencore_amrnb --enable-libopencore_amrwb 
> --enable-libtesseract --enable-libvo_amrwbenc
>    libavutil      55. 78.100 / 55. 78.100
>    libavcodec     57.107.100 / 57.107.100
>    libavformat    57. 83.100 / 57. 83.100
>    libavdevice    57. 10.100 / 57. 10.100
>    libavfilter     6.107.100 /  6.107.100
>    libavresample   3.  7.  0 /  3.  7.  0
>    libswscale      4.  8.100 /  4.  8.100
>    libswresample   2.  9.100 /  2.  9.100
>    libpostproc    54.  7.100 / 54.  7.100
> Input #0, image2, from '%03d.jpg':
>    Duration: 00:00:08.04, start: 0.000000, bitrate: N/A
>      Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 
> 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
> Stream mapping:
>    Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [swscaler @ 0x55ad6339c780] deprecated pixel format used, make sure you 
> did set range correctly
> [libx264 @ 0x55ad6327cde0] using SAR=1/1
> [libx264 @ 0x55ad6327cde0] using cpu capabilities: MMX2 SSE2Fast SSSE3 
> SSE4.2 AVX FMA3 BMI2 AVX2
> [libx264 @ 0x55ad6327cde0] profile High, level 3.1
> [libx264 @ 0x55ad6327cde0] 264 - core 152 r2854 e9a5903 - 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=-2 
> threads=12 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=25 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 'out.mp4':
>    Metadata:
>      encoder         : Lavf57.83.100
>      Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 
> 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
>      Metadata:
>        encoder         : Lavc57.107.100 libx264
>      Side data:
>        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> frame=  201 fps= 44 q=-1.0 Lsize=     378kB time=00:00:06.60 bitrate= 
> 469.3kbits/s speed=1.46x
> video:375kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
> muxing overhead: 0.850378%
> [libx264 @ 0x55ad6327cde0] frame I:1     Avg QP:22.84  size:373045
> [libx264 @ 0x55ad6327cde0] frame P:50    Avg QP:22.00  size:    94
> [libx264 @ 0x55ad6327cde0] frame B:150   Avg QP:33.33  size:    37
> [libx264 @ 0x55ad6327cde0] consecutive B-frames:  0.5%  0.0%  0.0% 99.5%
> [libx264 @ 0x55ad6327cde0] mb I  I16..4:  0.2% 93.8%  6.1%
> [libx264 @ 0x55ad6327cde0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4: 
> 0.7%  0.0%  0.0%  0.0%  0.0%    skip:99.3%
> [libx264 @ 0x55ad6327cde0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 
> 0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0: 0.0% L1:100.0% BI: 0.0%
> [libx264 @ 0x55ad6327cde0] 8x8 transform intra:93.8% inter:23.1%
> [libx264 @ 0x55ad6327cde0] coded y,uvDC,uvAC intra: 99.0% 93.7% 60.7% 
> inter: 0.0% 0.2% 0.0%
> [libx264 @ 0x55ad6327cde0] i16 v,h,dc,p: 14% 71% 14%  0%
> [libx264 @ 0x55ad6327cde0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 22% 22% 
> 5%  6%  6%  8%  5% 13%
> [libx264 @ 0x55ad6327cde0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 21% 12% 
> 6%  8%  9% 11%  6% 13%
> [libx264 @ 0x55ad6327cde0] i8c dc,h,v,p: 42% 29% 19% 10%
> [libx264 @ 0x55ad6327cde0] Weighted P-Frames: Y:0.0% UV:0.0%
> [libx264 @ 0x55ad6327cde0] ref P L0: 98.9%  0.8%  0.4%
> [libx264 @ 0x55ad6327cde0] ref B L1: 95.5%  4.5%
> [libx264 @ 0x55ad6327cde0] kb/s:457.62
> 
> 
> 
> 
> 
> 
> =====NG=====
> $ ffmpeg -r 30 -i %03d.jpg -vcodec libx264 -pix_fmt yuv420p -r 30 out.mp4
> ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg 
> developers
>    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
>    configuration: --prefix=/usr --extra-version=0ubuntu0.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-libmysofa --enable-libopenjpeg 
> --enable-libopenmpt --enable-libopus --enable-libpulse 
> --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi 
> --enable-omx --enable-openal --enable-opengl --enable-sdl2 
> --enable-libdc1394 --enable-libdrm --enable-libiec61883 
> --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 
> --enable-shared
>    WARNING: library configuration mismatch
>    avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.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-libmysofa --enable-libopenjpeg 
> --enable-libopenmpt --enable-libopus --enable-libpulse 
> --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi 
> --enable-omx --enable-openal --enable-opengl --enable-sdl2 
> --enable-libdc1394 --enable-libdrm --enable-libiec61883 
> --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 
> --enable-shared --enable-version3 --disable-doc --disable-programs 
> --enable-libopencore_amrnb --enable-libopencore_amrwb 
> --enable-libtesseract --enable-libvo_amrwbenc
>    libavutil      55. 78.100 / 55. 78.100
>    libavcodec     57.107.100 / 57.107.100
>    libavformat    57. 83.100 / 57. 83.100
>    libavdevice    57. 10.100 / 57. 10.100
>    libavfilter     6.107.100 /  6.107.100
>    libavresample   3.  7.  0 /  3.  7.  0
>    libswscale      4.  8.100 /  4.  8.100
>    libswresample   2.  9.100 /  2.  9.100
>    libpostproc    54.  7.100 / 54.  7.100
> Input #0, image2, from '%03d.jpg':
>    Duration: 00:00:08.04, start: 0.000000, bitrate: N/A
>      Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 
> 640x360, 25 fps, 25 tbr, 25 tbn, 25 tbc
> Stream mapping:
>    Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [swscaler @ 0x55766e52ab00] deprecated pixel format used, make sure you 
> did set range correctly
> [libx264 @ 0x55766e080400] using cpu capabilities: MMX2 SSE2Fast SSSE3 
> SSE4.2 AVX FMA3 BMI2 AVX2
> [libx264 @ 0x55766e080400] profile High, level 3.0
> [libx264 @ 0x55766e080400] 264 - core 152 r2854 e9a5903 - 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=-2 
> threads=11 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=25 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 'out.mp4':
>    Metadata:
>      encoder         : Lavf57.83.100
>      Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 
> 640x360, q=-1--1, 30 fps, 15360 tbn, 30 tbc
>      Metadata:
>        encoder         : Lavc57.107.100 libx264
>      Side data:
>        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> frame=  201 fps=0.0 q=-1.0 Lsize=      69kB time=00:00:06.60 bitrate= 
> 86.2kbits/s speed=8.29x
> video:66kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
> muxing overhead: 4.783223%
> [libx264 @ 0x55766e080400] frame I:1     Avg QP:18.45  size: 62768
> [libx264 @ 0x55766e080400] frame P:50    Avg QP:16.11  size:    37
> [libx264 @ 0x55766e080400] frame B:150   Avg QP:29.33  size:    17
> [libx264 @ 0x55766e080400] consecutive B-frames:  0.5%  0.0%  0.0% 99.5%
> [libx264 @ 0x55766e080400] mb I  I16..4:  1.0% 98.4%  0.7%
> [libx264 @ 0x55766e080400] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4: 
> 0.3%  0.0%  0.0%  0.0%  0.0%    skip:99.6%
> [libx264 @ 0x55766e080400] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 
> 0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%  L0:33.3% L1:66.7% BI: 0.0%
> [libx264 @ 0x55766e080400] 8x8 transform intra:98.4% inter:100.0%
> [libx264 @ 0x55766e080400] coded y,uvDC,uvAC intra: 94.5% 99.9% 99.7% 
> inter: 0.0% 0.1% 0.0%
> [libx264 @ 0x55766e080400] i16 v,h,dc,p: 22% 56% 11% 11%
> [libx264 @ 0x55766e080400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 26% 23% 
> 6%  4%  4%  6%  7% 10%
> [libx264 @ 0x55766e080400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 17% 10% 
> 9%  7%  6%  4% 16%  2%
> [libx264 @ 0x55766e080400] i8c dc,h,v,p: 45% 25% 10% 20%
> [libx264 @ 0x55766e080400] Weighted P-Frames: Y:0.0% UV:0.0%
> [libx264 @ 0x55766e080400] ref P L0: 98.8%  0.0%  1.2%
> [libx264 @ 0x55766e080400] kb/s:80.26
> 
> Thanks,
> Tsuyoshi
> 
> 
> On 2020/07/28 9:29, Carl Zwanzig wrote:
>> On 7/27/2020 5:26 PM, Kawada Tsuyoshi wrote:
>>> $ ffmpeg -r 30 -i %03d.jpg -vcodec libx264 -pix_fmt yuv420p -r 30 
>>> out.mp4
>>
>> Please post the complete & unedited command output, that will tell us 
>> a lot about what you're doing.
>>
>> z!
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list