How to convert mpeg to mp4?

17,165

Solution 1

You could use VLC to convert mpeg files to mp4. To do this:

  • Open VLC

  • Click on Media in the menu bar and select "Convert / Save"

  • In the "File" tab, click on "Add..." button and choose the file to convert from the file browser dialog box that opens up

  • Click on "Convert / Save" and verify that the source file is exactly the one which you want to convert and give an appropriate file name for the destination file, appended with ".mp4" and choose the format for the destination file. In your case this would be "Video - H.264 + MP3 (MP4)" and then click on "Start"

This may take some time depending upon the length of the file and when it finishes, voila! You have your file ready.

Solution 2

Your copy of avconv is missing the encoder libvo_aacenc which you can restore by simply installing the extra libavcodec package:

sudo apt-get install libavcodec-extra-54

This should allow WinFF to convert to aac again!

Mind you the better aac codec is libfdk-aac but I believe this is not available in the 14.04 avconv / libav-tools...

Share:
17,165

Related videos on Youtube

Braiam
Author by

Braiam

Updated on September 18, 2022

Comments

  • Braiam
    Braiam over 1 year

    I would like to convert an MPEG TS file to MP4. Is there software for Ubuntu that I can buy that just works?

    In 13.10 I did the following with success: Edit the file with DVB-CUT and export to MPG. Then open the MPG in WinFF, select MP4 with High Quality preset and convert but in 14.04 this fails with the following error:

    avconv version 9.11-6:9.11-2ubuntu2, Copyright (c) 2000-2013 the Libav developers
      built on Mar 24 2014 06:12:33 with gcc 4.8 (Ubuntu 4.8.2-17ubuntu1)
    [mpeg @ 0x16f4d40] max_analyze_duration reached
    Guessed Channel Layout for  Input Stream #0.1 : stereo
    Guessed Channel Layout for  Input Stream #0.2 : mono
    Input #0, mpeg, from '/home/magnus/Desktop/Car Rescue.mpg':
      Duration: 00:44:28.33, start: 0.245800, bitrate: 2352 kb/s
        Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 9500 kb/s, 25 fps, 50 tbr, 90k tbn, 50 tbc
        Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
        Stream #0.2[0x1c1]: Audio: mp2, 48000 Hz, mono, s16p, 64 kb/s
    Unknown encoder 'libvo_aacenc
    
    Press Enter to Continue
    
    • Mitch
      Mitch about 10 years
      Take a look at HandBrake.
    • Admin
      Admin about 10 years
      Thanks, I was just about to try Handbrake which I have used before but find a bit complicated when I tried the VLC method described below.
    • Admin
      Admin almost 10 years
      /usr/bin/avconv -y -i "/home/magnus/one.mpg" -f mp4 -r 29.97 -vcodec libx264 -preset slow -filter:v scale=704:384 -b:v 1000k -aspect 16:9 -flags +loop -cmp chroma -b:v 1250k -maxrate 1500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec aac -strict experimental -b:a 112k -ar 48000 -ac 2 "/home/magnus/one.mp4"
  • Bumsik Kim
    Bumsik Kim about 10 years
    Worked exactly as per your instructions. Thank you!
  • Bumsik Kim
    Bumsik Kim almost 10 years
    While this did work, the resulting mp4 file didn't play correctly on an iPad.
  • Admin
    Admin almost 10 years
    Doesn't this cause problems in removing libavcodec54?