#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/dvd DVD=/dev/sr0 make-dvd-from-video () { local video=$1 local name=${video:r} local mpg=${name}.mpg local dvd=${name}-dvd/ local iso=${name}.iso ffmpeg -i $video -target pal-dvd $mpg echo PAL > ~/.config/video_format dvdauthor -o $dvd -t $mpg dvdauthor -o $dvd -T genisoimage -dvd-video -v -o $iso $dvd } meta-dvd () { dvd+rw-mediainfo $DVD } alias {dvd-meta,dvd}=meta-dvd blank-dvd () { sudo dvd+rw-format -blank $DVD } burn-iso-to-dvd () { umount $DVD local iso=$1 growisofs -speed=1 -dvd-compat -Z $DVD=$iso } burn-iso-to-cd () { umount $DVD local iso=$1 wodim -v dev=$DVD -eject -sao $iso } burn-iso-to-cd-debug () { umount $DVD local iso=$1 wodim -V dev=$DVD -eject -sao $iso 2>&1 | tee -i /tmp/wodim_log }