每隔两秒钟音频卡顿

时间:2019-06-23 01:11:30

标签: ffmpeg

我正在将一个视频(用ffmpeg录制,质量很好,全部稳定)与musicfile.mp3合并。但是,音乐每隔几秒钟就会停顿并略有跳动。这似乎很奇怪,因为仅在视频之上添加音乐就听起来像引擎可以放松并花费时间,而没有伪像。 (与录制实时桌面素材相比)。谁能帮我解决这个问题?

系统:MacOS MBP 2015、16GB内存2.7ghz i5

ffmpeg -i "temp/1561246948349.mkv" -i "music/happy.mp3" -vcodec copy -filter_complex amix -map 0:v -map 0:a -map 1:a -shortest -b:a 144k "finished/2019-06-22/1561246948349/output.mkv"
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, matroska,webm, from 'temp/1561246948349.mkv':
  Metadata:
    ENCODER         : Lavf58.20.100
  Duration: 00:00:21.50, start: 0.000000, bitrate: 5834 kb/s
    Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv422p(progressive), 2880x1800, 30 fps, 30 tbr, 1k tbn, 2000k tbc (default)
    Metadata:
      ENCODER         : Lavc58.35.100 libx264
      DURATION        : 00:00:21.467000000
    Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)
    Metadata:
      ENCODER         : Lavc58.35.100 libvorbis
      DURATION        : 00:00:21.496000000
Input #1, mp3, from 'music/happy.mp3':
  Metadata:
    album           : Random
    genre           : Jazz & Blues
  Duration: 00:15:59.84, start: 0.025057, bitrate: 186 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 186 kb/s
    Metadata:
      encoder         : LAME3.100
Stream mapping:
  Stream #0:1 (vorbis) -> amix:input0
  Stream #1:0 (mp3float) -> amix:input1
  amix -> Stream #0:0 (libvorbis)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 'finished/2019-06-22/1561246948349/output.mkv':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 44100 Hz, stereo, fltp, 144 kb/s (default)
    Metadata:
      encoder         : Lavc58.35.100 libvorbis
    Stream #0:1: Video: h264 (High 4:4:4 Predictive) (H264 / 0x34363248), yuv422p(progressive), 2880x1800, q=2-31, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc58.35.100 libx264
      DURATION        : 00:00:21.467000000
frame=  640 fps=0.0 q=-1.0 Lsize=   15227kB time=00:00:21.46 bitrate=5810.3kbits/s speed=33.8x    
video:14888kB audio:318kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.139864%

0 个答案:

没有答案