Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I download videos in mp4 or flv format but I need to convert them to mpeg 1/2/3 so that I can watch them on my special gadget.

I think I need a program.

any suggestion thanks

share|improve this question
2  
@AkasAntony I would say it is clear that this recent meta discussion has affirmed that conversion type questions are on-topic, and should not be closed unless they are duplicates. –  user76204 Mar 7 '13 at 18:35
add comment

marked as duplicate by rusty, Florian Diesch, Eric Carvalho, Alvar, wojox Mar 10 at 13:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5 Answers

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

share|improve this answer
1  
ffmpeg is going to be replaced by avconv ! ;) –  riimzzai Mar 7 '13 at 18:26
1  
what makes avconv more featured than ffmpeg ?? –  Mina Mohsen Mar 7 '13 at 18:29
1  
it seems they have merge. when you try some ffmpeg command, you will get something like : ffmpeg version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers built on Jan 24 2013 18:03:14 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. **Please use avconv instead**. –  riimzzai Mar 7 '13 at 18:37
2  
@riimzzai The ffmpeg and avconv projects have not merged and are very much still separate if you take a look at their respective websites. –  user76204 Mar 7 '13 at 18:44
1  
@ mik : youre right it seems they are concurrent and ffmpeg is not dead ! see interesting info here stackoverflow.com/questions/9477115/… –  riimzzai Mar 7 '13 at 18:49
show 3 more comments

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

share|improve this answer
    
thanks mate riimzzai ..because I am quite new to linux, could you please explain to me what " -c:v" means? I mean should I adopt this code to my folder names? –  emre Mar 7 '13 at 18:29
    
-c:v is for video codec (you can replace it by -vcodec) -c:a is for audio codec, etc. check the man page : man avconv, you will see how this tool is powerful (you even can backup dvd). –  riimzzai Mar 7 '13 at 18:41
    
thanks again I just use the first code but I got this ----- sudo apt-get install avconv Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package avconv what should I do –  emre Mar 7 '13 at 18:43
    
sorry correction done : libav-tools. you still can install it via Software Center searching libav or ffmpeg or avconv –  riimzzai Mar 7 '13 at 18:57
    
well I am unlucky today .software manager seems to be working but it froze even I cant stop it on screen..is there any way to stop this program and re-open it –  emre Mar 7 '13 at 19:04
show 1 more comment

I found ffmpeg quality is not good. I tried avconv this way and i get a better quality.

avconv -i file.mp4 -c:v mpeg2video -q:v 2 -c:a libmp3lame output.mpg
share|improve this answer
add comment

There are many goo video Converters with 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
share|improve this answer
add comment

I use Arista Video Transcoder on Ubuntu. Though not highly rated, it is very good for video conversion. I use it to convert videos to match PSP's supported framerate and it does the job just fine. Most of the other prominent ones strip the quality while converting to a lower resolution, but Arista maintains the quality even when stepping the resolution down to that of a mobile device's.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.