ffmpeg将图像和音频连接到文件的开头

时间:2017-05-17 23:20:14

标签: ffmpeg

所以我想尝试使用ffmpeg MAP命令来执行以下操作:

合并音频和jpg 将mp4连接到结束

Still.jpg
audio.mp3   ->    video.mp4     =    output.mp4

现在我有

/home/admin/ffmpeg/ffmpeg -i still.jpg -i audio.mp3 render1.mp4

但我还要继续添加video.mp4。我尝试阅读地图功能,但我很困惑你怎么知道文件有多少流等等

继承命令的输出....注意我有不同的文件名

Input #0, image2, from 'slide_2.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 8276 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
Input #1, mp3, from '/home/admin/web/admin.simplewebevents.com/public_html/cron/steveng1.mp3':
  Metadata:
    encoder         : Lavf57.56.100
  Duration: 00:00:05.78, start: 0.023021, bitrate: 64 kb/s
    Stream #1:0: Audio: mp3, 48000 Hz, mono, s16p, 64 kb/s
File 'introFile62.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (mp3 (native) -> aac (native))
Press [q] to stop, [?] for help
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x3589a00] using SAR=1/1
[libx264 @ 0x3589a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x3589a00] profile High, level 3.1
[libx264 @ 0x3589a00] 264 - core 148 - 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=1 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 'introFile62.mp4':
  Metadata:
    encoder         : Lavf57.72.101
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.96.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, mono, fltp, 69 kb/s
    Metadata:
      encoder         : Lavc57.96.101 aac
frame=    1 fps=0.2 q=28.0 Lsize=      70kB time=00:00:05.76 bitrate=  99.2kbits/s speed=1.27x    
video:18kB audio:49kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.483214%
[libx264 @ 0x3589a00] frame I:1     Avg QP:25.71  size: 18268
[libx264 @ 0x3589a00] mb I  I16..4: 25.6% 63.4% 10.9%
[libx264 @ 0x3589a00] 8x8 transform intra:63.4%
[libx264 @ 0x3589a00] coded y,uvDC,uvAC intra: 14.3% 18.5% 8.9%
[libx264 @ 0x3589a00] i16 v,h,dc,p: 81%  9% 10%  1%
[libx264 @ 0x3589a00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50% 12% 33%  1%  1%  1%  0%  1%  1%
[libx264 @ 0x3589a00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 21% 13%  3%  4%  5%  2%  4%  2%
[libx264 @ 0x3589a00] i8c dc,h,v,p: 76%  8% 15%  1%
[libx264 @ 0x3589a00] kb/s:3653.60
[aac @ 0x358aea0] Qavg: 118.057

0 个答案:

没有答案