Showing posts with label video. Show all posts
Showing posts with label video. 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

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