To keep AC3 tracks intact in your transcoding, i modify the mp4.sh with the "-E ac3" switch. You can see i've also modified the x264 encoding parameters as i want to keep the original resolution and I have better DXVA compatibility with those arguments:
Code:
./HandBrakeCLI -i $1 -o $2/$3.mkv -t $4 -f mkv -S 1500 -m -a $AUDIO1 -E ac3 -e x264 -p -2 -T -x ref=8:mixed-refs:bframes=3:b-adapt=2:weightb:direct=auto:b-pyramid:me=umh:subme=7:analyse=all:8x8dct:no-psnr:no-ssim:trellis=2:partitions=all:threads=auto:thread-input 2> ~/dvdripper/dvd2h264-error-output.log
But something strange is it nevers find the audio track. It gives me an mkv without audio.
If i use this commandline manually, with -a 1 as audio track, it takes it correctly and generate me an mkv with audio. Didn't had time to investigate on my side. Perhaps this problems occurs because of other mods i made on your script.
Other thing, i know it's something you don't want, but I really need to remove css from iso image, or some other players than xbmc can't play them.
So I changed your dvddd.sh to use Vobcopy instead of dd command.
This scripts give this:
dvddd.sh:
Code:
cd $2
# Now we rip the dvd
# rip the vob without CSS on my hardrive:
vobcopy -m -o $2/ISO > ~/dvdripper/dvdimport-output.log 2> ~/dvdripper/dvdimport-error.log
#rebuild an .iso image without css encryption:
mkisofs -dvd-video -o $2/$3 $2/ISO/* > ~/dvdripper/dvdimport-output.log 2> ~/dvdripper/dvdimport-error.log
rm -Rf $2/ISO/*
# Now it is time to check if all is done without a error
#RETVAL=$?
# We are finishd with the ripping ...
# Therefore we deleting the ripper-flag-files
# if the above dd command exit with error-code 0
rm ~/RIPPING_STARTET
rm ~/RIPPING_FILE
# Ok we have error with dd
#I ve commented this part for the moment as i don't know how to adapt it to my ripping process.
#if [ $RETVAL -nq 0 ] ; then
# touch > ~/RIPPING_ERROR
# echo there was error by ripping $1 >> ~/RIPPING_ERROR
# echo vobcopy error code was $RETVAL >> ~/RIPPING_ERROR
# echo See the the log-files inside $2 >> ~/RIPPING_ERROR
#
# cp ~/RIPPING_ERROR ~/dvdripper/ripping_error
#fi
exit
If i use this modded dvddd.sh manually, everything works ok.
But when it's called from your plugin, it says there were errors. I suspect some check of the .iso file size in your plugin during the rip process. But vobcopy starts firts ripping files in a folder, the iso is generated after.
So what do you think I should modify in other scripts to make it works from your plugin directly ?
Thanks .