我想用 ffmpeg 制作缩时电影。目前我使用 mencoder 和以下命令:mencoder mf://*.jpg -mf fps=12 -nosound -noskip -ovc copy -o Zeitraffer$begin.avi
我正在尝试使用 ffmpeg 制作电影,但 ffmpeg 似乎想要覆盖我现有的快照。消息:
ffmpeg -i *.jpg -vcodec mpeg4 timelapse.avi
ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (SUSE Linux)
configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr /share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --datadir=/usr/share/ffmpeg --enable-avfilter --enable-libpulse --enable-libwebp --enable-libvpx --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libx265 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc --enable-gnutls --enable-libass --enable-frei0r --enable-libcelt --enable-libcdio --enable-ladspa
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, image2, from 'Schedule_20150516-000025.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 7403 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
文件“Schedule_20150516-000125.jpg”已存在。覆盖吗?[y/N]
我做错了什么?为什么 ffmpeg 要覆盖此文件?
答案1
答案2
通常,对于这种用法,我使用以下行:
mencoder mf://*.jpg -mf w=[width]:h=[height]:fps=[fps]:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o out.avi