[FFmpeg-user] How to stitch images to create video
Amit Agarwal
lifeamit at gmail.com
Tue Apr 1 07:09:20 CEST 2014
Hi,
I am not able to stitch images to create a video out of them. Here is the
command I am using to stitch images together.
ffmpeg -t 10.993 -f image2 -r 29.97 -threads 0 -i
images/i-29x97fps-1280x720-%05d.png -vcodec libx264 -acodec libfaac -ar 48k
-ab 224k -aq 100 -vol 384 -async 1 -y video.mp4
This command it creating video.mp4 but that seems to be corrupt file. No
player is able to play that file and VLC crashes when trying to play this
file.
Can someone please help me fix this command in order to generate a healthy
mp4 video file ?
I am using ffmpeg version 2.1.4 and 2.2. Both are giving same output.
*Here are the logs in case they help:*
ffmpeg -t 10.993 -f image2 -r 29.97 -threads 0 -i
images/i-29x97fps-1280x720-%05d.png -vcodec libx264 -acodec libfaac -ar 48k
-ab 224k -aq 100 -vol 384 -async 1 -y video.mp4
ffmpeg version 2.2-tessus Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 24 2014 22:25:11 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm
--extra-version=tessus --disable-shared --enable-static --disable-ffplay
--enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
--enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libxavs --enable-version3
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx
--enable-libgsm --enable-libopus --enable-libmodplug --enable-fontconfig
--enable-libfreetype --enable-libass --enable-libbluray --enable-filters
--enable-runtime-cpudetect
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, image2, from 'images/i-29x97fps-1280x720-%05d.png':
Duration: 00:00:10.94, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba, 1024x769 [SAR 2835:2835 DAR 1024:769],
29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Codec AVOption ab (set bitrate (in bits/s)) specified for output file #0
(video.mp4) has not been used for any stream. The most likely reason is
either wrong type (e.g. a video option with no video streams) or that it is
a private option of some encoder which was not actually used for any stream.
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x102043000] using SAR=1/1
[libx264 @ 0x102043000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX
[libx264 @ 0x102043000] profile High 4:4:4 Predictive, level 3.1, 4:4:4
8-bit
[libx264 @ 0x102043000] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - 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=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 'video.mp4':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p,
1024x769 [SAR 1:1 DAR 1024:769], q=-1--1, 11988 tbn, 29.97 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> libx264)
Press [q] to stop, [?] for help
frame= 328 fps=100 q=-1.0 Lsize= 387kB time=00:00:10.87 bitrate=
291.2kbits/s
video:382kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead
1.209907%
[libx264 @ 0x102043000] frame I:4 Avg QP:12.84 size: 24742
[libx264 @ 0x102043000] frame P:84 Avg QP:20.80 size: 1849
[libx264 @ 0x102043000] frame B:240 Avg QP:24.71 size: 567
[libx264 @ 0x102043000] consecutive B-frames: 2.4% 0.0% 0.0% 97.6%
[libx264 @ 0x102043000] mb I I16..4: 9.0% 69.5% 21.5%
[libx264 @ 0x102043000] mb P I16..4: 1.5% 1.5% 0.4% P16..4: 10.1%
2.3% 1.0% 0.0% 0.0% skip:83.2%
[libx264 @ 0x102043000] mb B I16..4: 0.3% 0.1% 0.0% B16..8: 11.1%
0.7% 0.0% direct: 0.0% skip:87.8% L0:50.1% L1:47.3% BI: 2.5%
[libx264 @ 0x102043000] 8x8 transform intra:54.4% inter:62.2%
[libx264 @ 0x102043000] coded y,u,v intra: 30.3% 0.0% 0.0% inter: 0.6% 0.0%
0.0%
[libx264 @ 0x102043000] i16 v,h,dc,p: 54% 39% 3% 3%
[libx264 @ 0x102043000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 16% 40% 3% 3%
2% 2% 2% 2%
[libx264 @ 0x102043000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 26% 16% 3% 3%
2% 2% 1% 2%
[libx264 @ 0x102043000] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x102043000] ref P L0: 49.9% 4.1% 36.5% 9.6%
[libx264 @ 0x102043000] ref B L0: 59.0% 25.3% 15.7%
[libx264 @ 0x102043000] ref B L1: 82.3% 17.7%
[libx264 @ 0x102043000] kb/s:285.43
More information about the ffmpeg-user
mailing list