Nokia 800
Revision as of 23:10, 18 August 2021 by Williamgray ywa14u61 (talk | contribs) (Created page with "/home/william/handbrake -2 -t 1 -w 400 -l 240 -b 512 -r 25 -B 128 -R 44100 -i path_to_VTS_files -o output_filename.mp4 Script for easy conversion of DVD to mpgs for N800 #F...")
/home/william/handbrake -2 -t 1 -w 400 -l 240 -b 512 -r 25 -B 128 -R 44100 -i path_to_VTS_files -o output_filename.mp4
Script for easy conversion of DVD to mpgs for N800
#Feel free to reuse this script #And when you are finished hacking it to bits drop me a line and I will happily #add the hacked bits to this script for others #But dont forget to go and get a Purple alert Card for those emergencies #!/bin/bash # This will convert all titles on a DVD to N800 in fairly good quality. # $1 = DVD/VIDEO_TS (eg. /media/TitleOfDVD ) # $2 = ~/dvds/titlename/title1 to $3 # ($3 = number of titles) # if no args then show do ls of /media and of /mnt # and if no $2 then show number of titles in $1 #./handbrake -2 -t 1 -w 400 -l 240 -b 512 -r 25 -B 128 -R 44100 -i $1 -o $2 # echo "# This will convert all titles on a DVD to N800 in fairly good quality."; echo "# 1st argument is the DVD path eg = /mnt/ "; echo "# 2nd argument is the actual DVD path name eg if /mnt/dvd then just dvd"; echo "# 3rd arugment is the start title to convert"; echo "# 4th argument is the final title to convert"; echo "# if no argumentss then program will do ls of /media and of /mnt so you can determine the DVD path names"; echo "# and if no 3rd argument then it will show the number of titles in the path given"; echo "#"; echo "#"; echo "#"; echo "#"; echo "#"; echo "#"; echo "# SAMPLE COMMAND : ./DVDtoN800.sh /media/ MyDVD 1 8 "; echo "#"; echo "# the sample command will convert titles 1 to 8 on the DVD and output the new mini files to ~/N800DVDS"; echo "# Note the space between /media/ and MyDVD this allows the folder to be created in N800DVDS"; echo "#"; echo "#"; echo "#"; if [ ! -d ~/N800DVDS ]; then echo "#"; echo "#"; echo "#"; echo "Creating ~/N800DVDS directory for DVDs"; echo "#"; echo "#"; echo "#"; mkdir ~/N800DVDS; fi if [ $3 ]; then # do the work echo "#"; echo "#"; echo "#"; echo "Converting DVD"; mkdir ~/N800DVDS/$2; echo "Converting chapters $4 to $5 "; for COUNTER in `seq $4 $5`; do echo "Converting Title $COUNTER"; echo ./handbrake -2 -t $COUNTER -w 400 -l 240 -b 512 -r 25 -B 128 -i $1$2/VIDEO_TS -o ~/N800DVDS/$2/$2$COUNTER.mp4; ./handbrake -2 -t $COUNTER -w 400 -l 240 -b 512 -r 25 -B 128 -i $1$2/VIDEO_TS -o ~/N800DVDS/$2/$2$COUNTER.mp4; let COUNTER=COUNTER+1 done echo "#"; echo "#"; echo "#"; exit; fi if [ $1 ]; then #show titles echo "Showing you the titles - you need the number of them I can find on the DVD"; echo "As soon as you see the number eg. 2 to 11 you can press CTRL+C to break then rerun and put which titles you want to convert into the second arg"; ./handbrake -t 0 -i $1$2/VIDEO_TS ; echo "----End of List----"; exit; else echo "You have not supplied any arguments - I will show you a list of what your DVD access may be :-"; echo "Under the media folder is :-"; echo ""; ls -ad /media/*; echo ""; echo "--------------------"; echo "Under the mnt folder is :-"; echo ""; ls -ad /mnt/*; echo ""; echo "--------------------"; fi