LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 02-17-2015, 03:47 PM   #1
littlejoe5
Member
 
Registered: Aug 2006
Location: Arizona
Distribution: ubuntu dirivatives mostly Mate
Posts: 260

Rep: Reputation: 19
Trying to make a small mp4 from dvd in mint17


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.
 
Old 02-17-2015, 06:30 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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.
 
1 members found this post helpful.
Old 02-22-2015, 12:05 AM   #3
littlejoe5
Member
 
Registered: Aug 2006
Location: Arizona
Distribution: ubuntu dirivatives mostly Mate
Posts: 260

Original Poster
Rep: Reputation: 19
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.
 
Old 02-22-2015, 06:26 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Try starting with the basic encoder and then just add the bits you want to tweak, for instance to convert to mp4 with ffmpegs default settings
Code:
ffmpeg -i /media/SkyNet/WebSites/MP_ROOT/101PNV01/new/M2U00003.MPG /tmp/out.mp4
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.
 
1 members found this post helpful.
Old 02-22-2015, 04:59 PM   #5
littlejoe5
Member
 
Registered: Aug 2006
Location: Arizona
Distribution: ubuntu dirivatives mostly Mate
Posts: 260

Original Poster
Rep: Reputation: 19
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [Kinda SOLVED]I want to make a log entry when Mint17 is shutdown mikecolley Programming 3 10-09-2014 07:10 PM
HOWTO make a video DVD from an avi/mp4/etc... file type? lleb Linux - Software 5 08-08-2011 12:56 PM
need to convert dvd to mp4 cuda Linux - Software 3 10-01-2007 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration