Changing Video Format

Not strictly a Linux question but I do need a solution that runs on Kubuntu 19.10.

I want to make backups of my dvds. The one test dvd made a mkv file using MakeMKV. Of course it’s a large file. I’m trying to reduce the video down to an acceptable size using Handbrake and changing it to mp4. The problem is that the format is not playable on my Samsung tv and somehow the latest update bricked my Nvidia Shield.

How can the format be changed from mkv to mp4 while reducing the size? I’d rather not take more than two steps at the most. And I don’t see how to change the file format in Handbrake. What are my options?


If you are comfortable with the command line, using ffmpeg may be what you’re looking for. You should be able to reduce the file’s size by doing this, after substituting the file’s name where applicable. I suggest making a backup of the file to be safe.

Is it necessary to keep it in the mkv format? After a quick skim of this, I think you may need to convert it to a different format in order to play it on your (smart?) tv.

Not knowing how to change the format is the problem. I want it to be mp4. I need to proof read posts before saving.

I’ll take a look at the links. Thanks

This might be your solution, then. Let me know if you are not familiar with the command line; I may have a graphical option.

1 Like

I’m doing a trial run right now. There is a GUI, WinFF.

I may end up adding a step by using ffmpeg to change the container to mp4 then use handbrake to reduce the size. No worries. Something to play around with. Thanks

this should do:

ffmpeg -i myvideo.whatever -c:v libx264 -c:a copy myvideo.mp4

you can replace libx264 with any codec ffmpeg supports that your tv can read. h264 (the one I indicated in the command above) should work pretty much everywhere.


Did you ever find a solution for this? I am doing the same thing with my DVDs. So I rip it with

makemkvcon --minlength=3600 -r --decrypt --directio=true mkv disc:0 all /home/user/dvd/MOVIE_TITLE

Then when that’s done, I take the mkv that I want from that rip and condense with it HandBrake CLI using

HandBrakeCLI -Z "Fast 1080p30" -i input.mkv -o path/to/output.mp4

This condensed a 5.4GB DVD rip down to 492M and the quality is pretty good (at least on my laptop screen).

EDIT: When displayed via HDMI to a TV, quality was terrible. I’ll have to look at what I can do to get it higher quality

1 Like

I’m a fan of WinFF myself. I’m not suggesting the OP was by a noob, but here is what I would say to a noob:

In the “Output Details” tab, under “Convert to:” I choose “MPEG-4”, then under “Preset:”, I choose “MPEG-4 720p”. I also choose a different Output Folder.

When you click the “Options” button, more tabs get revealed. In the “Video” tab, I specify a smaller “Video Size”, like 640x360, then in the “Audio” tab, I set “Audio Bitrate” to 80, and “Audio Channels” to 1. Then I click the “Convert” button at the top.

These directions even work on a video shot in portrait mode with my phone! And I didn’t have to specify anything to do with orientation or rotation. :slightly_smiling_face:

This shrunk a 1 minute 1080p video of 143MB, down to 23MB. Suitable from serving from a Nextcloud share, suitable for streaming even over a modest cellular data connection.