Skip to content

Instantly share code, notes, and snippets.

@jmbarbier
Last active December 16, 2015 04:58
Show Gist options
  • Save jmbarbier/5380676 to your computer and use it in GitHub Desktop.
Save jmbarbier/5380676 to your computer and use it in GitHub Desktop.
mplayer et ffmpeg dvd ripping
echo "Liste des chapitres"
read CHAPTERS
echo "Nom de base du fichier"
read FILENAME
# Getting vob by chapter
# STARTCHAPTER
# ENDCHAPTER
# FILENAME
for c in $CHAPTERS
do
mplayer dvd://1 -alang fr -noautosub -chapter $c-$c -dumpstream -dumpfile $FILENAME-$c.vob
done
# Encoding crf
# TUNE : film | animation | grain | stillimage | psnr | ssim | fastdecode | zerolatency
# PRESET : ultrafast |superfast | veryfast | faster | fast | medium | slow | slower | veryslow | placebo
# CRF : 0 - 50 (default = 23)
# De-interlace with yadif
# - disney bonne qualité : preset medium, tune animation, crf 21
# Si pas bonne piste audio : rajouter -map 0:0 (pour la piste vidéo) et -map 0:x (x=numéro du flux audio désiré)
echo "Liste des chapitres"
read CHAPTERS
echo "Nom de base du fichier"
read FILENAME
echo "Tune : film | animation | grain | stillimage | psnr | ssim | fastdecode | zerolatency"
read TUNE
echo "Preset : ultrafast |superfast | veryfast | faster | fast | medium | slow | slower | veryslow | placebo"
read PRESET
echo "Qualité : 0-50 (std=23)
read CRF
for c in $CHAPTERS
do
ffmpeg -i $FILENAME-$c.vob -vf yadif -c:v libx264 -preset $PRESET -tune $TUNE -crf $CRF -c:a libmp3lame -b:a 128k $FILENAME-$c.avi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment