How to convert a video from mp4/flv to mpeg/mpg

Solution 1:

Use ffmpeg utility, it's awesome.

1. Install:
sudo apt-get install ffmpeg

2. Convert:
ffmpeg -i input.mp4 output.mpeg

PS: For available formats supported by ffmpeg:
ffmpeg -formats

Solution 2:

this can be done with avconv

sudo apt-get install libav-tools

and then use (for mpeg 2)

avconv -i video.mp4 -c:v mpeg2video video.mpg

also, check the (impressive) list of audio and video codecs with avconv -codecs

Solution 3:

There are many good video Converters wich can run CLI or GUI.

I advise you to give a try to transmageddon.

To install just:

sudo apt-get install transmageddon

enter image description here

In the output field you can specify MPEG4.


Another pretty easy to use is Handbrake

enter image description here

To install in ubuntu:

sudo apt-add-repository ppa:stebbins/handbrake-releases 
sudo apt-get update 
sudo apt-get install handbrake

Solution 4:

Use avconv this way:

avconv -i file.mp4 -c:v mpeg2video -q:v 2 -c:a libmp3lame output.mpg