I have been using WinFF tool to convert panasonic default .MTS videos into mpeg videos. However, I am not happy with the quality of the mpeg video output. Could some one tell me if there are any other tool for Ubuntu or the options that should I use in WinFF for getting high quality mpeg output.


This site has a great tutorial on how to do it, and includes a helpful bash script that joins the MTS files before starting, as apparently not doing so can cause problems.

If you want to experiment before jumping into his instructions, you can try the following command. This creates an x264 AVI, you can easily change the output format by changing the libx264 part below to mpeg4.

ffmpeg -i your_file.MTS -acodec copy -vcodec libx264 -crf 21 -r 30000/1001 -deinterlace -vpre lossless_medium -y -threads 0 output_file.avi
  • Getting the following error with the above command. – samarasa May 27 '11 at 3:28
  • Getting the following error with the above command. please take a look. Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height. – samarasa May 27 '11 at 3:30
  • I'd try using the script in the site I linked to - the other thing is to make sure you have all of the codecs - perhaps you don't have libx264 installed? – John Lyon May 27 '11 at 3:50
  • 1
    I think you need to add -preset after -vcodec and also I think, depending on how you installed/compiled ffmpeg, the preset name is wrong. According to my compiled x264/ffmpeg the available presets are ultrafast,superfast,veryfast,faster,fast,medium,slow,slower,veryslow,placebo – duffydack Oct 28 '11 at 17:22
  • 1
    I get File for preset 'lossless_medium' not found – Martin Thoma Jan 7 '16 at 10:57

I used jozzas' method explained above, and converted a 124MB test MTS file to a 55 MB MP4 file.

Then, I downloaded Handbrake using the PPA install method, and with a single pass high profile conversion, converted the test file in one pass to a 49 MB file with no loss of quality.

A two-pass conversion using Handbrake resulted in a 19 MB file, again, with no loss in quality.

So, which do you want, the command-line version which reduces file size by 55%, or the GUI version which reduces file size by 85% ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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