Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Voici un script permettant le rippage et l'encodage de tous les titres sur DVD-VIDÉO.
Installer handbrake et handbrake-cli comme indiqué dans le tuto handbraque. tuto handbrake
Ajoutez :
apt install handbrake-cli mkvmerge mplayer lsdvd mediainfo
Un script utilisant HandBrakeCLI et l'encodeur x264 à copié/collé en root dans :
et donner les droits à l'user.
#!/bin/bash ## Golgot200 ## sudo pacman -S ffmpeg handbrake-cli mkvtoolnix-cli mplayer lsdvd mediainfo ## x264 ## x264_10bit ## nvenc_h264 ## x265 ## x265_10bit ## x265_12bit ## nvenc_h265 ## mpeg4 ## mpeg2 ## VP8 ## VP9 ## theora PATH=$PATH:/sbin:/usr/sbin ## Condition : un seul dvd-vidéo. mapfile -t BLKID < <(blkid /dev/sr* |sed -E 's/^([^:]+): .*/\1/') if [[ "${#BLKID[@]}" -eq "0" ]] ; then echo "Aucun DVD trouvé: abandon" exit 0 fi idx=0 for dev in "${BLKID[@]}"; do mnt=$(mount |sed -n -E "s/^${dev//\//\\\/} on (.*) type .*\$/\\1/p") [[ -z "$mnt" ]] && continue if [[ -f "$mnt/VIDEO_TS/VIDEO_TS.IFO" ]]; then DEVICES[$idx]="$dev" MOUNT_POINTS[$idx]="$mnt" idx=$((idx+1)) fi done if [[ "${#DEVICES[@]}" -eq 0 ]]; then echo "Aucun dvd vidéo monté : Abandon" exit 0 elif [[ "${#DEVICES[@]}" -gt 1 ]]; then echo "Il y a plus d'un dvd video détecté : Abandon" exit 0 fi DEVICE=${DEVICES[0]} MOUNT_POINT=${MOUNT_POINTS[0]} ## Label du dvd-vidéo & nombre total de titres sur celui-ci. idx=0 TITLE_COUNT=0 regexp='^Title: ' while read -r line; do idx=$((idx+1)) if [[ "$idx" -eq 1 ]]; then TITLE=${line#*: } elif [[ "$line" =~ $regexp ]]; then TITLE_COUNT=$((TITLE_COUNT+1)) fi done < <(lsdvd "$DEVICE" 2>/dev/null) unset regexp dev mnt idx BLKID DEVICES MOUNT_POINTS if [[ -z "$TITLE" ]]; then echo "Pas de dvd vidéo trouvé : abandon" exit 0 fi echo "Proceed..." echo "DVD-Vidéo : $TITLE" read -r -p "Ce nom convient-il ? [Y/n] " input case $input in [yY][eE][sS]|[yY]) echo "Yes" mkdir -p "$TITLE/IFOS" ;; [nN][oO]|[nN]) echo "No" read -p "Entrer un nouveau nom: " TITLE mkdir -p "$TITLE/IFOS" ;; *) echo "Invalid input..." echo "Quit" exit 1 ;; esac for (( i=1; i<=TITLE_COUNT; i++ )) do ## Titres d'une durée de plus de .... secondes [ ici, 2 seconde] LENGTH=$(mplayer -noconfig all -nocache -vo null -ao null -frames 0 -identify -dvd-device "$DEVICE" dvdnav://"$i" 2>/dev/null | \ sed -E -n 's/^.*ID_LENGTH=([0-9]+).*$/\1/p') LIMIT=10 [[ "$LENGTH" -le "$LIMIT" ]] && continue ## COMPARAISON ENTRE DVDNAV (INFO RÉEL) & LSDVD (INFO) SUR LA RÉALITÉ EXISTANTE DES STREAMS AUDIOS. LAVF_STREAM_DVDNAV=$(mplayer -vo null -ao null -frames 0 -identify -dvd-device "$DEVICE" dvdnav://"$i" 2>/dev/null | awk '/-aid/ { print $7 }') COUNT_LAVF_STREAM_DVDNAV=$(echo "$LAVF_STREAM_DVDNAV" |wc -w) COUNT_AUDIO_LSDVD=$(lsdvd -a "$DEVICE" -t "$i" 2>/dev/null | grep -c "Audio:" ) ## POUR N'AVOIR QUE LE FRANÇAIS. AUDIO_FRENCH=$(lsdvd -a "$DEVICE" -t "$i" 2> /dev/null | grep "Language: fr" | awk '{print$4}' ) COUNT_AUDIO_FRENCH=$(lsdvd -a "$DEVICE" -t "$i" 2> /dev/null |grep -c 'Language: fr') AUDIO_LANG_LIST_FRENCH=$(echo $AUDIO_FRENCH | sed 's/[[:blank:]]/,/g') ## BITRATE ORIGINAL. BITRATE=$(mplayer -noconfig all -nocache -vo null -ao null -frames 0 -identify -dvd-device "$DEVICE" dvdnav://"$i" 2>/dev/null | \ grep "VIDEO:" | awk '{print$8}' | sed 's/\.[^ ]*/ /g') RATIO=$(lsdvd -x $DEVICE -t "$i" | grep -m1 "Aspect ratio:" | awk '{print$11}' | sed -e 's/\//\:/g' | tr -d ',') ## [OPTION 1 ALL] ## ICI, ON ÉVITERA UN MKV SANS AUDIO. STREAM(S) SIGNALÉ(S) FR MAIS D'UNE DURÉE NUL PAR RAPPORT AU(X) AUTRE(S) SUPPRIMÉES EN [ OPTION 2 ] ## EX : PLUTO "-t 15" (fr null ===> eng seul valide) = OK if [[ "$COUNT_LAVF_STREAM_DVDNAV" != "$COUNT_AUDIO_LSDVD" ]]; then #### SANS CROP HandBrakeCLI --no-dvdnav \ --input $DEVICE --title $i \ --all-audio --all-subtitles --subtitle-lang-list fr \ -e x264 -b $BITRATE --loose-anamorphic --modulus 2 \ --hqdn3d=y-spatial=1.5:cb-spatial=1.5:cr-spatial=1.5:y-temporal=4:cb-temporal=4:cr-temporal=4 --unsharp=y-strength=0.5:y-size=5:cb-strength=0.5:cb-size=5 \ --crop 0:0:0:0 \ --aencoder copy \ --output "$TITLE/$i-$TITLE-[OPTION 1 ALL].mkv" #### AJOUT CORRECTION STREAMS AUDIOS INVALIDES DETECT_VALID_AUDIO=$(ffprobe "$TITLE/$i-$TITLE-[OPTION 1 ALL].mkv" 2>&1 | awk '/Audio:/ && /Stream/ && /ac3,/ && /kb\/s/ { print $2 }'| cut -c4-4) VALID_AUDIO_PREPARE=$(echo $DETECT_VALID_AUDIO | sed -e 's/\ /\,/g' >> "$TITLE/$i-choix.txt") VALID_AUDIO=$(head -n 1 "$TITLE/$i-choix.txt" | tail -n 1) mkvmerge -o "$TITLE/$i-$TITLE-[OPTION 1 RETOUCHE].mkv" --atracks $VALID_AUDIO "$TITLE/$i-$TITLE-[OPTION 1 ALL].mkv" rm -f "$TITLE/$i-$TITLE-[OPTION 1 ALL].mkv" rm -f "$TITLE/$i-choix.txt" INFO_1=$(mplayer -vo null -ao null -frames 0 -identify "$TITLE/$i-$TITLE-[OPTION 1 RETOUCHE].mkv" 2>/dev/null | \ awk '/alang/ { x = x $9 ""} END { sub(/,*$/, "", x); print x }') mv "$TITLE/$i-$TITLE-[OPTION 1 RETOUCHE].mkv" "$TITLE/$i-$TITLE-[Language: $INFO_1].mkv" mediainfo "$TITLE/$i-$TITLE-[Language: $INFO_1].mkv" >> "$TITLE/IFOS/$i-$TITLE-[Language: $INFO_1].log" fi VERIF_AUDIOFR=$(mplayer -vo null -ao null -frames 0 -identify "$TITLE/$i-$TITLE-[Language: $INFO_1].mkv" 2>/dev/null | \ grep -c "alang fre,") if [[ "$VERIF_AUDIOFR" -ge "1" ]]; then mkvmerge -o "$TITLE/$i-$TITLE-[Language: Français].mkv" -a fre "$TITLE/$i-$TITLE-[Language: $INFO_1].mkv" rm -f "$TITLE/$i-$TITLE-[Language: $INFO_1].mkv" INFO_AUDIOFR=$(mplayer -vo null -ao null -frames 0 -identify "$TITLE/$i-$TITLE-[Language: Français].mkv" 2>/dev/null | \ awk '/alang/ { x = x $9 ""} END { sub(/,*$/, "", x); print x }') mv "$TITLE/$i-$TITLE-[Language: Français].mkv" "$TITLE/$i-$TITLE-[Language: $INFO_AUDIOFR].mkv" mediainfo "$TITLE/$i-$TITLE-[Language: $INFO_AUDIOFR].mkv" >> "$TITLE/IFOS/$i-$TITLE-[Language: $INFO_AUDIOFR].log" rm -f "$TITLE/IFOS/$i-$TITLE-[Language: $INFO_1].log" fi ## [OPTION 2] ## QUE FRANÇAIS SI PRÉSENT OU AUTRES SI PAS LE CHOIX. ## SOUSTITRES FRANÇAIS DANS LES DEUX CAS. ## SANS AUDIO = OK ## ANY (UNKNOWN AUDIO) = OK ## LPCM ==> AAC = OK if [[ "$COUNT_LAVF_STREAM_DVDNAV" == "$COUNT_AUDIO_LSDVD" ]]; then #### SANS CROP HandBrakeCLI --no-dvdnav \ --input $DEVICE --title $i \ --all-audio --audio-lang-list "$AUDIO_LANG_LIST_FRENCH" --all-subtitles --subtitle-lang-list fr \ -e x264 -b $BITRATE --loose-anamorphic --modulus 2 \ --hqdn3d=y-spatial=1.5:cb-spatial=1.5:cr-spatial=1.5:y-temporal=4:cb-temporal=4:cr-temporal=4 --unsharp=y-strength=0.5:y-size=5:cb-strength=0.5:cb-size=5 \ --crop 0:0:0:0 \ --aencoder copy \ --output "$TITLE/$i-$TITLE-[OPTION 2].mkv" INFO_2=$(mplayer -vo null -ao null -frames 0 -identify "$TITLE/$i-$TITLE-[OPTION 2].mkv" 2>/dev/null | \ awk '/alang/ { x = x $9 ""} END { sub(/,*$/, "", x); print x }') mv "$TITLE/$i-$TITLE-[OPTION 2].mkv" "$TITLE/$i-$TITLE-[Language: $INFO_2].mkv" mediainfo "$TITLE/$i-$TITLE-[Language: $INFO_2].mkv" >> "$TITLE/IFOS/$i-$TITLE-[Language: $INFO_2].log" fi ## DUMPAUDIO ET SAUVEGARDE DU LPCM EN WAVE D'UN DVD DE CONCERT LIVE. AIDS_LPCM=$(lsdvd -a "$DEVICE" -t "$i" 2>/dev/null | awk '/lpcm|id:/ { print $22 }') COUNT_AUDIO_LPCM=$(lsdvd -a "$DEVICE" -t "$i" 2>/dev/null | grep -c "lpcm" ) if [[ "$COUNT_AUDIO_LPCM" -ge "1" ]]; then mkdir -p "$TITLE/WAVE" for n in $AIDS_LPCM; do mplayer -noconfig all -nocache -benchmark -vc null -vo null \ -ao pcm:fast:file="$TITLE/WAVE/[$i-($n)]-$TITLE.wav" \ -identify -dvd-device "$DEVICE" dvdnav://$i -ni -aid $n done fi done