Estou tentando criar um vídeo mp4 a partir de uma sequência de imagens numeradas de 1 a 100. O problema é que continuo recebendo um vídeo de saída que é preto. Cada imagem é assim
até100.OcomandoFFMPEGqueeuuseiéoseguinte
ffmpeg-r30-iimg%04d.png-c:vlibx264-crf23-pix_fmtyuv420pout.mp4
Asaídadestecomandoéaseguinte,
ffmpegversionN-69608-g9dc45d1Copyright(c)2000-2015theFFmpegdevelopersbuiltwithgcc4.9.2(GCC)configuration:--enable-gpl--enable-version3--disable-w32threads--enable-avisynth--enable-bzlib--enable-fontconfig--enable-frei0r--enable-gnutls--enable-iconv--enable-libass--enable-libbluray--enable-libbs2b--enable-libcaca--enable-libfreetype--enable-libgme--enable-libgsm--enable-libilbc--enable-libmodplug--enable-libmp3lame--enable-libopencore-amrnb--enable-libopencore-amrwb--enable-libopenjpeg--enable-libopus--enable-librtmp--enable-libschroedinger--enable-libsoxr--enable-libspeex--enable-libtheora--enable-libtwolame--enable-libvidstab--enable-libvo-aacenc--enable-libvo-amrwbenc--enable-libvorbis--enable-libvpx--enable-libwavpack--enable-libwebp--enable-libx264--enable-libx265--enable-libxavs--enable-libxvid--enable-lzma--enable-decklink--enable-zliblibavutil54.18.100/54.18.100libavcodec56.21.102/56.21.102libavformat56.19.100/56.19.100libavdevice56.4.100/56.4.100libavfilter5.9.103/5.9.103libswscale3.1.101/3.1.101libswresample1.1.100/1.1.100libpostproc53.3.100/53.3.100Input#0,image2,from'img%04d.png':Duration:00:00:04.00,start:0.000000,bitrate:N/AStream#0:0:Video:png,rgba,480x320,25fps,25tbr,25tbn,25tbcFile'out.mp4'alreadyexists.Overwrite?[y/N]y[libx264@00000000049238a0]usingcpucapabilities:MMX2SSE2FastSSSE3SSE4.2AVX[libx264@00000000049238a0]profileHigh,level2.1[libx264@00000000049238a0]264-core144r252540bb568-H.264/MPEG-4AVCcodec-Copyleft2003-2014-http://www.videolan.org/x264.html-options:cabac=1ref=3deblock=1:0:0analyse=0x3:0x113me=hexsubme=7psy=1psy_rd=1.00:0.00mixed_ref=1me_range=16chroma_me=1trellis=18x8dct=1cqm=0deadzone=21,11fast_pskip=1chroma_qp_offset=-2threads=6lookahead_threads=1sliced_threads=0nr=0decimate=1interlaced=0bluray_compat=0constrained_intra=0bframes=3b_pyramid=2b_adapt=1b_bias=0direct=1weightb=1open_gop=0weightp=2keyint=250keyint_min=25scenecut=40intra_refresh=0rc_lookahead=40rc=crfmbtree=1crf=23.0qcomp=0.60qpmin=0qpmax=69qpstep=4ip_ratio=1.40aq=1:1.00Output#0,mp4,to'out.mp4':Metadata:encoder:Lavf56.19.100Stream#0:0:Video:h264(libx264)([33][0][0][0]/0x0021),yuv420p,480x320,q=-1--1,30fps,15360tbn,30tbcMetadata:encoder:Lavc56.21.102libx264Streammapping:Stream#0:0->#0:0(png(native)->h264(libx264))Press[q]tostop,[?]forhelpframe=100fps=0.0q=-1.0Lsize=5kBtime=00:00:03.26bitrate=11.4kbits/svideo:3kBaudio:0kBsubtitle:0kBotherstreams:0kBglobalheaders:0kBmuxingoverhead:77.850037%[libx264@00000000049238a0]frameI:1AvgQP:10.00size:77[libx264@00000000049238a0]frameP:25AvgQP:10.28size:25[libx264@00000000049238a0]frameB:74AvgQP:13.68size:17[libx264@00000000049238a0]consecutiveB-frames:1.0%0.0%3.0%96.0%[libx264@00000000049238a0]mbII16..4:100.0%0.0%0.0%[libx264@00000000049238a0]mbPI16..4:0.0%0.0%0.0%P16..4:0.0%0.0%0.0%0.0%0.0%skip:100.0%[libx264@00000000049238a0]mbBI16..4:0.0%0.0%0.0%B16..8:0.0%0.0%0.0%direct:0.0%skip:100.0%[libx264@00000000049238a0]8x8transformintra:0.0%[libx264@00000000049238a0]codedy,uvDC,uvACintra:0.0%0.0%0.0%inter:0.0%0.0%0.0%[libx264@00000000049238a0]i16v,h,dc,p:95%0%5%0%[libx264@00000000049238a0]i8cdc,h,v,p:100%0%0%0%[libx264@00000000049238a0]WeightedP-Frames:Y:0.0%UV:0.0%
Todasas100imagenssãonumeradasde"0001.png" a "0100.png". Eu criei as imagens usando o código java. Eu usei ffplay para reproduzir o vídeo de saída longo de 3s e é assim:
Eu observei outras questões relacionadas postadas aqui, mas nenhuma das sugestões resolveu o problema. Esta é a primeira vez que uso o FFMPEG, então não tenho certeza do que estou perdendo. Ajuda será apreciada.
Obrigado!
Tags video ffmpeg video-editing