[SOLVED] Trying to make a small mp4 from dvd in mint17
Linux MintThis forum is for the discussion of Linux Mint.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently downloaded several files of gospel movies (two hours length) in mp4 format suitable for android telephones, that have a size of less than 400 Megabytes. I have several more in the form of DVDs that I would like to include, and thought I would just encode them myself, but can't seem to get anything to work. Handbrake does a really good job, and it's strong point is touted as being that it easily makes mp4 files quickly and easily. But in Linux, it seems to be limited to producing mkv files only, and will not produce them as small as I'd like. Any advice here? Handbrake would be my choice, if it would produce the files I need as well as it produces mkv.
Ogmrip would be fine too, but gets hung up with an error. I found advice to install libavcodec-extra-54, and did so, but it did not seem to make a difference.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
ffmpeg and/or mplayer/mencoder will translate just about any format to any other, ffmpeg is probably easier to use if you don't want to do anything to fancy, just select an input file and an output file and it will use a reasonable set of defaults.
Thank you Keith Hedger. I am still looking into the use of ffmpeg. To me, it seems very complicated. Apparently, what I thought would be a simple operation is really quite complicated no matter which program I use. Ogmrip gets close with some of it's settings. So does Handbrake. Best results I have gotten so far, are in mkv format, but I was 'shooting for' mp4. My android phone plays mp4 just fine, but I've heard that not all do. If I knew more about that question maybe it would help. flv seems to get medium good quality at just over 200Mb for a two hour film. Not really pleased with "medium". mk4 does a little better at about 360Mb. But I keep looking at those mp4 files that I downloaded (about 360Mb for 2 hour film), and they seem to be proof that it is possible. Just having a hard time getting there.
The CLI approach might be the only way, but how to pin the various operations together, and the 'ins and outs' of the syntax involved seems daunting.
the '-i' switch sets the input file which can be anything that ffmpeg understands, and the output file type is decided by the extension, in this case mp4, you can then go on to tweak various values.
OK. I have put together this command:
~ $ ffmpeg -i /home/m17/Desktop/Dombi.mkv /home/m17/Desktop/Dombi.mp4
And I get this result:
ffmpeg version 2.3.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 30 2014 20:11:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration:
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
Input #0, matroska,webm, from '/home/m17/Desktop/Dombi.mkv':
Metadata:
encoder : libmkv 0.6.5.1
Duration: 00:32:26.62, start: 0.000000, bitrate: 2437 kb/s
Chapter #0.0: start 0.000000, end 601.211467
Metadata:
title : Chapter 1
Chapter #0.1: start 601.211467, end 1202.357667
Metadata:
title : Chapter 2
Chapter #0.2: start 1202.357667, end 1803.403467
Metadata:
title : Chapter 3
Chapter #0.3: start 1803.403467, end 1946.624875
Metadata:
title : Chapter 4
Stream #0:0(eng): Video: h264 (Main), yuv420p(tv, smpte170m), 714x480 [SAR 8:9 DAR 119:90], SAR 214:241 DAR 12733:9640, 29.97 fps, 29.97 tbr, 1k tbn, 180k tbc (default)
Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 160 kb/s (default)
[aac @ 0x262a300] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
I understand the first paragraph to be an identification of the program and it's precise version. Then there are seven libraries that are called. (I don't know if there is anything that could or should be done with them to adjust the results.)
Then there is a short paragraph or two about the actual process of dealing with the 'stream'. What little I can understand of what is said there, still leaves me without knowing how to go about changing it, or what program or library needs to be adjusted for the change, added to the problems of what would be the syntax, and how that change would affect the rest of the process and results. (For example “714x480” I'd guess refers to the size of the display in pixels.I'd be wanting it to become more nearly 250 by 110.)
But the the whole thing is delayed by the last paragraph (which I have shown in green and red – just as it appeared in my terminal, and I'm left with a zero-byte file called Dombi.mp4 I suspect (looking at the rest of the paragraph) that “aac” must be an audio encoder. But where to put the suggested modifiers in the command line, I don't know, since aac is not mentioned there – or if it should be, what would be the syntax? I tried:
ffmpeg -i -srict -2 /home/m17/Desktop/Dombi.mkv /home/m17/Desktop/Dombi.mp4
ffmpeg -i -srict-2 /home/m17/Desktop/Dombi.mkv /home/m17/Desktop/Dombi.mp4 (without the space between “-strict” and “-2”) and
ffmpeg -i '-srict-2' /home/m17/Desktop/Dombi.mkv /home/m17/Desktop/Dombi.mp4 None of which got me anywhere.
Last edited by littlejoe5; 02-22-2015 at 05:02 PM.
Reason: grammar and spelling.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.