MPlayer output to import to another program

Henk Postma henkpm at gmail.com
Tue Aug 8 19:39:40 UTC 2006


Hi José,

On 8/8/06, José Paulo Matafome Oleiro <matafomeoleiro at gmail.com> wrote:
>
>  Hi there to everybody.
> I've got a little question maybe you can help me.
>

Hardly a _little_ question ;-)

I've got files encoded in flv and wmv format. MPlayer can reproduce this
> kind of files. But I want to know if it's possible while playing the files,
> putting the output (video and audio to separated files, or to any program
> that can be used to edit this files and save them in another format?)
>

Yes, you can. It is a subject that can become really really complicated
really really quickly. You can use, e.g.
* mplayer  with -dumpvideo and -dumpaudio to dump raw audio and video
streams into separate files that you can process further, or
* mencoder to transcode into (e.g.) an avi file that you can then process
further, e.g. this command:

mencoder -really-quiet -oac mp3lame -lameopts br=128:cbr -ovc xvid
-xvidencopts bitrate=500 -vf scale=640:-3 -o $outputfile $inputfile

will encode the $inputfile to $outputfile into an avi file with video in
xvid with a bitrate of 500k, and audio in an mp3 stream with a constant
bitrate of 128k, with a width of 640 pixels and a proportionally (honoring
your input file video aspect ratio) height.

As I said, this can become very complicated very quickly. Things to ask
yourself are:
* What editing program are you going to use, and what file formats and
codecs can it handle?
* What codec do you want to use for the intermediate result?
* what codec do you want to use for the final result?
* do you want to use the same for both? Remember divx, xvid and the like are
lossy, so many repeated editing steps could degrade the quality. Working on
the raw audio/video stream however can eat a lot of disk space
* what resolution do you want?
* what bitrate do you want?
* what framerate do you want?
* how much processing power do you have?

The manual for mplayer and mencoder (both in a single man page) are really
good. I suggest you start reading there, and look for the switches I
mentioned above.
# man mencoder
hit "/", type some search term, hit enter, and "/", "enter" until you  get
to what you want.

Good luck!

-- Henk

-- 
http://www.its.caltech.edu/~postma/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060808/a0b548eb/attachment.html>


More information about the ubuntu-users mailing list