FFmpeg-尝试替换音频时出现分段错误 [英] FFmpeg — segmentation fault when trying to replace audio
问题描述
我完全有这种情况: FFMPEG多路复用视频和音频(来自另一个视频)-映射问题.我想将一个文件中的视频流与另一个文件中的音频流混合.
I have exactly this scenario: FFMPEG mux video and audio (from another video) - mapping issue. I want to mux the video stream from one file and the audio stream from another.
我已相应地重命名了文件,并且尝试遵循答案
I have renamed the files accordingly and, when trying to follow the answer
ffmpeg -i input_0.mp4 -i input_1.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4
或
ffmpeg -i input_0.mp4 -i input_1.mp4 -c copy -map 0:v:0 -map 1:a:0 -shortest out.mp4
我知道
Segmentation fault (core dumped).
当我遵循
The same happens when I follow this answer under ffmpeg - replace audio in video, which tries to mux the audio (as a separate file) with the video stream.
ffmpeg -i input_0.mp4 -i a.aac -c:v copy -map 0:v:0 -map 1:a:0 new.mp4
我该怎么办?
回复评论:
ffmpeg -i input_0.mp4 -i input_1.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4
ffmpeg version 4.2.1-0york0~18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --prefix=/usr --extra-version='0york0~18.04.1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
Segmentation fault (core dumped)
查看
Looking at this answer under FFMPEG Segfault Solutions:
~$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
~$ ldd /usr/bin/ffmpeg | grep x264
libx264.so.155 => /usr/lib/x86_64-linux-gnu/libx264.so.155 (0x00007f497f5f9000)
libx264.so.152 => /usr/lib/x86_64-linux-gnu/libx264.so.152 (0x00007f496e837000)
~$ cat /usr/include/x264.h | grep X264_BUILD
cat: /usr/include/x264.h: No such file or directory
但是在Synaptic中,我看到了:
but in Synaptic I see this:
推荐答案
There is a problem with the ffmpeg package from the PPA you are using (jonathonf probably).
您可以尝试的方法:
-
与该PPA中当前可用的软件包相比,该软件包已过时,因此您可以尝试更新并查看是否可以解决问题:
sudo apt update
.
删除PPA ,然后从正式的Ubuntu存储库或 johnvansickle.com (请参阅安装分步进行-自行编译或使用snap的分步指南.
Remove the PPA and install the ffmpeg package from the official Ubuntu repository, or from johnvansickle.com (see install FAQ), or follow a step-by-step guide to compile it yourself, or use snap.
这篇关于FFmpeg-尝试替换音频时出现分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!