Showing posts with label mplayer. Show all posts
Showing posts with label mplayer. Show all posts

Sunday, 6 May 2012

Convert videos to VP6 codec format using MENCODER


This post shows how to encode a video file into VP6 codec, using mencoder program.

As a result we will create a FLV (Macromedia flash player) media file (instead of an avi file)


We will get "On2 VP6" video codec driver from a windows dll.

Mencoder is a tool provided by MPlayer to encode movies, and convert between file formats and codecs.


INSTALL MENCODER


First we obtain mencoder tool.

In debian:
$ sudo aptitude install mencoder

Current mencoder version when this article was written:
Version: 2:1.0~rc4.dfsg1+svn34540-1+b1

Another way to get mencoder could be installing from source code.


OBTAIN BINARY CODECS


Binary codecs come separately from mencoder. We can download them from MPlayer pages:
http://www.mplayerhq.hu/design7/dload.html
http://www.mplayerhq.hu/MPlayer/releases/codecs/

To see if a codec is supported:
http://www.mplayerhq.hu/DOCS/codecs-status.html


I have an amd64 architecture but I have to download ESSENTIAL CODECS for X86 anyway:
$ wget www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
$ tar xvjf essential-20071007.tar.bz2

The windows dll we need is this (check it does appear):
vp6vfw.dll


Next we place binary codecs in a directory where mplayer or mencoder can access them:
$ sudo mkdir /usr/lib/codecs
$ sudo cp -v essential-20071007/* /usr/lib/codecs/
NOTE: if you installed mplayer from source location could be: /usr/local/lib/codecs


CONFIGURING VP6 SETTINGS

Thursday, 5 January 2012

Split a Media Video File (AVI, FLV,...) using Mencoder and Mplayer

Mencoder is a movie encoder program that allows us to split a media video(e.g AVI) file into several AVI files.

We are going to split a media video file maintaining same video and audio codecs.

As mencoder accepts other file formats than avi files, we will be able to split them too, but result will be avi files.


SPLIT ONE FILE INTO TWO


E.g: We are going to split foo.avi file into foo1.avi(600 seconds long) and remaining length in foo2.avi.

Following mencoder man page advice, we could try these options:
$ mencoder foo.avi -o foo1.avi -oac copy -ovc copy -endpos 600
$ mencoder foo.avi -o foo3.avi -oac copy -ovc copy -ss 600


mencoder options:

Wednesday, 20 August 2008

Joining two AVI files with MENCODER

It is usual having an avi film split into two cdrom sized files of 700 megabytes each.

mencoder utility allows us to concatenate these two parts into a new reintegrate file.

mencoder (MPlayer's Movie Encoder) is a tool MPlayer provides to encode multimedia contents into files.
It supports among others, MPEG-4 video, libavcodec codecs, and PCM/MP3/VBRMP3 audio formats.
mencoder also possesses stream copying abilities and a powerful filter system (crop, expand, flip, ....).


So we have a film split into two files e.g: foo1.avi and foo2.avi, both with the same encoding characteristics (window size, codecs, bitrate...),

We execute this command that produces an output file called foo.avi which is the result of concatenating foo1.avi and foo2.avi files.
$mencoder -oac copy -ovc copy -forceidx foo1.avi foo2.avi -o foo.avi

The command options mean:
* -oac output audio codec
* -ovc output video codec
* -o output file name
* -forceidx forces creation of a new index.
copy means copying the original stream and do not change the codec it is encoded into (because of that it is very fast).


more info executing: $man mencoder

INSTALLING MENCODER


YOU MAY ALSO BE INTERESTED IN:

Split a Media Video File (AVI, FLV,...) using Mencoder and Mplayer

Convert videos to VP6 codec format using MENCODER

Friday, 15 August 2008

Downloading, Compiling and Installing MPlayer on a Ubuntu System

We are going to download MPlayer sources and binary codecs, configure, compile and install them on our Ubuntu system.

I do not want a graphical interface, so I will compile MPlayer without it.


DOWNLOADING MPLAYER SOURCES


We first download the sources: (I pick up the latest source version, if it does not work pick up latest stable one)

(I choose to download it from a German mirror: MPlayer source download page)
$wget http://www7.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2


DOWNLOADING BINARY CODECS


MPlayer binary codecs download page

As I have a Linux x86 platform ,I choose its corresponding package:
$wget http://www7.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2

This page shows an updated list of supported codecs: Codec Status page


In order to install the binary codecs

We create the directory where we will place the codecs:
$sudo mkdir /usr/local/lib/codecs

We untar the codecs and then move them into their place:
$tar xvfj essential-20071007.tar.bz2
$cd essential-20071007/
$sudo cp * /usr/local/lib/codecs


CONFIGURING OSD FONTS