ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4357|回复: 3

【求助】ffmpeg合并视频之后画面是慢动作,音频没问题

[复制链接]
发表于 2020-9-15 18:26:43 | 显示全部楼层 |阅读模式
本帖最后由 zy3287 于 2020-9-15 18:30 编辑
  1. ffmpeg -i 2.mp4 -i 1.mp4 -filter_complex "[1:v]scale=w=176:h=144:force_original_aspect_ratio=decrease[ckout];[0:v][ckout]overlay=x=W-w-10:y=0[out]" -map "[out]" -map 0:a -map 1:a -movflags faststart out.mp4
复制代码
回复

使用道具 举报

 楼主| 发表于 2020-9-15 18:28:59 | 显示全部楼层
  1. ffmpeg -i 2.mp4 -i 1.mp4 -filter_complex "[1:v]scale=w=176:h=144:force_original_aspect_ratio=decrease[ckout];[0:v][ckout]overlay=x=W-w-10:y=0[out]" -map "[out]" -map 0:a -map 1:a -movflags faststart out.mp4
  2. ffmpeg version git-2020-07-29-cbb6ba2 Copyright (c) 2000-2020 the FFmpeg developers
  3.   built with gcc 10.2.1 (GCC) 20200726
  4.   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  5.   libavutil      56. 57.100 / 56. 57.100
  6.   libavcodec     58. 97.102 / 58. 97.102
  7.   libavformat    58. 49.100 / 58. 49.100
  8.   libavdevice    58. 11.101 / 58. 11.101
  9.   libavfilter     7. 87.100 /  7. 87.100
  10.   libswscale      5.  8.100 /  5.  8.100
  11.   libswresample   3.  8.100 /  3.  8.100
  12.   libpostproc    55.  8.100 / 55.  8.100
  13. Input #0, matroska,webm, from '2.mp4':
  14.   Metadata:
  15.     encoder         : Chrome
  16.   Duration: N/A, start: 0.000000, bitrate: N/A
  17.     Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
  18.     Stream #0:1(eng): Video: h264 (Constrained Baseline), yuv420p(progressive), 480x480, SAR 1:1 DAR 1:1, 1k tbr, 1k tbn, 2k tbc (default)
  19. Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
  20.   Metadata:
  21.     major_brand     : mp42
  22.     minor_version   : 0
  23.     compatible_brands: mp42isom
  24.     creation_time   : 2020-08-25T03:03:30.000000Z
  25.     copyright       :
  26.     copyright-eng   :
  27.   Duration: 00:00:59.30, start: 0.000000, bitrate: 1035 kb/s
  28.     Stream #1:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
  29.     Metadata:
  30.       creation_time   : 2020-08-25T03:03:30.000000Z
  31.     Stream #1:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 544x960, 837 kb/s, 29.86 fps, 29.83 tbr, 90k tbn, 60 tbc (default)
  32.     Metadata:
  33.       creation_time   : 2020-08-25T03:03:31.000000Z
  34.       encoder         : JVT/AVC Coding
  35. Stream mapping:
  36.   Stream #0:1 (h264) -> overlay:main (graph 0)
  37.   Stream #1:1 (h264) -> scale (graph 0)
  38.   overlay (graph 0) -> Stream #0:0 (libx264)
  39.   Stream #0:0 -> #0:1 (opus (native) -> aac (native))
  40.   Stream #1:0 -> #0:2 (aac (native) -> aac (native))
  41. Press [q] to stop, [?] for help
  42. [libx264 @ 000001981d7f1bc0] using SAR=1/1
  43. [libx264 @ 000001981d7f1bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
  44. [libx264 @ 000001981d7f1bc0] profile High, level 5.1, 4:2:0, 8-bit
  45. [libx264 @ 000001981d7f1bc0] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=9 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
  46. Output #0, mp4, to 'out.mp4':
  47.   Metadata:
  48.     encoder         : Lavf58.49.100
  49.     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 480x480 [SAR 1:1 DAR 1:1], q=-1--1, 1k fps, 16k tbn, 1k tbc (default)
  50.     Metadata:
  51.       encoder         : Lavc58.97.102 libx264
  52.     Side data:
  53.       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  54.     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
  55.     Metadata:
  56.       encoder         : Lavc58.97.102 aac
  57.     Stream #0:2(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
  58.     Metadata:
  59.       creation_time   : 2020-08-25T03:03:30.000000Z
  60.       encoder         : Lavc58.97.102 aac
  61. More than 1000 frames duplicated       0kB time=00:00:00.96 bitrate=   0.4kbits/s dup=686 drop=0 speed=1.82x
  62. More than 10000 frames duplicated    1536kB time=00:00:09.98 bitrate=1260.3kbits/s dup=9309 drop=0 speed= 1.6x
  63. [matroska,webm @ 000001981d74e7c0] File ended prematurely at pos. 2412606 (0x24d03e)up=55684 drop=0 speed=1.45x
  64. [mp4 @ 000001981ddd0200] Starting second pass: moving the moov atom to the beginning of the filep=0 speed=1.44x
  65. frame=59334 fps=1428 q=-1.0 Lsize=   10651kB time=00:00:59.33 bitrate=1470.5kbits/s dup=57725 drop=0 speed=1.43x
  66. video:8428kB audio:1422kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.125087%
  67. [libx264 @ 000001981d7f1bc0] frame I:238   Avg QP:20.54  size: 24135
  68. [libx264 @ 000001981d7f1bc0] frame P:14952 Avg QP:25.20  size:   113
  69. [libx264 @ 000001981d7f1bc0] frame B:44144 Avg QP:35.33  size:    27
  70. [libx264 @ 000001981d7f1bc0] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
  71. [libx264 @ 000001981d7f1bc0] mb I  I16..4: 11.8% 37.9% 50.3%
  72. [libx264 @ 000001981d7f1bc0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  1.4%  0.3%  0.2%  0.0%  0.0%    skip:98.0%
  73. [libx264 @ 000001981d7f1bc0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  1.1%  0.0%  0.0%  direct: 0.0%  skip:98.9%  L0:27.8% L1:72.1% BI: 0.0%
  74. [libx264 @ 000001981d7f1bc0] 8x8 transform intra:38.2% inter:41.5%
  75. [libx264 @ 000001981d7f1bc0] coded y,uvDC,uvAC intra: 79.4% 84.1% 54.4% inter: 0.1% 0.1% 0.0%
  76. [libx264 @ 000001981d7f1bc0] i16 v,h,dc,p: 45% 11%  4% 41%
  77. [libx264 @ 000001981d7f1bc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 42% 18%  9%  4%  4%  6%  4%  6%  7%
  78. [libx264 @ 000001981d7f1bc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50% 15%  7%  4%  4%  6%  5%  5%  4%
  79. [libx264 @ 000001981d7f1bc0] i8c dc,h,v,p: 35% 18% 41%  7%
  80. [libx264 @ 000001981d7f1bc0] Weighted P-Frames: Y:0.0% UV:0.0%
  81. [libx264 @ 000001981d7f1bc0] ref P L0: 88.8%  7.0%  3.7%  0.5%
  82. [libx264 @ 000001981d7f1bc0] ref B L0: 78.2% 21.7%  0.1%
  83. [libx264 @ 000001981d7f1bc0] ref B L1: 94.3%  5.7%
  84. [libx264 @ 000001981d7f1bc0] kb/s:1163.54
  85. [aac @ 000001981d7bfdc0] Qavg: 118.856
  86. [aac @ 000001981d7bd480] Qavg: 474.191
复制代码
回复 支持 反对

使用道具 举报

发表于 2020-9-16 10:05:31 | 显示全部楼层
设置一下fps试试看呢? -r:v 30
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-9-16 10:22:43 | 显示全部楼层
孙悟空 发表于 2020-9-16 10:05
设置一下fps试试看呢? -r:v 30
  1. ffmpeg -i 2.mp4 -i 1.mp4 -filter_complex "[1:v]scale=w=176:h=144:force_original_aspect_ratio=decrease[ckout];[0:v][ckout]overlay=x=W-w-10:y=0[out]" -map "[out]" -map 0:a -map 1:a -r:v 30 -movflags faststart out.mp4
复制代码
已解决,谢谢大师兄
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-12-27 02:09 , Processed in 0.046780 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表