lavc not found, when using MEncoder

0

I'm following this answer to rip my VCD into a AVI file. When I run

mencoder vcd://3 -audio-preload 0.0 -o file.avi -mc 0 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000

It simply returns

-lavcopts is not an MEncoder option

Remove -lavcopts from the command and I get

success: format: 2  data: 0x2DFE54 - 0x12f78530
MPEG-PS file format detected.
VIDEO:  MPEG1  352x240  (aspect 12)  29.970 fps  1100.0 kbps (137.5 kbyte/s)
[V] filefmt:2  fourcc:0x10000001  size:352x240  fps:29.970  ftime:=0.0334
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 224.0 kbit/15.87% (ratio: 28000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
Couldn't find video filter 'lavc'.
Failed to open the encoder.

I've searched through Google trying to find a similar problem but can't find any of the sort.


UPDATE #1:

Here are the available codecs:

   copy     - frame copy, without re-encoding. Doesn't work with filters.
   frameno  - special audio-only file for 3-pass encoding, see DOCS.
   raw      - uncompressed video. Use fourcc option to set format explicitly.
   xvid     - XviD encoding
   x264     - H.264 encoding

UPDATE #2:

I'm running version 37998-1.

Pradana Aumars

Posted 2018-01-07T17:58:18.150

Reputation: 53

Have you considered using ffmpeg instead? It uses the same codecs (indeed lavc/libavcodec is part of ffmpeg), but AFAIK is more actively maintained than mencoder. – user1686 – 2018-01-07T18:10:20.080

Please provide the output of mencoder -ovc help. The version you’re using may have been built without libavcodec support. – Daniel B – 2018-01-07T18:14:17.237

@grawity I'm not really familiar with ffmpeg and how to use it. Or any video encoding CLI for that matter. That's why I just used the command in my question. – Pradana Aumars – 2018-01-07T18:19:04.393

So it appears your version does indeed lack support for libavcodec. How did you get this version? Using your distribution’s package manager? Please provide details. – Daniel B – 2018-01-07T18:19:08.750

I simply got it through the yaourt package manager, installed it normally using yaourt -S mencoder. I reinstalled it already. – Pradana Aumars – 2018-01-07T18:19:46.033

Answers

0

It's fixed in revision 38015.

cfg-mencoder.h in SVN revision 37998:

#ifdef CONFIG_FFMPEG
    //{"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, //TODO: ve_lavc doesn't build after latest FFmpeg major bumps
#else
    {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
#endif /* CONFIG_FFMPEG */

I ran

$ mplayer vcd://2 -dumpstream -dumpfile file.mpeg

and it worked just fine (if the VCD isn't faulty).

Thank you progandy from Arch Linux for the help!

Pradana Aumars

Posted 2018-01-07T17:58:18.150

Reputation: 53