我使用 FFmpeg 转码了一个视频
ffmpeg -i input.mkv -ss 18 \
-c:v libx265 -x265-params preset=slower:crf=25:keyint=240 \
-c:a libopus -b:a 192k -filter:a aformat=channel_layouts=7.1|5.1|stereo \
-c:s copy -y output.mkv
但无法在 VLC 中播放 Matroska 视频文件,因为:
VLC media player 2.2.5.1 Umbrella (revision 2.2.5.1~ppa)
[00007fc370c01948] avformat demux error: Unknown option "threads"
事实上,VLC 甚至在编解码器信息列表中都看不到视频流。我可以用 Totem 正常播放视频(尽管音频无法播放,因为它无法解码 Opus),或者如果我将视频流重新复用到 MPEG4 文件容器中。
是什么导致了这个问题?更重要的是,我该如何解决或绕过它?
信息:
Ubuntu 14.04.5(amd64)
60 秒样本相关视频文件的
FFmpeg 信息:
ffprobe version 3.3.3 Copyright (c) 2007-2017 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Input #0, matroska,webm, from 'avformat-error.sample.mkv': Metadata: ENCODER : Lavf57.71.100 Duration: 00:01:00.12, start: -0.007000, bitrate: 961 kb/s Stream #0:0(eng): Video: hevc (Main), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default) Metadata: ENCODER : Lavc57.89.100 libx265 DURATION : 00:01:00.115000000 Stream #0:1(eng): Audio: opus, 48000 Hz, 5.1, fltp (default) Metadata: ENCODER : Lavc57.89.100 libopus DURATION : 00:01:00.001000000 Stream #0:2(eng): Subtitle: subrip Metadata: title : English DURATION : 00:00:00.000000000