ffmpeg says that "'.mkv' is not a suitable output format"

I have trouble with ffmpeg, I want to do a two-pass encoding, plus denoise and deblock if possible.

This is a command I thought would work but I am getting all sorts of problems:

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

Right now I am getting this error

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

I was getting an error about hqdn3d=3:2:2:2:3:3 as well.

Full output

'/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:~$ 
0

1 Answer

-f .mkv should be -f matroska.

See ffmpeg -formats (or ffmpeg -muxers for muxers only) for a list of supported names.

ffmpeg can automatically determine the appropriate format from the output file name, so most users can omit the -f option. Outputting to /dev/null or NUL is an exception.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like