Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
10th February 2013, 14:10 | #1 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
|
file2dvd for Linux
Hi,
I wrote a small script for converting video files into DVD compliant encodes and structures. The main reason for writing it was so I can watch DVDs on my Medion TV which has an integrated DVD player, but doesn't support DivX/Xvid and co codecs. The output from the script works with no issues on my DVD player but I can't guarantee it will do the same on other DVD players. Best is to test and see. Requires bc, MPlayer, ffmpeg (for encoding), dvdauthor and mkisofs (which should be a link to genisoimage) http://sourceforge.net/projects/file2dvd/ PS: this script is dedicated to my mom, who's a big movie lover and who passed away from cancer on the 26th of January 2013. Last edited by microchip8; 10th February 2013 at 14:20. |
19th February 2013, 19:46 | #2 | Link |
Can you blush ?
Join Date: Oct 2001
Location: Northern Europe
Posts: 696
|
Hi there,
thanks for sharing this...it is always nice to see how other people solve their problems. And sorry to hear about your mother. It always hurts when a beloved one goes away. I must admit that I rather use Windows plus the Freemake Video Converter for such purposes. You simply drag in your source video(s), choose the output format and click on "go". Just allow me a comment / question: May I ask why you mainly use Bash scripting for your tools ? Personally I always found Python more suitable and simpler for a lot of purposes (e.g. string processing, calculation). I often simply "glue" together a few bash arguments with Python and do things like string processing, comparison, etc in Python. Here are three examples for my crappy scripts. MKV DTS to AC3 converter (converts DTS to AC3 streams and strips DTS streams): http://pastebin.com/w6JtVczr MKV DTS to AC3 converter (which only adds AC3 streams to the MKV and leaves the DTS streams in place): http://pastebin.com/0QaYSWFC A simple multi process MP3 encoder: http://pastebin.com/Cd71eU6a |
19th February 2013, 19:57 | #3 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
|
Hi Darksoul71
Thanks for the heads up. The reason why I use Bash is because it's the only thing I know at the moment and I lack the time to learn something new and probably better than shell scripting. |
20th February 2013, 15:15 | #5 | Link |
Can you blush ?
Join Date: Oct 2001
Location: Northern Europe
Posts: 696
|
Just a short note:
Not all of the encoding parameters you use, are supported by the standard version of ffmpeg included with Ubuntu-based distro. Using your script under the latest Linux mint version I get this error messages: Code:
Unrecognized option 'mpv_flags' Failed to set value '+cbp_rd' for option 'mpv_flags' |
20th February 2013, 15:20 | #6 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
|
Quote:
|
|
20th February 2013, 17:22 | #7 | Link |
Can you blush ?
Join Date: Oct 2001
Location: Northern Europe
Posts: 696
|
So, in other words one is better off to use a pre-compiled static version of ffmpeg from pages like this:
http://ffmpeg.gusari.org/static/64bit/ |
20th February 2013, 18:27 | #9 | Link |
Can you blush ?
Join Date: Oct 2001
Location: Northern Europe
Posts: 696
|
Yes, for sure !
I just wanted to highlight this ! Those error messages about unsupported options are simply not self-explaining for people which are not skilled with the shell and / or the standard Linux AV tools such as ffmpeg or mencoder. That's why I highlighted it. |
24th February 2013, 12:21 | #12 | Link |
Can you blush ?
Join Date: Oct 2001
Location: Northern Europe
Posts: 696
|
@froggy1: Agreed....I had the benefit of a one week seminar about coding Python last year.
This was my entry...but I have to admit that my code is quite ugly.... In the end: It works for me and this is all what is important to me |
14th May 2013, 16:09 | #17 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
|
ChangeLog for version 2.0
Code:
* Added one more preset (-nq - Normal Quality) * Added -v option to display version * Added -h option for help info. Currently this just calls the man page * All presets now use a dash (eg, -vhq) for consistency reasons * Use -vf scale instead of -s for resolution scaling * Add Volume ID when creating ISO file * Updated the man page |
15th May 2013, 09:26 | #18 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
|
ChangeLog for version 2.1
Code:
* Added support for a config file. It will be located in $HOME/.file2dvd. In the config file one can set the default output dir, default scaler, default nice value and the paths to the programs * Allow user to specify the passmode (ie, 1-pass or 2-pass encoding). This introduces the -1p and -2p switches * Check status of ffmpeg. Abort and clean up if it's not successful and notify the user * Check status of dvdauthor. If successful, proceed with ISO creation. If not successful, warn and exit * Remove dvdauthor XML file upon success * Updated the man page |
17th May 2013, 09:35 | #20 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
|
ChangeLog for version 2.3
Code:
* Don't use -target pal|ntsc-dvd and instead go the "manual" way of config. This approach seems to eliminate buffer underflow messages on older ffmpeg versions (eg, 1.0.x) and potentionally fixes freezes on some DVD players * Minor quality optimizations to the presets * Reworked the interlace/deinterlace code * Use the clean_func() function when exiting upon error. That way we can remove the output directory which is no longer needed in such case |
Tags |
dvd, ffmpeg, file2dvd, mencoder, mpeg2 |
|
|