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. |
![]() |
#1 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
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.
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT Last edited by microchip8; 10th February 2013 at 14:20. |
![]() |
![]() |
![]() |
#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 |
![]() |
![]() |
![]() |
#3 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
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.
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#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' |
![]() |
![]() |
![]() |
#6 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
Quote:
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
|
![]() |
![]() |
![]() |
#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/ ![]() |
![]() |
![]() |
![]() |
#8 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
Sure, but if your distro provides a supported version (1.0 and higher) you can use it instead. My openSUSE 12.2 has ffmpeg 1.0.4 and it works with no issues
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#10 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
Yes, I understand that but on the other way, omitting them to support a broader range of ffmpeg versions sacrifices quality :P
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#11 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
@Darksoul71
I looked at your Python scripts and I must say it looks Chinese to me, haha. I'm so used to Bash that I guess I'll have difficulties learning something else.
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#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 ![]() |
![]() |
![]() |
![]() |
#13 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
ChangeLog for version 1.6
Code:
* Use XML file for dvdauthor * Be compatible with dvdauthor version 0.7.x
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#14 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
ChangeLog for version 1.7
Code:
* Added resolution to the dvdauthor XML file * Added chapter marks at every 5 minutes to the dvdauthor XML file * Few typo fixes
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#15 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
ChangeLog for version 1.8
Code:
* & character is often present in movie titles. Escape it in the dvdauthor XML file
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#16 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
ChangeLog for version 1.9
Code:
* Added workaround for input files with spaces in their name
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#17 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
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
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#18 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
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
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#19 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
ChangeLog for version 2.2
Code:
* Added support for interlaced encoding and deinterlacing * Use -trellis 2 for the -vhq, -ehq and -uhq presets * Set GOP to 15 for PAL and 18 for NTSC
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
#20 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: Belgium
Posts: 1,691
|
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
__________________
TV: Samsung 50" QE50Q60T AVR: Yamaha HTR-4069 5.1 CD Player: Yamaha CD-S300 DAB+ Tuner: Yamaha T-D500 BD Player: Samsung UBD-M8500 UHD Speakers: Klipsch 5.1 Reference Phono: TEAC TN-180BT |
![]() |
![]() |
![]() |
Tags |
dvd, ffmpeg, file2dvd, mencoder, mpeg2 |
Thread Tools | Search this Thread |
Display Modes | |
|
|