60

I take photos and videos using Cheese on Ubuntu 12.04. They are in WebM formats.

How to convert them in other more conventional formats for making them compatible with other OS and devices (Windows, Mobiles etc)?

I am looking for an easy tool since I don't need to process my files further.

Thanks for the reply.

kamyogi
  • 1,308
  • 3
  • 18
  • 28

3 Answers3

103

With ffmpeg

I think you should do this with ffmpeg.

To install, type these lines in terminal:

sudo apt install ffmpeg

now you have ffmpeg installed, you can convert webm to mp4 by this command:

ffmpeg -i input_filename.webm output_filename.mp4

Let's say you have your sample.webm file in your downloads folder and you want to generate the output to the same folder. You run this command:

ffmpeg -i ~/Downloads/sample.webm -qscale 0 ~/Downloads/sample.mp4

If you don't want to type this long command every time in your terminal you can create a little bash function to do it for you.

In terminal type nano ~/.bashrc scroll down to the bottom and insert:

webmTOmp4 () {
  ffmpeg -i "$1".webm -qscale 0 "$1".mp4
}    
mp4TOmp3 () {
  ffmpeg -i "$1".mp4 "$1".mp3
}

Now you can do: mp4TOmp3 GENUINE\ -\ Thleilaxu-k8hrEbXURzg and the script will convert and save your new file with the same name to the same folder.

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
aegyed
  • 1,201
  • 1
  • 10
  • 13
  • We can perform this converting action without to download the repository you are talking about (only the native ffmpeg library). However, I have to say that the conversion process is very, very, very slow. Maybe with your upgraded files it will work faster? ??? – Juan Oct 21 '16 at 21:21
  • @Juan what upgraded files are you talking about? The converting and downloading process both are very fast to me. – aegyed Oct 23 '16 at 12:31
  • 1
    I'm talking about I use Ubuntu Studio 16.04 LTS and it has the ffmpeg library included on it. Also, I tried to download the jon-severinsson ppa but the system tells me that it doesn't exist. So... Also, in my system, the process is too slow and frame by frame. I think something is missing into your command line expression. Sorry, I'm not a programmer so I just copy and paste it. I don't have any clue about how to use and/or improve the use of the ffmpeg library. Sorry!!! – Juan Oct 23 '16 at 20:17
  • 10
    for latest version use `ffmpeg -i your_input_filename.webm -qscale 0 your_outfile_name.mp4` because option `-sameq` has been removed in latest package – Vineet Jan 01 '18 at 13:01
  • 1
    @Vineet Please use -q:a or -q:v, -qscale is ambiguous – Aleksandar Pavić Sep 10 '19 at 09:40
6

You can watch and convert videos using VLC.

Install VLC:

sudo apt install vlc

To convert videos, this article in Laptop Magazine recommends looking for the Convert/Save option in VLC's Media menu.

Amanda
  • 9,051
  • 17
  • 53
  • 98
ldias
  • 1,975
  • 9
  • 22
6

I recommend you to download the FF Multi Converter.

FF-Multi-Converter

have a look at this page :

FF Multi Converter

Private
  • 3,884
  • 9
  • 34
  • 48
  • In Ubuntu 16.04, the FF Multi Converter app is not to be found in the Ubuntu Software Center. Can I still install it on Ubuntu 16.04 by using the Terminal commands presented in the link? – Cristiana Nicolae Sep 20 '16 at 14:19
  • Meanwhile, I've found this link: https://github.com/Ilias95/FF-Multi-Converter/wiki/Installing-on-Ubuntu It seems to me that this app is "momentarily unavailable'. – Cristiana Nicolae Sep 20 '16 at 16:23