LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   ffmpeg mencoder and lavc (http://www.linuxquestions.org/questions/ubuntu-63/ffmpeg-mencoder-and-lavc-554038/)

keratos 05-15-2007 08:05 AM

ffmpeg mencoder and lavc
 
Hi all

I'm getting to grips with linux video encoding and have tried several apps. I'm confused though with apps, codecs and libraries.

I've scoured the net and discovered comparisons between ffmpeg and mencoder. I've seen mention of lavc and mpeg2video. I've also come across utils such as transcode.

I'm confused, can someone please clear up my understanding. Is this correct:

mencoder is mplayer's encoder engine.
mencoder uses lavc which is lib audio visual codecs, a library including lots of the latest codecs - such as mpeg2video for DVD and mpeg4 for compressed video etc.

So mpeg2video is a codec from the lavc library used by mencoder engine.

Where does ffmpeg come in. The ffmpeg site mentions that ffmpeg is part of the lavc library. What!!? I can run ffmpeg from the command line - is this not an app.

Also, why do apps that use ffmeg direct seem to encode much faster than those that use mencoder (does that itself use ffmpeg?)

What is ffmpeg? How does it fit in with mencoder - is it an alternate application or simply a codec used by mencoder. Is ffmpeg better than mpeg2video ... arrggg .. confused!

osor 05-16-2007 08:06 PM

Quote:

Originally Posted by keratos
What is ffmpeg? How does it fit in with mencoder - is it an alternate application or simply a codec used by mencoder.

It’s both (sort of). The project called ffmpeg implements various codecs as libraries. Historically, it started out as just part of mplayer (i.e., a bunch of internal libraries used only by mplayer). Eventually, these libraries became big enough (and useful enough) to become a standalone project. The libraries I’m thinking of are named libavcodec (i.e., “lavc”), libavformat, libavutil, libpostproc, and libswscale. Incidentally, the project that delivers these libraries (named ffmpeg) comes with a program that uses them which is itself named “ffmpeg”. Of course the program ffmpeg can use other libraries (depending on how it was built). For example, my ffmpeg program uses these codec libraries (in addition to the ffmpeg libraries themselves):
  • liba52
  • libdts
  • libfaac
  • libfaad
  • libmp3lame
  • libmp4v2
  • libogg
  • libtheora
  • libvorbis
  • libvorbisenc
  • libx264
  • libxvidcore
(this information found by running “ldd /usr/bin/ffmpeg” and filtering out non-codec libraries).
Quote:

Originally Posted by keratos
Also, why do apps that use ffmeg direct seem to encode much faster than those that use mencoder

I don’t think this is true. At least not if you tell both to use the same libraries for encoding (usually lavc). You can probably construct a situation (e.g., tell mplayer to use lame and tell ffmpeg to use lavc) in which one beats the other in “speed”

keratos 05-17-2007 01:48 PM

Quote:

Originally Posted by osor
It’s both (sort of). The project called ffmpeg implements various codecs as libraries. Historically, it started out as just part of mplayer (i.e., a bunch of internal libraries used only by mplayer). Eventually, these libraries became big enough (and useful enough) to become a standalone project. The libraries I’m thinking of are named libavcodec (i.e., “lavc”), libavformat, libavutil, libpostproc, and libswscale. Incidentally, the project that delivers these libraries (named ffmpeg) comes with a program that uses them which is itself named “ffmpeg”. Of course the program ffmpeg can use other libraries (depending on how it was built). For example, my ffmpeg program uses these codec libraries (in addition to the ffmpeg libraries themselves):
  • liba52
  • libdts
  • libfaac
  • libfaad
  • libmp3lame
  • libmp4v2
  • libogg
  • libtheora
  • libvorbis
  • libvorbisenc
  • libx264
  • libxvidcore
(this information found by running “ldd /usr/bin/ffmpeg” and filtering out non-codec libraries).

I don’t think this is true. At least not if you tell both to use the same libraries for encoding (usually lavc). You can probably construct a situation (i.e., tell mplayer to use lame and tell ffmpeg to use lavc) in which one beats the other in “speed”

BRILLIANT!

Thanks for clearing that up.

I'm using avidemux now having tried many command line and GUI apps. The output is smooth and excellent quality. A 1.5hr DivX movie encodes to DVD in about 50mins.


All times are GMT -5. The time now is 02:51 AM.