[Ubuntu-BR] remover audio de um DVD
Alberto Rolim
rolim em ramsons.com.br
Terça Abril 4 15:30:04 UTC 2006
gente
alguem perguntou uma vez a umas duas semanas atras como poderia fazer
para tirar o audio de um dvd e nao consigui mais achar o email, eu
precisei fazer o mesmo serviço uns dias depois pra um amigo meu e acabei
achando um script que faz o serviço. No inicio do script diz todas as
dependencias necessarias e o que deve fazer pra utiliza-lo.
segue o script
#!/bin/bash
#################################################
# WHAT is dvd2wav ?
# Script to convert DVD audio chapters to wav. Ideal for concerts DVD.
#################################################
# INFO
# Authors : yeKcim - yeknan em yahoo.fr - http://yeknan.free.fr
# Bobousse + Taliesin + Philippe
(http://forum.ubuntu-fr.org/viewtopic.php?id=25000)
# Licence : GNU GPL
# Dependency
# zenity
# mplayer (mplayer-nogui if you don't want to install user interface)
# Based on
# WOM_audioconverter
# NIS
# http://www.letare.net/linux/install_system.html#rippSonDvd
# History
# 15.01.2006 : v0.1 : First public version
# Install
# Put on ~/.gnome2/nautilus-scripts/
# In a console : chmod u+x ~/.gnome2/nautilus-scripts/dvd2wav
version="0.1"
#################################################
# TRADUCTIONS
###### Default = English #####
title="dvd2wav "$version""
nobin="Program mplayer is not installed, please install !"
titlechoice="Título para conversão ?"
chapdebchoice="Primeira chapa para conversao ?"
chapfinchoice="Ultima chapa para conversao ?"
bepatient="Trabalho em progresso"
case $LANG in
######## Français ########
fr* )
title="dvd2wav "$version""
nobin="Le programme mplayer n'est pas installé, veuillez
l'installer !"
titlechoice="Titre à convertir ?"
chapdebchoice="Premier chapitre à convertir ?"
chapfinchoice="Dernier chapitre à convertir ?"
bepatient="Travail en cours" ;;
esac
#################################################
# PROGRAMME
######### Test dépendance ##########
which mplayer 2>/dev/null
if [ $? != 0 ]
then
zenity --error --title="$title" --text="$nobin"
exit 0
fi
#### Titre ? #####
while [ ! "$titre" ] # Réafficher la fenêtre tant que l'utilisateur
n'a pas fait de choix
do
titre=`zenity --entry --title "$title" --text "$titlechoice"
--entry-text "1"`
###### Choix -> Sortie boucle ######
if [ $? != 0 ]; then
exit 1
fi
[ $? -ne 0 ] && exit 2 # Annulation
done
#### Chapitre de début ? #####
while [ ! "$chapdeb" ] # Réafficher la fenêtre tant que l'utilisateur
n'a pas fait de choix
do
chapdeb=`zenity --entry --title "$title" --text "$chapdebchoice"
--entry-text "1"`
###### Choix -> Sortie boucle ######
if [ $? != 0 ]; then
exit 1
fi
[ $? -ne 0 ] && exit 2 # Annulation
done
#### Chapitre de fin ? #####
while [ ! "$chapfin" ] # Réafficher la fenêtre tant que l'utilisateur
n'a pas fait de choix
do
chapfin=`zenity --entry --title "$title" --text "$chapfinchoice"
--entry-text "2"`
###### Choix -> Sortie boucle ######
if [ $? != 0 ]; then
exit 1
fi
[ $? -ne 0 ] && exit 2 # Annulation
done
############ Programme #############
folder=~/dvd2wav
mkdir $folder
nbchap=$[$chapfin-$chapdeb+1]
chap=$chapdeb
compteur=0
(while [ $chap -le $chapfin ];do
let "compteur += 1"
echo "# $bepatient : $compteur / $nbchap"
mplayer -vo null -ao pcm:file=$folder\/$titre-$chap\.wav -chapter
$chap\-$chap dvd://$titre 1>/dev/null
chap=$[$chap+1]
let "progress = compteur*100/nbchap"
echo $progress
done)| zenity --progress --auto-close --title="$title" --percentage=0
atenciosamente
rolim
More information about the ubuntu-br
mailing list