[FFmpeg-user] Optimization
Marcus Lim
drakeskywing at gmail.com
Fri Nov 2 04:47:43 EET 2018
Sorry for the confusion, I just double checked, and I miss read "video size
is guessed from the first image file in the sequence." as it effectively
see's as only one size.
The issue though still stands, and I did a fresh clone from git, and built
from source as per https://trac.ffmpeg.org/wiki/CompilationGuide/macOS.
>
> ./../FFmpeg/ffmpeg -r 1/4 -i IMG_%3d.jpg out.mp4
> ffmpeg version N-92328-gf4dd2db913 Copyright (c) 2000-2018 the FFmpeg
> developers
> built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
> configuration: --enable-gpl --enable-nonfree --enable-libass
> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-libx265 --enable-libopus --enable-libxvid --samples=fate-suite
> libavutil 56. 23.100 / 56. 23.100
> libavcodec 58. 36.100 / 58. 36.100
> libavformat 58. 21.100 / 58. 21.100
> libavdevice 58. 6.100 / 58. 6.100
> libavfilter 7. 41.100 / 7. 41.100
> libswscale 5. 4.100 / 5. 4.100
> libswresample 3. 4.100 / 3. 4.100
> libpostproc 55. 4.100 / 55. 4.100
> Input #0, image2, from 'IMG_%3d.jpg':
> Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
> Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
> 3024x4032 [SAR 1:1 DAR 3:4], 25 tbr, 25 tbn, 25 tbc
> File 'out.mp4' already exists. Overwrite ? [y/N] y
> Stream mapping:
> Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 0x7fd903012000] using SAR=1/1
> [libx264 @ 0x7fd903012000] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX
> [libx264 @ 0x7fd903012000] profile High, level 6.0
> [libx264 @ 0x7fd903012000] 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=1
> 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 : Lavf58.21.100
> Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc),
> 3024x4032 [SAR 1:1 DAR 3:4], q=-1--1, 0.25 fps, 16384 tbn, 0.25 tbc
> Metadata:
> encoder : Lavc58.36.100 libx264
> Side data:
> cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> [swscaler @ 0x7fd9041be400] deprecated pixel format used, make sure you
> did set range correctly
> frame= 3 fps=1.3 q=-1.0 Lsize= 5248kB time=00:00:00.00
> bitrate=704743868.9kbits/s speed=2.56e-05x
> video:5247kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.016509%
> [libx264 @ 0x7fd903012000] frame I:2 Avg QP:15.08 size:1810918
> [libx264 @ 0x7fd903012000] frame P:1 Avg QP:15.30 size:1750261
> [libx264 @ 0x7fd903012000] mb I I16..4: 0.7% 91.2% 8.1%
> [libx264 @ 0x7fd903012000] mb P I16..4: 1.0% 81.6% 11.6% P16..4: 2.2%
> 2.5% 0.9% 0.0% 0.0% skip: 0.1%
> [libx264 @ 0x7fd903012000] 8x8 transform intra:89.7% inter:73.6%
> [libx264 @ 0x7fd903012000] coded y,uvDC,uvAC intra: 99.2% 76.0% 51.3%
> inter: 91.2% 86.4% 14.0%
> [libx264 @ 0x7fd903012000] i16 v,h,dc,p: 14% 4% 18% 65%
> [libx264 @ 0x7fd903012000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 14% 23% 6%
> 7% 8% 8% 8% 10%
> [libx264 @ 0x7fd903012000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 12% 10% 8%
> 11% 12% 8% 10% 8%
> [libx264 @ 0x7fd903012000] i8c dc,h,v,p: 50% 18% 23% 10%
> [libx264 @ 0x7fd903012000] Weighted P-Frames: Y:0.0% UV:0.0%
> [libx264 @ 0x7fd903012000] kb/s:3581.40
And I've noticed using the image demuxer is distorting the image to the
first images dimensions which is different to what the original script does
On Fri, 2 Nov 2018 at 11:06, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2018-11-02 0:05 GMT+01:00, Marcus Lim <drakeskywing at gmail.com>:
> > Thanks for all the suggestions,
> > So after some reading, the img2 demuxer won't work since the images I
> have
> > are all of different sizes, and according to the documentation it says
> that
> > they need to be of the same size (still tried it, but the images became
> cut
> > off)
>
> This doesn't seem correct to me, please point me to this part
> of the documentation.
> I just tried different sizes and it works fine.
>
> > as well I couldn't figure out how to get the timings done right.
>
> $ ffmpeg -r 1/4 -i img%2d.jpg
>
> > The concat demuxer actually had the same issue as the img2 demuxer.
>
> I wanted to suggest using the img2 demuxer instead, but since you
> only tested old FFmpeg, it may work with a current version.
>
> > For reference to the output from ffmpeg:
> >
> > ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
>
> Only current FFmpeg git head is supported here.
>
> Carl Eugen
> _______________________________________________
> 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".
More information about the ffmpeg-user
mailing list