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

Tuesday 12 August 2008

Connecting to Internet using a Sony Ericsson K530i mobile phone in Ubuntu (Linux) via USB cable

We are going to connect our Ubuntu system to Internet using a Sony Ericsson K530i phone via a usb cable.

First of all we switch on our phone, we insert the pin number and then connect the usb cable that came with the phone to our K530i and to our computer.

A menu presenting three choices will appear on the phone screen:

  • File transfer
  • Phone mode
  • Print

We select Phone mode.

Now our phone is ready to use the usb cable.


There are two ways to connect to Internet via USB:
  • Emulating a ethernet device through a usb cable.
  • Using the K530i mobile phone as a usb serial modem.


EMULATING A ETHERNET DEVICE THROUGH USB CABLE


Our system Linux kernel has to already be compiled with cdc_ether module support. This module performs the emulation.


Let's configure our phone, we go to:
Menu->Settings->Connectivity->USB->USB Internet->USB data accounts
and select our Internet ISP provider account.

If there is not an already configured account we shall create a new account:
Menu->Settings->Connectivity->Data comm.->Data accounts->New account

Some APNs from Spanish Internet providers are:

Movistar: movistar.es
Vodafone: ac.vodafone.es
Yoigo: internet
Orange: internet

Usually user and password are not needed.


At the end, we establish the connection:
Menu->Settings->Connectivity->USB->USB Internet->Turn on

To check what has happened, we open a console and execute:
$ifconfig

An interface like usb0 with its IP address correctly configured will appear.


When we finish navigating, we switch off the connection:
Menu->Settings->Connectivity->USB->USB Internet->Turn off


USING THE K530i MOBILE PHONE AS A USB SERIAL MODEM