- if [[ "$encoder" == "makemkv" ]]; then
- make_dvd_mkv_image_from_folder "$dvdpath" "$tmpdir/$dvdname.mkv" 1
- else
- make_dvd_iso_image_from_folder "$dvdpath" "$tmpdir/$dvdname.iso" 1
- fi
- fi
-
- # make sure our isofile value is set
- if [ -z "$isofile" ]; then
- if [[ "$encoder" == "makemkv" ]]; then
- isofile="$tmpdir/$dvdname.mkv"
- else
- isofile="$tmpdir/$dvdname.iso"
- fi
- fi
-
- # MakeMKV special case
- if [[ "$encoder" == "makemkv" ]] && [[ $make_final_dest_comp -eq 1 ]]; then
- echo "-> Encoding the DVD video to a compressed file using $encoder" | tee -a "$logfile"
-
- # eject the DVD disk since we are finished with it
- [ $eject_disk -eq 2 ] && eject -T $dev
-
- # Encode the final MKV file
- encode_mkv_file_makemkv "$isofile" "$dest/$dvdname.mkv"
-
- # remove the intermediate ISO file
- remove_intermediate_iso_file
-
- # keep intermediate log files
- if [ $keep_intermediate_files -eq 0 ]; then
- [[ -e "$passlogfile" ]] && rm -f "$passlogfile";
- else
- echo "-> Keeping mencoder 2pass logfile: $passlogfile"
- fi
-
- # add this video data to the mythtv DB
- fill_mythvideo_metadata "$dest/$dvdname.mkv"
-
- # All done!
- exit 0