26

I'm trying to convert a large MKV to an old-school AVI file.

I'm trying this:

ffmpeg -i video.mkv -s -codec:v mpeg4 -bf 1 -b 2567k -mbd 2 -g 300 -flags cgop -acodec copy video.avi

but I get

[NULL @ 0x7fa0d901e600] Unable to find a suitable output format for 'mpeg4' mpeg4: Invalid argument

Long version of ffmpeg's message...

ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  4 2014 17:53:32 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.1.3 --enable-shared     --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-     hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags=        --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from ‘video.mkv':
  Metadata:
    creation_time   : 2011-05-11 09:25:47
  Duration: 00:49:01.35, start: 0.000000, bitrate: 2851 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default) (forced)
    Stream #0:2(eng): Subtitle: subrip
[NULL @ 0x7fa0d901e600] Unable to find a suitable output format for 'mpeg4' 
mpeg4: Invalid argument

Any idea what's going on?

EDIT: I intended to use ffmpeg after DivX Converter - both on Mac and Windows - would fail at various points trying to transcode a video to DivX Home Theater profile. The closest I got was shlck's answer. It threw up only warnings (rather than errors.) In any case, I couldn't get the video to play on the DVD player (it would freeze every 10 seconds for about 6 seconds). If you've found this question while trying to research the creation of a DivX Home Theater profile-compatible video, you could possibly use this string as a starting point to figure out what's wrong, and post a new follow up question to SU:

ffmpeg -i video.mkv -s 720x406 -codec:v mpeg4 -bf 1 -b:v 2567k -mbd 2 -g 300 -flags cgop -sc_threshold 1000000000 -acodec copy video.avi

(In the end I gave the old DVD player away).

iceequal
  • 747

1 Answers1

17

You have a lonely -s option there. It misses its argument.

You should specify the size you want or leave it out entirely – otherwise it will not interpret -codec:v correctly and assume mpeg4 is your output filename.

Additionally, use -b:v instead of just -b – it's ambiguous.

ffmpeg -i video.mkv -s 1280x720 -codec:v mpeg4 -bf 1 -b:v 2567k -mbd 2 -g 300 -flags cgop -acodec copy video.avi
slhck
  • 235,242