ffmpeg 说“'.mkv' 不是合适的输出格式”

ffmpeg 说“'.mkv' 不是合适的输出格式”

我遇到了麻烦ffmpeg,我想进行两次编码,如果可能的话再加上去噪和去块。

我认为这是个可行的命令但我遇到了各种各样的问题:

ffmpeg -y -i file.avi -c:v libx264 -preset medium -b:v 2500k 
-filter:v hqdn3d=3:2:2:2:3:3 -pass 1 -c:a libvorbis -b:a 96k -f .mkv /dev/null && \ 
-i file.avi -c:v libx264 -preset medium -b:v 2500k -filter:v hqdn3d=3:2:2:2:3:3 \
-pass 2 -c:a libvorbis -b:a 96k out.mkv

现在我收到这个错误

Requested output format '.mkv' is not a suitable output format
/dev/null: Invalid argument

hqdn3d=3:2:2:2:3:3我也遇到了一个错误。

全输出

'/home/levan/bin/ffmpeg' -y -i '/home/levan/Downloads/file.avi' -c:v libx264 -preset medium -b:v 2500k -filter:v hqdn3d=3:2:2:2:3:3 -pass 1 -c:a libvorbis -b:a 96k -f .mkv /dev/null && \ -i '/home/levan/Downloads/file.avi' -c:v libx264 -preset medium -b:v 2500k -filter:v hqdn3d=3:2:2:2:3:3 -pass 2 -c:a libvorbis -b:a 96k out.mkv
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Nov  1 2014 23:29:20 with gcc 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
  configuration: --prefix=/home/levan/ffmpeg_build --extra-cflags=-I/home/levan/ffmpeg_build/include --extra-ldflags=-L/home/levan/ffmpeg_build/lib --bindir=/home/levan/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      54. 11.100 / 54. 11.100
  libavcodec     56. 10.100 / 56. 10.100
  libavformat    56. 11.101 / 56. 11.101
  libavdevice    56.  2.100 / 56.  2.100
  libavfilter     5.  2.101 /  5.  2.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[mpeg4 @ 0x34be860] Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using a tool like VirtualDub or avidemux to fix it.
Input #0, avi, from '/home/levan/Downloads/file.avi':
  Duration: 00:10:48.88, start: 0.000000, bitrate: 17155 kb/s
    Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 17020 kb/s, 25 fps, 25 tbr, 25 tbn, 30k tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
[NULL @ 0x34de8a0] Requested output format '.mkv' is not a suitable output format
/dev/null: Invalid argument
levan@Commodore64:~$ 

答案1

-f .mkv应该-f matroska

请参阅ffmpeg -formats(或ffmpeg -muxers仅适用于多路复用器)以获取受支持的名称列表。

ffmpeg可以根据输出文件名自动确定适当的格式,因此大多数用户可以省略该-f选项。输出到/dev/nullNUL是个例外。

相关内容