![Ffmpeg 同步错误,第一张图像显示得非常快](https://linux22.com/image/1346597/Ffmpeg%20%E5%90%8C%E6%AD%A5%E9%94%99%E8%AF%AF%EF%BC%8C%E7%AC%AC%E4%B8%80%E5%BC%A0%E5%9B%BE%E5%83%8F%E6%98%BE%E7%A4%BA%E5%BE%97%E9%9D%9E%E5%B8%B8%E5%BF%AB.png)
我想将我的 mp3 图像转换为视频...但第一张幻灯片显示得太快了。
我希望每张幻灯片持续时间为 5-7 秒左右
原料
这是我的命令
ffmpeg -r 1/7 -i "manga%01d.png" -i "sound1.mp3" -c:a aac -strict experimental -b:a 128k -map 0:0 -map 1:0 -shortest -r 27 -y "product000.mp4"
日志:
ffmpeg version N-48731-g7e5c5fa Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 10 2013 19:47:49 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib --enable-filter=frei0r
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.107 / 54. 59.107
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, image2, from 'manga%01d.png':
Duration: 00:00:00.32, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba, 640x360 [SAR 2835:2835 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[mp3 @ 02845880] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 02845880] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'sound1.mp3':
Metadata:
TSS : Logic Pro 8.0.2
genre : Electronic
TCM : Kevin MacLeod
album : Disco and Lounge
TKE : C
TBP : 95
title : One Sly Move
artist : Kevin MacLeod
date : 2008-10-23 01:31
Duration: 00:02:44.69, start: 0.000000, bitrate: 320 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Stream #1:1: Video: mjpeg, yuvj444p, 400x400, 90k tbr, 90k tbn, 90k tbc
Metadata:
title : ÿØÿà
comment : Other
[libx264 @ 024c6e00] using SAR=1/1
[libx264 @ 024c6e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 024c6e00] profile High, level 3.0
[libx264 @ 024c6e00] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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=6 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 'product000.mp4':
Metadata:
encoder : Lavf54.59.107
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 13824 tbn, 27 tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (png -> libx264)
Stream #1:0 -> #0:1 (mp3 -> aac)
Press [q] to stop, [?] for help
frame= 190 fps=0.0 q=29.0 size= 43kB time=00:00:05.11 bitrate= 68.8kbits/s dup=188 drop=0
frame= 379 fps=315 q=29.0 size= 117kB time=00:00:12.11 bitrate= 79.4kbits/s dup=376 drop=0
frame= 568 fps=271 q=29.0 size= 250kB time=00:00:19.11 bitrate= 107.1kbits/s dup=564 drop=0
frame= 757 fps=241 q=29.0 size= 387kB time=00:00:26.11 bitrate= 121.4kbits/s dup=752 drop=0
frame= 946 fps=218 q=29.0 size= 514kB time=00:00:33.11 bitrate= 127.2kbits/s dup=940 drop=0
frame= 1135 fps=216 q=29.0 size= 649kB time=00:00:40.11 bitrate= 132.5kbits/s dup=1128 drop=0