logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#126 03-02-2022 12:11:03

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Hein !!! celui de ton post 123 est estampillé Compact Disc lol lol lol

#127 03-02-2022 12:26:00

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

anonyme a écrit :

....
ERROR: MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc:8: Illegal token: V
ERROR: MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc:8: Illegal token: I
ERROR: MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc:8: Illegal token: S
ERROR: MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc:8: syntax error at "EOF" missing \}
ERROR: MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc:8: syntax error at "EOF" missing \}
ERROR: MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc:8: syntax error at "EOF" missing TrackDef
FATAL ERROR: Failed to read toc-file 'MELGROOVE feat das efx "VIENS"/MELGROOVE feat das efx "VIENS".toc'.



Il me semble que j'ai déjà eu le problème. Peut-être un \ dans le VIENS ou un truc bizarre à ligne 8.
Là, il faut à tous pris le faire prendre en compte dans le script hmm
Il me faut ton fichier toc

Dernière modification par Anonyme (03-02-2022 12:28:11)

#128 03-02-2022 12:41:06

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

tout effacé , mais finit les "single" , je vais recommencer sur celui la
mais il est marqué aussi "compact DISC digital audio" sûrement a cause de cela ?
je m' en suis gardé quelques  un avec des soucis .
pas la faute du script qui fonctionne bien , et je vais regarder un peu les normes des cd audio  (leur format )

#129 03-02-2022 12:46:52

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

voila le retour en console user
je te donne l' info demandé ensuite


bash test5.sh
yatoc2cue présent, on peut donc continuer.
Un CD Audio détecté, on continue ...

Server(s) trouvé(s) :
1.  Litole - ? ====> sur le site freac.org
2.  Litole - ? ====> sur le site gnudb.org
3.  Litole - ? ====> sur le site dbpoweramp.com

Entrer votre choix, 0 pour quitter: 2

Le nom de l'album proposé est: Litole - ?
Confirmez vous ce choix ? [Y/n] n
Non
Alors, veuillez saisir un nom d'
album personnalisé: MELGROOVE feat Das Efx "VIENS"
cdparanoia III release 10.2 (September 11, 2008)


Attempting to set speed to 48x...
Ripping from sector       0 (track  1 [0:00.00])
    to sector   47259 (track  2 [5:14.12])

outputting to MELGROOVE feat Das Efx "VIENS".wav

 (== PROGRESS == [                              | 047259 00 ] == :^D * ==)  

Done.


OK, Rip terminé!
On cherche l'info sur gnudb.gnudb.org
Cdrdao version 1.2.4 - (C) Andreas Mueller <andreas@daneb.de>
/dev/sr0: HL-DT-ST DVDRAM GH22NS40  Rev: NL00
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x20000)

Reading toc data...

Track   Mode    Flags  Start                Length
------------------------------------------------------------
 1      AUDIO   0      00:00:00(     0)     05:15:72( 23697)
 2      AUDIO   0      05:15:72( 23697)     05:14:13( 23563)
Leadout AUDIO   0      10:30:10( 47260)

PQ sub-channel reading (audio track) is supported, data format is BCD.
Raw P-W sub-channel reading (audio track) is supported.
Analyzing track 01 (AUDIO): start 00:00:00, length 05:15:72...
Found ISRC code.
Analyzing track 02 (AUDIO): start 05:15:72, length 05:14:13...
Found ISRC code.
         
CDDB: Connecting to http://gnudb.gnudb.org:80/~cddb/cddb.cgi ...
CDDB: Ok.
Reading CDDB record for: 0d027602-newage-Litole / ?
CDDB: Connecting to http://gnudb.gnudb.org:80/~cddb/cddb.cgi ...
CDDB: Ok.
CD-TEXT data was added to toc-file.
Reading of toc data finished successfully.
Le fichier toc ne contient pas de messages trop longs ...
Slash de type AC/DC non détecté...
TITLE "MELGROOVE feat Das Efx "VIENS"" à bien été injecté dans le fichier toc.
Voulez-vous vérifier le fichier TOC ? [Y/n] ou attendre 10 secondes.

les 10 secondes sont écoulées, on continue ...
ERROR: MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc:8: Illegal token: V
ERROR: MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc:8: Illegal token: I
ERROR: MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc:8: Illegal token: S
ERROR: MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc:8: syntax error at "EOF" missing \}
ERROR: MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc:8: syntax error at "EOF" missing \}
ERROR: MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc:8: syntax error at "EOF" missing TrackDef
FATAL ERROR: Failed to read toc-file '
MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".toc'.
Le dossier .cddb existe.
Le fichier 0d027602 est déjà présent
Le fichier CDDB à le bon encodage UTF-8.

flac 1.3.2
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac'
for details.

MELGROOVE feat Das Efx "VIENS".wav: ERROR parsing cuesheet "MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".cue" on line 10: INDEX is missing an offset after the index number

MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".flac: ERROR: reading metadata, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.
11: syntax error
16: syntax error
shnsplit: warning: cannot open non-existent file: [MELGROOVE feat Das Efx "VIENS"/MELGROOVE feat Das Efx "VIENS".flac]
shnsplit: error: cannot continue due to error(s) shown above
ID=debian
On n'est pas sous Archlinux, on essaie d'utiliser la commande cuetag.sh
11: syntax error
16: syntax error
warning: number of files does not match number of tracks
MELGROOVE feat Das Efx "VIENS"/FLACS/split-track*.flac: ERROR: reading metadata, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.
11: syntax error
16: syntax error
MELGROOVE feat Das Efx "VIENS"/FLACS/split-track*: ERROR: reading metadata, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.
MELGROOVE feat Das Efx "VIENS"/FLACS/split-track*: ERROR: reading metadata, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.
MELGROOVE feat Das Efx "VIENS"/FLACS/split-track*: ERROR: reading metadata, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.
MELGROOVE feat Das Efx "VIENS"/FLACS/split-track*: ERROR: reading metadata, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.
mv: impossible d'évaluer 'MELGROOVE feat Das Efx "VIENS"/FLACS/split-track*': Aucun fichier ou dossier de ce type

Le fichier MELGROOVE feat Das Efx "VIENS"/FLACS/split-track* a bien été renommé avec son numéro, ainsi que son titre:
 - .flac

Temps total écoulé: 00:02:59  (HH:MM:SS)



le fichier "toc"


CD_DA

CD_TEXT {
  LANGUAGE_MAP {
    0: 9
  }
  LANGUAGE 0 {
    TITLE "MELGROOVE feat Das Efx "VIENS""
    PERFORMER "Litole"
    MESSAGE " YEAR: 2009"
  }
}

// Track 1
TRACK AUDIO
NO COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
ISRC "FR33R0000002"
CD_TEXT {
  LANGUAGE 0 {
    TITLE "?"
    PERFORMER "Litole"
    MESSAGE ""
  }
}
FILE "MELGROOVE feat Das Efx "VIENS".wav" 0 05:15:72


// Track 2
TRACK AUDIO
NO COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
ISRC "FR33R0000001"
CD_TEXT {
  LANGUAGE 0 {
    TITLE "? -Instrumental-"
    PERFORMER "Litole"
    MESSAGE ""
  }
}
FILE "MELGROOVE feat Das Efx "VIENS".wav" 05:15:72 05:14:13
 


ps: le dossier "flac" est vide , le wav est correct
le serveur ne connait pas , titre personnalisé .

Dernière modification par anonyme (03-02-2022 12:50:12)

#130 03-02-2022 12:59:47

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

re
mon titre est pourri
avec artiste + morceau


TITLE "MELGROOVE Viens" à bien été injecté dans le fichier toc.
Voulez-vous vérifier le fichier TOC ? [Y/n] ou attendre 10 secondes.

les 10 secondes sont écoulées, on continue ...
Le dossier .cddb existe.
Le fichier 0d027602 est déjà présent
Le fichier CDDB à le bon encodage UTF-8.

flac 1.3.2
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

MELGROOVE Viens.wav: wrote 72047089 bytes, ratio=0,648
Splitting [MELGROOVE Viens/MELGROOVE Viens.flac] (10:30.10) --> [MELGROOVE Viens/FLACS/split-track01.flac] (5:15.72) : 100% OK
Splitting [MELGROOVE Viens/MELGROOVE Viens.flac] (10:30.10) --> [MELGROOVE Viens/FLACS/split-track02.flac] (5:14.13) : 100% OK
ID=debian
On n'est pas sous Archlinux, on essaie d'utiliser la commande cuetag.sh

Le fichier MELGROOVE Viens/FLACS/split-track01.flac a bien été renommé avec son numéro, ainsi que son titre:
01 - ?.flac


Le fichier MELGROOVE Viens/FLACS/split-track02.flac a bien été renommé avec son numéro, ainsi que son titre:
02 - ? -Instrumental-.flac

Temps total écoulé: 00:02:24  (HH:MM:SS)
 


tout est correct , bien mes fichiers flacs  (je pense que ceci pose problème "VIENS" )
te prends pas le choux suis un boulet  tongue  roll

#131 03-02-2022 12:59:58

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

J'ai reproduit ton erreur


ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: Illegal token: L
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: Illegal token: '
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: Illegal token: h
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: Illegal token: y
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: syntax error at "EOF" missing \}
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: syntax error at "EOF" missing \}
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: Illegal token: m
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: syntax error at "EOF" missing TrackDef
ERROR: Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc:9: Illegal token: n
FATAL ERROR: Failed to read toc-file 'Beethoven - Symphony no. 9 "L'hymne à la joie"/Beethoven - Symphony no. 9 "L'hymne à la joie".toc'.

 



Tu as mis des "" à VIENS et ça c'est pas bon wink

Message croisé big_smile

Dernière modification par Anonyme (03-02-2022 13:03:43)

#132 03-02-2022 13:18:29

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

avec asunder fait un ripp en ogg pas mieux , il ne propose pas de modifier les titres des morceaux
faut que le prenne en main ( et décocher le serveur qui donne n'importe quoi comme info )

ps: pour le titre recopier a l' identique de la pochette  wink  (erreur  .............  lol  )

Dernière modification par anonyme (03-02-2022 13:19:48)

#133 03-02-2022 14:45:56

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

@anonyme

tu connaissais glyrc :

glyrc cover -f lastfm --artist "AC/DC" --album "Black Ice" Cover.png



? smile

Il est assez précis le bidule roll

Dernière modification par Anonyme (03-02-2022 14:48:12)

#134 03-02-2022 14:51:16

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Je vais essayer de mettre ça dans le script

apt install glyrc



command à tester :


glyrc cover -f lastfm --artist "AC/DC" --album "Black Ice" Cover.png

#135 03-02-2022 17:04:23

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

je l'installe "glyrc"

testé j'ai l'image "png"
non connaissait pas


ls
'AC|DC_Black Ice__cover_1.png'
 



ça va fonctionner que avec les albums connu

ps: mon fils va me demander de transformer le flac en mp3 pour son windows  roll
et j' attend la suite , les albums complets

Dernière modification par anonyme (03-02-2022 18:13:53)

#136 03-02-2022 18:38:17

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

@anonyme

Dans cette commande :

glyrc cover -f lastfm --artist "AC/DC" --album "Black Ice" Cover.png



j'aimerais à la place de lastfm, google mais je ne comprend rien à l'aide dans :

glyrc --list



Il y a aussi le 300x300 en taille des covers. Je n'arrive pas trouver le moyen de passer cela en 500x500.
Si tu y arrive, moi je bloque.

#137 03-02-2022 18:45:10

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

anonyme a écrit :

...

ps: mon fils va me demander de transformer le flac en mp3 pour son windows  roll
et j' attend la suite , les albums complets



Dis lui de ma part qu'il n'a pas d'oreilles big_smile big_smile big_smile

Pour les mp3, je regarde la manière la plus joli. Du style au départ, voulez-vous des fichiers mp3s pour lecteur .... mkdir ....MP3s

#138 03-02-2022 19:49:26

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

tu a regardé le man ?


man glyrc
 



ps: j'ai repris les CD audio format album , ça va mieux .  smile

Dernière modification par anonyme (04-02-2022 14:14:15)

#139 04-02-2022 14:55:12

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

anonyme a écrit :

....

ps: mon fils va me demander de transformer le flac en mp3 ....



Bonjour,

Option Mp3 Oui ou Non avec 10 secondes de réflexion et la pochette au cas où ( c'est transparent s'il ne trouve pas )


#!/bin/bash
## Programmes : cdparanoia cdrdao flac cuebreakpoints setcd shntool yatoc2cue
#### http://freedb.dbpoweramp.com:80
#### --driver generic-mmc:0x20000 n'est pas nécessaire pour la génération seule du TOC
#### metaflac --export-tags-to=file.txt "FICHIER.flac"
#### Supression de l'option --fast-toc dans la commande cdrdao -- SIZE_INFO & ISRC pour Nina Hagen résolu

#### Ajout de l'option --datafile "$ALBUMNAME.wav" dans la commande "cdrdao read-toc --fast-toc" pour changer "data.wav" dans le fichier toc.
#### Plus pratique pour une éventuelle gravure par le cue avec "ex: Brasero".

START_TIME=$(date +%s)
DEVICE=$(setcd -i /dev/sr* | awk '/: audio disc|\(data\/audio\)/{sub(/:$/, "", l); print l; exit}; {l=$0}')
SPEED=$(more /proc/sys/dev/cdrom/info | grep -E --color 'drive speed:' | awk '{print $3}')
CDDA=$(setcd -i /dev/sr* | grep -c "audio disc\|(data/audio)")

CLEANUP () {

rm -f "freac_stderr.log"
rm -f "gnudb_stderr.log"
rm -f "dbpoweramp_stderr.log"


}


ICONV () {

iconv --from-code=ISO-8859-1 --to-code=UTF-8

}




CDPARANOIA () {

cdparanoia -Z -d "$DEVICE" -S "$SPEED" 1- -w "$ALBUMNAME.wav"

}




FORMAT_TITLE_FOLDER () {

            sed -e 's/AC\/DC/\ACDC/g' | \
            sed 's/\// - /g' | \
            awk '{$1=""; $2=""; $3=""; sub("  ", " "); print}'| \
            sed s'/.$//' | \
            awk '{gsub(/^[ \t]+|[ \t]+$/,"")};1'

}



CDDBURL_FREAC="http://freedb.freac.org/~cddb/cddb.cgi"
CDDBURL_GNUDB="http://gnudb.gnudb.org/~cddb/cddb.cgi"
CDDBURL_DBPOWERAMP="http://freedb.dbpoweramp.com/~cddb/cddb.cgi"

MYUSER="whoami"
MYHOST="hostname"


CURL="curl -v --connect-timeout 3 --max-time 10 --retry 1"

DISCID=$(cd-discid $DEVICE 2>/dev/null) || exit 1
NAME_FILE=$(cd-discid "$DEVICE" 2>/dev/null | awk '{print $1}')









    if [ -e "/usr/bin/yatoc2cue" ] || [ -e "/usr/local/bin/yatoc2cue" ] ; then
    echo "yatoc2cue présent, on peut donc continuer."
    sleep 2
else
    echo "yatoc2cue est absent, veuillez installer ce programme avant de continer ... on quitte."
    sleep 2
    exit 0



  fi




if [ "$CDDA" -eq 1 ]; then
echo "Un CD Audio détecté, on continue ..."
echo ""



  fi



if [ "$CDDA" -gt 1 ]; then
echo "Plus d'un CD audio détectés, on quitte."
echo ""
exit 0


   fi


if [ "$CDDA" -eq 0 ]; then
echo "Aucun CD Audio détecté, on quitte."
echo ""
exit 0



   fi


### https://www.unix.com/shell-programming-and-scripting/127668-getting-curl-output-verbose-file.html
FREAC_FOLDER_NAME=$($CURL 2>freac_stderr.log "$CDDBURL_FREAC?cmd=cddb+query+$(cd-discid "$DEVICE" | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | FORMAT_TITLE_FOLDER | ICONV )

GNUDB_FOLDER_NAME=$($CURL 2>gnudb_stderr.log "$CDDBURL_GNUDB?cmd=cddb+query+$(cd-discid "$DEVICE" | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | FORMAT_TITLE_FOLDER | ICONV )

DBPOWERAMP_FOLDER_NAME=$($CURL 2>dbpoweramp_stderr.log "$CDDBURL_DBPOWERAMP?cmd=cddb+query+$(cd-discid "$DEVICE" | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | FORMAT_TITLE_FOLDER | ICONV )






timeout_freac=$( cat freac_stderr.log | grep -c 'Connection timeout')
timeout_gnudb=$( cat gnudb_stderr.log | grep -c 'Connection timeout')
timeout_dbpoweramp=$( cat dbpoweramp_stderr.log | grep -c 'Connection timeout')    







 while true; do
echo "Server(s) trouvé(s) :"

if  [[ "$timeout_freac" -eq 0 ]] ; then
echo -e "\e[3;32m1. \033[m \e[3;94m$FREAC_FOLDER_NAME\033[m ====> sur le site freac.org"

echo ""
echo -e "\e[3;32mTitres:\033[m"



CD=$(cddb-tool query "$CDDBURL_FREAC" 1 "$MYUSER" "$MYHOST" "$DISCID")
cddb-tool read "$CDDBURL_FREAC" 3 "$MYUSER" "$MYHOST" \
"$(echo "$CD" | head -1 | awk '{print $2 " " $3}')" | ICONV | grep TTITLE |sed 's/.*=/     /'
echo ""
else
echo -e "\e[3;32m1.  Connection timeout \033[m \e[3;94m$FREAC_FOLDER_NAME\033[m ====> sur le site freac.org"



  fi



if  [[ "$timeout_gnudb" -eq 0 ]] ; then
echo -e "\e[3;32m2. \033[m \e[3;94m$GNUDB_FOLDER_NAME\033[m ====> sur le site gnudb.org"
echo ""
echo -e "\e[3;32mTitres:\033[m"
CD=$(cddb-tool query "$CDDBURL_GNUDB" 1 "$MYUSER" "$MYHOST" "$DISCID")
cddb-tool read "$CDDBURL_GNUDB" 3 "$MYUSER" "$MYHOST" \
"$(echo "$CD" | head -1 | awk '{print $2 " " $3}')" | ICONV | grep TTITLE |sed 's/.*=/     /'
echo ""
else
echo -e "\e[3;32m2.  Connection timeout \033[m \e[3;94m$GNUDB_FOLDER_NAME\033[m ====> sur le site gnudb.org"



  fi



if  [[ "$timeout_dbpoweramp" -eq 0 ]] ; then
echo -e "\e[3;32m3. \033[m \e[3;94m$DBPOWERAMP_FOLDER_NAME\033[m ====> sur le site dbpoweramp.com"
echo ""
echo -e "\e[3;32mTitres:\033[m"
CD=$(cddb-tool query "$CDDBURL_DBPOWERAMP" 1 "$MYUSER" "$MYHOST" "$DISCID")
cddb-tool read "$CDDBURL_DBPOWERAMP" 3 "$MYUSER" "$MYHOST" \
"$(echo "$CD" | head -1 | awk '{print $2 " " $3}')" | ICONV  | grep TTITLE |sed 's/.*=/     /'
echo ""
else
echo -e "\e[3;32m3.  Connection timeout \033[m \e[3;94m$DBPOWERAMP_FOLDER_NAME\033[m ====> sur le site dbpoweramp.com"



  fi



echo ""
echo -n "Entrer votre choix, 0 pour quitter: "
read -r choice
echo

case $choice in
     1)
ALBUMNAME="$FREAC_FOLDER_NAME"
    break
     ;;
     2)
ALBUMNAME="$GNUDB_FOLDER_NAME"
    break
     ;;
     3)
ALBUMNAME="$DBPOWERAMP_FOLDER_NAME"
    break
     ;;
    0)
    echo "OK, see you!"
CLEANUP
    exit 1
    ;;
    *)
    echo "Invalid input..."
    echo "Quit"
CLEANUP
    exit 1
    ;;
esac  
done


### Choix Conversion MP3
echo -e "\e[3;94mEn plus des fichiers Flacs, vous faut-il des fichiers au format mp3 ?\033[m"
read -t 10 -p "Oui ou Non ? ( attente 10 secondes maxi )   [Y/n] " reply

case $reply in
    [yY])
echo -e "\e[3;32mRéponse: Oui\033[m"
echo ""
sleep 2
 ;;
    [nN])
echo -e "\e[3;32mRéponse: Non\033[m"
echo ""
sleep 2
 ;;
     *)
 echo "Invalid input..."
 echo "Quit"
CLEANUP
 exit 1
 ;;
esac









    echo -e "Le nom de l'album proposé est: \e[3;94m$ALBUMNAME\033[m"
read -r -p "Confirmez vous ce choix ? [Y/n] " input
case $input in
    [yY][eE][sS]|[yY])
 
    echo "Oui"  
    mkdir -p "$ALBUMNAME"
    ( cd "$ALBUMNAME" || exit
    CDPARANOIA)
    echo "OK, Rip terminé!"
  ;;
    [nN][oO]|[nN])
    echo -e "Non"
read -r -p "Alors, veuillez saisir un nom d'album personnalisé: " ALBUMNAME
if [[ -z "$ALBUMNAME" ]]; then
    echo "Invalid input..."
    echo "Quit"
CLEANUP
     exit 1
else    
    mkdir -p "$ALBUMNAME"
    ( cd "$ALBUMNAME" || exit
    CDPARANOIA)
    echo "OK, Rip terminé!"
fi
  ;;
    *)
 echo "Invalid input..."
 echo "Quit"
 echo "Clean"
CLEANUP
 exit 1
 ;;
esac







#### http://freedb.freac.org
if  [[ "$choice" == "1" ]] ; then
echo "On cherche l'info sur freedb.freac.org"
sleep 5
    ( cd "$ALBUMNAME" || exit
    cdrdao read-toc --fast-toc --datafile "$ALBUMNAME.wav" --device "$DEVICE" --driver generic-mmc:0x20000 --paranoia-mode 0 \
            --with-cddb --cddb-servers freedb.freac.org:/~cddb/cddb.cgi "$ALBUMNAME.toc")


   fi



#### http://gnudb.gnudb.org
if  [[ "$choice" == "2" ]] ; then
echo "On cherche l'info sur gnudb.gnudb.org"
sleep 5
    ( cd "$ALBUMNAME" || exit
    cdrdao read-toc --fast-toc --datafile "$ALBUMNAME.wav" --device "$DEVICE" --driver generic-mmc:0x20000 --paranoia-mode 0 \
            --with-cddb --cddb-servers gnudb.gnudb.org:/~cddb/cddb.cgi "$ALBUMNAME.toc")
       

   fi



#### http://freedb.dbpoweramp.com
if  [[ "$choice" == "3" ]] ; then
echo "On cherche l'info sur freedb.dbpoweramp.com"
sleep 5
    ( cd "$ALBUMNAME" || exit
    cdrdao read-toc --fast-toc --datafile "$ALBUMNAME.wav" --device "$DEVICE" --driver generic-mmc:0x20000 --paranoia-mode 0 \
            --with-cddb --cddb-servers freedb.dbpoweramp.com:/~cddb/cddb.cgi "$ALBUMNAME.toc")



   fi



## https://cryptii.com/pipes/text-octal
## https://pjb.com.au/comp/diacritics.html
## https://www.systutorials.com/docs/linux/man/7-iso_8859-15/
sed -i -e 's/\\240/ /g' -e 's/\\300/À/g' -e 's/\\340/à/g' \
       -e 's/\\241/¡/g' -e 's/\\301/Á/g' -e 's/\\341/á/g' \
       -e 's/\\242/¢/g' -e 's/\\302/Â/g' -e 's/\\342/â/g' \
       -e 's/\\243/£/g' -e 's/\\303/Ã/g' -e 's/\\343/ã/g' \
       -e 's/\\244/¤/g' -e 's/\\304/Ä/g' -e 's/\\344/ä/g' \
       -e 's/\\245/¥/g' -e 's/\\305/Å/g' -e 's/\\345/å/g' \
       -e 's/\\246/¦/g' -e 's/\\306/Æ/g' -e 's/\\346/æ/g' \
       -e 's/\\247/§/g' -e 's/\\307/Ç/g' -e 's/\\347/ç/g' \
       -e 's/\\250/¨/g' -e 's/\\310/È/g' -e 's/\\350/è/g' \
       -e 's/\\251/©/g' -e 's/\\311/É/g' -e 's/\\351/é/g' \
       -e 's/\\252/ª/g' -e 's/\\312/Ê/g' -e 's/\\352/ê/g' \
       -e 's/\\253/«/g' -e 's/\\313/Ë/g' -e 's/\\353/ë/g' \
       -e 's/\\254/¬/g' -e 's/\\314/Ì/g' -e 's/\\354/ì/g' \
       -e 's/\\255/ /g' -e 's/\\315/Í/g' -e 's/\\355/í/g' \
       -e 's/\\256/®/g' -e 's/\\316/Î/g' -e 's/\\356/î/g' \
       -e 's/\\257/¯/g' -e 's/\\317/Ï/g' -e 's/\\357/ï/g' \
       -e 's/\\260/°/g' -e 's/\\320/Ð/g' -e 's/\\360/ð/g' \
       -e 's/\\261/±/g' -e 's/\\321/Ñ/g' -e 's/\\361/ñ/g' \
       -e 's/\\262/²/g' -e 's/\\322/Ò/g' -e 's/\\362/ò/g' \
       -e 's/\\263/³/g' -e 's/\\323/Ó/g' -e 's/\\363/ó/g' \
       -e 's/\\264/´/g' -e 's/\\324/Ô/g' -e 's/\\364/ô/g' \
       -e 's/\\265/µ/g' -e 's/\\325/Õ/g' -e 's/\\365/õ/g' \
       -e 's/\\266/¶/g' -e 's/\\326/Ö/g' -e 's/\\366/ö/g' \
       -e 's/\\267/·/g' -e 's/\\327/×/g' -e 's/\\367/÷/g' \
       -e 's/\\270/¸/g' -e 's/\\330/Ø/g' -e 's/\\370/ø/g' \
       -e 's/\\271/¹/g' -e 's/\\331/Ù/g' -e 's/\\371/ù/g' \
       -e 's/\\272/º/g' -e 's/\\332/Ú/g' -e 's/\\372/ú/g' \
       -e 's/\\273/»/g' -e 's/\\333/Û/g' -e 's/\\373/û/g' \
       -e 's/\\274/¼/g' -e 's/\\334/Ü/g' -e 's/\\374/ü/g' \
       -e 's/\\275/½/g' -e 's/\\335/Ý/g' -e 's/\\375/ý/g' \
       -e 's/\\276/¾/g' -e 's/\\336/Þ/g' -e 's/\\376/þ/g' \
       -e 's/\\277/¿/g' -e 's/\\337/ß/g' -e 's/\\377/ÿ/g' "$ALBUMNAME/$ALBUMNAME.toc"


## https://unix.stackexchange.com/questions/155331/sed-replace-a-character-in-a-matched-line-in-place
sed -i -e '/TITLE/s/\\"//g' "$ALBUMNAME/$ALBUMNAME.toc"




#### AVEC CUECONVERT ( voir si on peut améliorer )
#### Message is too long -- (Deep Purple Europe MK III Final concert)
message_is_too_long=$(awk '{print $0}' "$ALBUMNAME/$ALBUMNAME.toc" | awk '/MESSAGE/ && length($0) > 100' | wc -l)
line=$(grep -n MESSAGE "$ALBUMNAME/$ALBUMNAME.toc" | awk '/MESSAGE/ && length($0) > 100' | cut -d : -f1 | tr "\n" " ")



if [[ "$message_is_too_long" -gt 0 ]] ; then
echo "Message(s) trop long(s)"
sleep 2
for i in $line; do
sed -i "${i}s/.*/    MESSAGE \"\"/" "$ALBUMNAME/$ALBUMNAME.toc"
echo -e "\e[3;94mSupression du message à la ligne $i\033[m"
sleep 2
done
else
echo -e  "\e[3;32mLe fichier toc ne contient pas de messages trop longs ...\033[m"
sleep 2



   fi


### RETOUCHE FICHIER TOC POUR (AC/DC)
### Exemple dans le fichier toc :
###    TITLE "DC / Highway To Hell"
###    PERFORMER "AC"
TOC_ACDC=$(grep -c '    TITLE "DC /.*"' "$ALBUMNAME/$ALBUMNAME.toc")

if [[ "$TOC_ACDC" -eq 1 ]]  ; then
echo -e "\e[3;32mCorrection du fichier toc pour un problème du slash de type AC/DC\033[m"
sleep 2
sed -i -e 's/    PERFORMER "AC"/    PERFORMER "ACDC"/g' "$ALBUMNAME/$ALBUMNAME.toc"
sed -i -e 's/DC \/ //' "$ALBUMNAME/$ALBUMNAME.toc"
else
echo -e  "\e[3;32mSlash de type AC/DC non détecté...\033[m"



   fi

## Vérification du fichier toc et édition le cas échéant.
#if  [[ "$input" == "n" ]] ; then
#echo -e "\e[3;32mVous avez opté pour un nom d'album personnalisé, veuillez changer title dans le fichier toc.\033[m"
#sleep 2
#nano "$ALBUMNAME/$ALBUMNAME.toc"
#else
#echo -e "\e[3;32mLe nom de l'album proposé n'a pas été modifié, alors on continue ....\033[m"
#sleep 2
#fi

## https://unix.stackexchange.com/questions/188264/want-to-substitute-only-first-occurence-with-sed
## Add quotes around a value using sed
## https://unix.stackexchange.com/questions/120211/add-quotes-around-a-value-using-sed

if  [[ "$input" == "n" ]] ; then
sed -i -e "0,/TITLE/ s/TITLE.*/TITLE \"${ALBUMNAME}\"/g" "$ALBUMNAME/$ALBUMNAME.toc"
echo -e "\e[3;94mTITLE \"${ALBUMNAME}\"\033[m\e[3;32m à bien été injecté dans le fichier toc.\033[m"
sleep 2



   fi



## EDITION FICHIER TOC
read -t 10 -p "Voulez-vous vérifier le fichier TOC ? [Y/n] ou attendre 10 secondes." input
echo ""
case $input in
    [yY][eE][sS]|[yY])

    nano -w "$ALBUMNAME/$ALBUMNAME.toc" < /dev/tty
echo ""
echo -e "\e[3;94mLe fichier $ALBUMNAME.toc a été vérifié et éventuellement corrigé.\033[m"
echo -e "\e[3;94mOn continue ...\033[m"
sleep 2
 ;;
    [nN][oO]|[nN])
echo ""
    echo -e "\e[3;94mNon, on continue...\033[m"
sleep 2
 ;;
     *)
echo ""
echo -e "\e[3;94mles 10 secondes sont écoulées, on continue ...\033[m"
 ;;
esac




#### Création du fichier CDDB depuis le fichier toc avec l'utilitaire toc2cddb (cdrdao).

    toc2cddb "$ALBUMNAME/$ALBUMNAME.toc" > "$ALBUMNAME/$NAME_FILE"



#EXTRA PERSO A INTEGRER PLUS TARD POUR CREER LE DOSSIER ~/.cddb
cddb_folder=~/.cddb

  if [ ! -d "$cddb_folder" ]; then
echo -e "\e[3;32mLe dossier n'existe pas ... création du dossier .cddb\033[m"
mkdir -p "$cddb_folder"
else
echo -e "\e[3;32mLe dossier .cddb existe.\033[m"
sleep 2



   fi



 if [ -d "$cddb_folder" ] && [ -f "$cddb_folder/$NAME_FILE" ]; then
echo -e "\e[3;32mLe fichier $NAME_FILE est déjà présent\033[m"
sleep 2
else
echo -e "\e[3;32mLe fichier $NAME_FILE n'est pas présent, on le copie dans .cddb\033[m"
sleep 2
cp "$ALBUMNAME/$NAME_FILE" ~/.cddb/"$NAME_FILE"

 

   fi



#### Conversion en UTF-8 si necessaire du fichier cddb.
CODE=$( file -i "$ALBUMNAME/$NAME_FILE" | sed 's/^.*charset=/charset=/')

if [[ "$CODE" == "charset=iso-8859-1" ]]; then
    echo -e "\e[3;94mConversion du fichier CDDB en UTF-8.\033[m"
ICONV "$ALBUMNAME/$NAME_FILE" > "$ALBUMNAME/CONV_$NAME_FILE"
rm -f "$ALBUMNAME/$NAME_FILE"
mv "$ALBUMNAME/CONV_$NAME_FILE" "$ALBUMNAME/$NAME_FILE"

else
    echo -e "\e[3;32mLe fichier CDDB à le bon encodage UTF-8.\033[m"




   fi



# CRÉATION DU SCRIPT "toc2tag.pl"
## https://gist.github.com/diresi/a1a905546aa0136eaf7399c3ae4ffedd#file-toc2tag-pl

{ echo "#!/usr/bin/perl -w" ;
echo '';  
echo '$GotAlbum=0;' ;
echo '$Tracknum=0;';
echo '#$IsVarious=0;';  
echo '$Artist="";';  
echo '';  
echo 'while (<>)';  
echo '{';  
echo 'if (/\/\/ Track (\d*)/)';  
echo '{';  
echo '$Tracknum=$1;';  
echo 'print "TRACKNUMBER[$Tracknum]=$Tracknum\n";';  
echo '}';  
echo '';  
echo 'if (/TITLE "(.*)"/)';  
echo '{';  
echo 'if (!$GotAlbum)';  
echo '{';  
echo '$GotAlbum=1;';  
echo '$Album=$1;';  
echo '$Album=~ s/\// - /;';  
echo 'print "ALBUM=$Album\n";';  
echo '}';  
echo 'else';  
echo '{';  
echo 'print "TITLE[$Tracknum]=$1\n";';  
echo '}';  
echo '}';  
echo '';  
echo 'if (/PERFORMER "(.*)"/)';  
echo '{';  
echo 'if ($Tracknum==0)';  
echo '{';  
echo '$Artist=$1;';  
echo '$Artist=~ s/\///;';  
echo 'print "ARTIST=$Artist\n";';  
echo '}';  
echo 'else';  
echo '{';  
echo 'if ($1 ne $Artist)';  
echo '{';
echo 'print "ARTIST[$Tracknum]=$1\n";';
echo '}';
echo '}';
echo '}';
echo '}';
} >> "$ALBUMNAME/toc2tag.pl"

chmod u+x "$ALBUMNAME/toc2tag.pl"


awk '{print $0}' "$ALBUMNAME/$ALBUMNAME.toc" | "$ALBUMNAME"/./toc2tag.pl > "$ALBUMNAME/$ALBUMNAME.tags"


#cueconvert -i toc -o cue "$ALBUMNAME/$ALBUMNAME.toc" "$ALBUMNAME/$ALBUMNAME.cue"
yatoc2cue "$ALBUMNAME/$ALBUMNAME.toc" "$ALBUMNAME/$ALBUMNAME.cue"

#### Vivaldi.wav: ERROR parsing cuesheet "Vivaldi/Vivaldi.cue" on line 5: illegal INDEX offset (not of the form MM:SS:FF)
#### ====>>

#### TRACK 01 AUDIO
#### PREGAP 00:00:38
#### INDEX 00 00:00:-38
#### INDEX 01 00:00:00

#### Supprimer toutes les lignes qui se trouvent entre PREGAP et TRACK
#### Créer un INDEX 00 00:00:00 au dessus de PREGAP
#### Remplacer le mot PREGAP par INDEX 01
#### Supprimer tous les espaces entre les lignes ( c'est pas utile )

sed -i -e '/PREGAP/,/TRACK/{//!d}' "$ALBUMNAME/$ALBUMNAME.cue"
sed -i -e '/^PREGAP.*/i INDEX 00 00:00:00' "$ALBUMNAME/$ALBUMNAME.cue"
sed -i -e 's/PREGAP/INDEX 01/g' "$ALBUMNAME/$ALBUMNAME.cue"
sed -i -e '/^[[:blank:]]*$/d' "$ALBUMNAME/$ALBUMNAME.cue"


flac --cuesheet="$ALBUMNAME/$ALBUMNAME.cue" "$ALBUMNAME/$ALBUMNAME.wav"


# IMPORTER TAGS DANS LE FICHIER FLAC
     metaflac --add-replay-gain --no-utf8-convert \
         --import-tags-from="$ALBUMNAME/$ALBUMNAME.tags" "$ALBUMNAME/$ALBUMNAME.flac"


mkdir -p "$ALBUMNAME/FLACS"


cuebreakpoints "$ALBUMNAME/$ALBUMNAME.cue" | shnsplit -d "$ALBUMNAME/FLACS" "$ALBUMNAME/$ALBUMNAME.flac" -o "cust ext=flac flac -V --fast -o %f -"


 tail /etc/os-release | awk '/^ID=/ { print $0 }'
arch=$(tail /etc/os-release | awk '/^ID=/ { print $0 }')

if  [ "$arch" = "ID=arch" ]; then
echo ""
echo -e "\e[3;94mOn est sous Archlinux, on utilise la commande cuetag.sh\033[m"
cuetag.sh "$ALBUMNAME/$ALBUMNAME.cue" "$ALBUMNAME/FLACS"/split-track*.flac
else
echo -e "\e[3;94mOn n'est pas sous Archlinux, on essaie d'utiliser la commande cuetag.sh\033[m"
cuetag "$ALBUMNAME/$ALBUMNAME.cue" "$ALBUMNAME/FLACS"/split-track*.flac



   fi



for i in "$ALBUMNAME/FLACS"/split-track*; do

    title=$(metaflac --show-tag=TITLE "$i" | sed -e 's/TITLE=//' | sed -e 's/\//-/g')
    album=$(metaflac --show-tag=ALBUM "$i" | sed -e 's/ALBUM=//' | sed -e 's/\//-/g')
    artist=$(metaflac --show-tag=ARTIST "$i" | sed -e 's/ARTIST=//' | sed -e 's/\//-/g')
        track=$(metaflac --show-tag=TRACKNUMBER "$i" | sed -e 's/TRACKNUMBER=//' | sed -e 's/\//-/g')
       

mv "$i" "$ALBUMNAME/FLACS/$track - $title.flac"
echo ""
echo "Le fichier "$i" a bien été renommé avec son numéro, ainsi que son titre:"
echo -e "\e[3;94m$track - $title.flac\033[m"
echo ""
sleep 1
done


## CRÉER UN FICHIER M3U POUR LES FLACS SÉPARÉS.
## https://superuser.com/questions/650291/how-to-get-video-duration-in-seconds
( cd "$ALBUMNAME/FLACS" || exit

  echo '#EXTM3U'
for file in *.flac; do


duration=$( ffprobe "$file" -show_format 2>&1 | sed -n -E 's/duration=([0-9]+).*/\1/p')
TAG_ARTIST=$( ffprobe "$file" -show_format 2>&1 | sed -n 's/TAG:ARTIST=//p')
TAG_track=$( ffprobe "$file" -show_format 2>&1 | sed -n 's/TAG:track=//p')
TAG_TITLE=$( ffprobe "$file" -show_format 2>&1 | sed -n 's/TAG:TITLE=//p')


  echo '#EXTINF:'"$duration","$TAG_ARTIST" - "$TAG_TITLE"
  echo "$file"
done ) >> "$ALBUMNAME/FLACS/$ALBUMNAME.m3u"







### Conversion En MP3
if [[ $reply == "y" || $reply == "Y" ]]
then
echo -e "\e[3;32mSortie des Mp3s\033[m"
sleep 2
mkdir -p "$ALBUMNAME/MP3S"

for a in "$ALBUMNAME/FLACS"/*.flac; do
  < /dev/null ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}"
mv "${a[@]/%flac/mp3}" "$ALBUMNAME/MP3S"
done
cp "$ALBUMNAME/FLACS/$ALBUMNAME.m3u" "$ALBUMNAME/MP3S/$ALBUMNAME.m3u"
sed -i -e 's/.flac/.mp3/g' "$ALBUMNAME/MP3S/$ALBUMNAME.m3u"
else
echo -e "\e[3;32mPas de sortie Mp3\033[m"
sleep 2



  fi




glyrc cover -v 0 -w "$ALBUMNAME/$ALBUMNAME.png" -f lastfm -F png --artist "$artist" --album "$album"



eject $DEVICE

CLEANUP

echo -e "\e[32mTemps total écoulé:\e[0m \e[3;6;94m$(date -ud "@$(($(date +%s) - START_TIME))" +%T)\e[0m  (HH:MM:SS)"

Dernière modification par Anonyme (04-02-2022 14:57:15)

#140 04-02-2022 16:37:41

--gilles--
Membre
Lieu : Orléans - La Source
Distrib. : Debian 12
Noyau : Linux 6.1.0-18-amd64
(G)UI : Gnome - mutter 43.8-0+deb12u1
Inscription : 15-02-2016

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Bonjour ! smile

J'ai les pré-requis :

/usr/local/bin# ls -ail

total 1832
522454 drwxrwsr-x  3 root staff    4096  4 févr. 15:52 .
391969 drwxrwsr-x 10 root staff    4096 21 août   2017 ..
653175 drwxr-sr-x  2 root staff    4096  8 juil.  2019 smtube
523072 -rwxr-xr-x  1 root staff   19058  4 févr. 15:44 yatoc2cue
522483 -rwxr-xr-x  1 root staff 1837828 17 déc.  13:43 youtube-dl
 




dpkg -l | grep '^.i'  | grep "cdparanoia\|cdrdao\|flac\|cuetools\|setcd\|shntool\|yatoc2cue"

ii  cdparanoia                            3.10.2+debian-13.1                   amd64        audio extraction tool for sampling CDs
ii  cdrdao                                1:1.2.4-2                            amd64        records CDs in Disk-At-Once (DAO) mode
ii  cuetools                              1.4.1-0.2                            amd64        tools for manipulating CUE/TOC files
ii  flac                                  1.3.3-2                              amd64        Free Lossless Audio Codec - command line tools
ii  libcdparanoia0:amd64                  3.10.2+debian-13.1                   amd64        audio extraction tool for sampling CDs (library)
ii  libflac8:amd64                        1.3.3-2                              amd64        Free Lossless Audio Codec - runtime C library
ii  setcd                                 1.5-6+b2                             amd64        Control the behaviour of your cdrom device
ii  shntool                               3.0.10-1+b1                          amd64        multi-purpose tool for manipulating and analyzing WAV files
 




ls -ail

total 48
12455683 drwxr-xr-x  2 intervenant101 intervenant101  4096  4 févr. 15:57 .
12320769 drwxr-xr-x 35 intervenant101 intervenant101  4096  3 févr. 22:29 ..
12453226 -rwxr-xr-x  1 intervenant101 intervenant101 18911  4 févr. 15:57 conversion-automatique.sh
12321800 -rwxr-xr-x  1 intervenant101 intervenant101    31  4 déc.   2020 gerer-initialisation-dossiers-utilisateur.sh
12453234 -rwxr-xr-x  1 intervenant101 intervenant101   176  9 janv. 21:34 script-commencement-session-firefox-esr.sh
 




Je lance le script que j'appelle conversion-automatique.sh :

./conversion-automatique.sh


Rien ne se passe.  Je ne vois jamais le message : "yatoc2cue présent, on peut donc continuer." Le script me rends la main et c'est tout !

Ensuite j'ai mis echo "Cela a commencé !" juste avant :
START_TIME=$(date +%s)

L'exécution m'affiche ce message et me rends la main.


Si tout le monde pense pareil, c'est qu'aucune personne ne pense beaucoup.
 Intel® Core™2 Duo E8500  × 2
4,0 Gio DDR3 - 1333 MHz
Et si vous cherchiez votre solution dans le wiki => https://debian-facile.org/accueil palestine.png

Hors ligne

#141 04-02-2022 17:01:55

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Bonjour
faut que je trouve pourquoi


1.  Various - This Is...Techno 2 (Disc 1) ====> sur le site freac.org

Titres:
test6.sh: ligne 154: cddb-tool : commande introuvable
test6.sh: ligne 155: cddb-tool : commande introuvable

2.  Various Artists - CD1 ====> sur le site gnudb.org

Titres:
test6.sh: ligne 171: cddb-tool : commande introuvable
test6.sh: ligne 172: cddb-tool : commande introuvable

3.  Various - This Is...Techno 2 (Disc 1) ====> sur le site dbpoweramp.com

Titres:
test6.sh: ligne 188: cddb-tool : commande introuvable
test6.sh: ligne 189: cddb-tool : commande introuvable


Entrer votre choix, 0 pour quitter: 0
 

#142 04-02-2022 17:36:56

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Désolé,

j'ai fait une erreur dans le script. Ça devrait aller maintenant wink


#!/bin/bash
## Programmes : cdparanoia cdrdao flac cuebreakpoints setcd shntool yatoc2cue
#### http://freedb.dbpoweramp.com:80
#### --driver generic-mmc:0x20000 n'est pas nécessaire pour la génération seule du TOC
#### metaflac --export-tags-to=file.txt "FICHIER.flac"
#### Supression de l'option --fast-toc dans la commande cdrdao -- SIZE_INFO & ISRC pour Nina Hagen résolu

#### Ajout de l'option --datafile "$ALBUMNAME.wav" dans la commande "cdrdao read-toc --fast-toc" pour changer "data.wav" dans le fichier toc.
#### Plus pratique pour une éventuelle gravure par le cue avec "ex: Brasero".

START_TIME=$(date +%s)


CLEANUP () {

rm -f "freac_stderr.log"
rm -f "gnudb_stderr.log"
rm -f "dbpoweramp_stderr.log"


}


ICONV () {

iconv --from-code=ISO-8859-1 --to-code=UTF-8

}



CDPARANOIA () {

cdparanoia -Z -d "$DEVICE" -S "$SPEED" 1- -w "$ALBUMNAME.wav"

}


FORMAT_TITLE_FOLDER () {

            sed -e 's/AC\/DC/\ACDC/g' | \
            sed 's/\// - /g' | \
            awk '{$1=""; $2=""; $3=""; sub("  ", " "); print}'| \
            sed s'/.$//' | \
            awk '{gsub(/^[ \t]+|[ \t]+$/,"")};1'

}





DEVICE=$(setcd -i /dev/sr* | awk '/: audio disc|\(data\/audio\)/{sub(/:$/, "", l); print l; exit}; {l=$0}')
SPEED=$(more /proc/sys/dev/cdrom/info | grep -E --color 'drive speed:' | awk '{print $3}')
CDDA=$(setcd -i /dev/sr* | grep -c "audio disc\|(data/audio)")












    if [ -e "/usr/bin/yatoc2cue" ] || [ -e "/usr/local/bin/yatoc2cue" ] ; then
    echo "yatoc2cue présent, on peut donc continuer."
    sleep 2
else
    echo "yatoc2cue est absent, veuillez installer ce programme avant de continer ... on quitte."
    sleep 2
    exit 0



  fi




if [ "$CDDA" -eq 1 ]; then
echo "Un CD Audio détecté, on continue ..."
echo ""



  fi



if [ "$CDDA" -gt 1 ]; then
echo "Plus d'un CD audio détectés, on quitte."
echo ""
exit 0


   fi


if [ "$CDDA" -eq 0 ]; then
echo "Aucun CD Audio détecté, on quitte."
echo ""
exit 0



   fi




CDDBURL_FREAC="http://freedb.freac.org/~cddb/cddb.cgi"
CDDBURL_GNUDB="http://gnudb.gnudb.org/~cddb/cddb.cgi"
CDDBURL_DBPOWERAMP="http://freedb.dbpoweramp.com/~cddb/cddb.cgi"

MYUSER="whoami"
MYHOST="hostname"


CURL="curl -v --connect-timeout 3 --max-time 10 --retry 1"

DISCID=$(cd-discid $DEVICE 2>/dev/null) || exit 1
NAME_FILE=$(cd-discid "$DEVICE" 2>/dev/null | awk '{print $1}')








### https://www.unix.com/shell-programming-and-scripting/127668-getting-curl-output-verbose-file.html
FREAC_FOLDER_NAME=$($CURL 2>freac_stderr.log "$CDDBURL_FREAC?cmd=cddb+query+$(cd-discid "$DEVICE" | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | FORMAT_TITLE_FOLDER | ICONV )

GNUDB_FOLDER_NAME=$($CURL 2>gnudb_stderr.log "$CDDBURL_GNUDB?cmd=cddb+query+$(cd-discid "$DEVICE" | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | FORMAT_TITLE_FOLDER | ICONV )

DBPOWERAMP_FOLDER_NAME=$($CURL 2>dbpoweramp_stderr.log "$CDDBURL_DBPOWERAMP?cmd=cddb+query+$(cd-discid "$DEVICE" | sed 's/ /+/g')&hello=user+hostname+cdparanoia+3&proto=3" | FORMAT_TITLE_FOLDER | ICONV )






timeout_freac=$( cat freac_stderr.log | grep -c 'Connection timeout')
timeout_gnudb=$( cat gnudb_stderr.log | grep -c 'Connection timeout')
timeout_dbpoweramp=$( cat dbpoweramp_stderr.log | grep -c 'Connection timeout')    







 while true; do
echo "Server(s) trouvé(s) :"

if  [[ "$timeout_freac" -eq 0 ]] ; then
echo -e "\e[3;32m1. \033[m \e[3;94m$FREAC_FOLDER_NAME\033[m ====> sur le site freac.org"

echo ""
echo -e "\e[3;32mTitres:\033[m"



CD=$(cddb-tool query "$CDDBURL_FREAC" 1 "$MYUSER" "$MYHOST" "$DISCID")
cddb-tool read "$CDDBURL_FREAC" 3 "$MYUSER" "$MYHOST" \
"$(echo "$CD" | head -1 | awk '{print $2 " " $3}')" | ICONV | grep TTITLE |sed 's/.*=/     /'
echo ""
else
echo -e "\e[3;32m1.  Connection timeout \033[m \e[3;94m$FREAC_FOLDER_NAME\033[m ====> sur le site freac.org"



  fi



if  [[ "$timeout_gnudb" -eq 0 ]] ; then
echo -e "\e[3;32m2. \033[m \e[3;94m$GNUDB_FOLDER_NAME\033[m ====> sur le site gnudb.org"
echo ""
echo -e "\e[3;32mTitres:\033[m"
CD=$(cddb-tool query "$CDDBURL_GNUDB" 1 "$MYUSER" "$MYHOST" "$DISCID")
cddb-tool read "$CDDBURL_GNUDB" 3 "$MYUSER" "$MYHOST" \
"$(echo "$CD" | head -1 | awk '{print $2 " " $3}')" | ICONV | grep TTITLE |sed 's/.*=/     /'
echo ""
else
echo -e "\e[3;32m2.  Connection timeout \033[m \e[3;94m$GNUDB_FOLDER_NAME\033[m ====> sur le site gnudb.org"



  fi



if  [[ "$timeout_dbpoweramp" -eq 0 ]] ; then
echo -e "\e[3;32m3. \033[m \e[3;94m$DBPOWERAMP_FOLDER_NAME\033[m ====> sur le site dbpoweramp.com"
echo ""
echo -e "\e[3;32mTitres:\033[m"
CD=$(cddb-tool query "$CDDBURL_DBPOWERAMP" 1 "$MYUSER" "$MYHOST" "$DISCID")
cddb-tool read "$CDDBURL_DBPOWERAMP" 3 "$MYUSER" "$MYHOST" \
"$(echo "$CD" | head -1 | awk '{print $2 " " $3}')" | ICONV  | grep TTITLE |sed 's/.*=/     /'
echo ""
else
echo -e "\e[3;32m3.  Connection timeout \033[m \e[3;94m$DBPOWERAMP_FOLDER_NAME\033[m ====> sur le site dbpoweramp.com"



  fi



echo ""
echo -n "Entrer votre choix, 0 pour quitter: "
read -r choice
echo

case $choice in
     1)
ALBUMNAME="$FREAC_FOLDER_NAME"
    break
     ;;
     2)
ALBUMNAME="$GNUDB_FOLDER_NAME"
    break
     ;;
     3)
ALBUMNAME="$DBPOWERAMP_FOLDER_NAME"
    break
     ;;
    0)
    echo "OK, see you!"
CLEANUP
    exit 1
    ;;
    *)
    echo "Invalid input..."
    echo "Quit"
CLEANUP
    exit 1
    ;;
esac  
done


### Choix Conversion MP3
echo -e "\e[3;94mEn plus des fichiers Flacs, vous faut-il des fichiers au format mp3 ?\033[m"
read -t 10 -p "Oui ou Non ? ( attente 10 secondes maxi )   [Y/n] " reply

case $reply in
    [yY])
echo -e "\e[3;32mRéponse: Oui\033[m"
echo ""
sleep 2
 ;;
    [nN])
echo -e "\e[3;32mRéponse: Non\033[m"
echo ""
sleep 2
 ;;
     *)
 echo "Invalid input..."
 echo "Quit"
CLEANUP
 exit 1
 ;;
esac









    echo -e "Le nom de l'album proposé est: \e[3;94m$ALBUMNAME\033[m"
read -r -p "Confirmez vous ce choix ? [Y/n] " input
case $input in
    [yY][eE][sS]|[yY])
 
    echo -e "\e[3;32mRéponse: Oui\033[m"  
    mkdir -p "$ALBUMNAME"
    ( cd "$ALBUMNAME" || exit
    CDPARANOIA)
    echo "OK, Rip terminé!"
  ;;
    [nN][oO]|[nN])
    echo -e "\e[3;32mRéponse: Non\033[m"
read -r -p "Alors, veuillez saisir un nom d'album personnalisé: " ALBUMNAME
if [[ -z "$ALBUMNAME" ]]; then
    echo "Invalid input..."
    echo "Quit"
CLEANUP
     exit 1
else    
    mkdir -p "$ALBUMNAME"
    ( cd "$ALBUMNAME" || exit
    CDPARANOIA)
    echo "OK, Rip terminé!"
fi
  ;;
    *)
 echo "Invalid input..."
 echo "Quit"
 echo "Clean"
CLEANUP
 exit 1
 ;;
esac







#### http://freedb.freac.org
if  [[ "$choice" == "1" ]] ; then
echo "On cherche l'info sur freedb.freac.org"
sleep 5
    ( cd "$ALBUMNAME" || exit
    cdrdao read-toc --fast-toc --datafile "$ALBUMNAME.wav" --device "$DEVICE" --driver generic-mmc:0x20000 --paranoia-mode 0 \
            --with-cddb --cddb-servers freedb.freac.org:/~cddb/cddb.cgi "$ALBUMNAME.toc")


   fi



#### http://gnudb.gnudb.org
if  [[ "$choice" == "2" ]] ; then
echo "On cherche l'info sur gnudb.gnudb.org"
sleep 5
    ( cd "$ALBUMNAME" || exit
    cdrdao read-toc --fast-toc --datafile "$ALBUMNAME.wav" --device "$DEVICE" --driver generic-mmc:0x20000 --paranoia-mode 0 \
            --with-cddb --cddb-servers gnudb.gnudb.org:/~cddb/cddb.cgi "$ALBUMNAME.toc")
       

   fi



#### http://freedb.dbpoweramp.com
if  [[ "$choice" == "3" ]] ; then
echo "On cherche l'info sur freedb.dbpoweramp.com"
sleep 5
    ( cd "$ALBUMNAME" || exit
    cdrdao read-toc --fast-toc --datafile "$ALBUMNAME.wav" --device "$DEVICE" --driver generic-mmc:0x20000 --paranoia-mode 0 \
            --with-cddb --cddb-servers freedb.dbpoweramp.com:/~cddb/cddb.cgi "$ALBUMNAME.toc")



   fi



## https://cryptii.com/pipes/text-octal
## https://pjb.com.au/comp/diacritics.html
## https://www.systutorials.com/docs/linux/man/7-iso_8859-15/
sed -i -e 's/\\240/ /g' -e 's/\\300/À/g' -e 's/\\340/à/g' \
       -e 's/\\241/¡/g' -e 's/\\301/Á/g' -e 's/\\341/á/g' \
       -e 's/\\242/¢/g' -e 's/\\302/Â/g' -e 's/\\342/â/g' \
       -e 's/\\243/£/g' -e 's/\\303/Ã/g' -e 's/\\343/ã/g' \
       -e 's/\\244/¤/g' -e 's/\\304/Ä/g' -e 's/\\344/ä/g' \
       -e 's/\\245/¥/g' -e 's/\\305/Å/g' -e 's/\\345/å/g' \
       -e 's/\\246/¦/g' -e 's/\\306/Æ/g' -e 's/\\346/æ/g' \
       -e 's/\\247/§/g' -e 's/\\307/Ç/g' -e 's/\\347/ç/g' \
       -e 's/\\250/¨/g' -e 's/\\310/È/g' -e 's/\\350/è/g' \
       -e 's/\\251/©/g' -e 's/\\311/É/g' -e 's/\\351/é/g' \
       -e 's/\\252/ª/g' -e 's/\\312/Ê/g' -e 's/\\352/ê/g' \
       -e 's/\\253/«/g' -e 's/\\313/Ë/g' -e 's/\\353/ë/g' \
       -e 's/\\254/¬/g' -e 's/\\314/Ì/g' -e 's/\\354/ì/g' \
       -e 's/\\255/ /g' -e 's/\\315/Í/g' -e 's/\\355/í/g' \
       -e 's/\\256/®/g' -e 's/\\316/Î/g' -e 's/\\356/î/g' \
       -e 's/\\257/¯/g' -e 's/\\317/Ï/g' -e 's/\\357/ï/g' \
       -e 's/\\260/°/g' -e 's/\\320/Ð/g' -e 's/\\360/ð/g' \
       -e 's/\\261/±/g' -e 's/\\321/Ñ/g' -e 's/\\361/ñ/g' \
       -e 's/\\262/²/g' -e 's/\\322/Ò/g' -e 's/\\362/ò/g' \
       -e 's/\\263/³/g' -e 's/\\323/Ó/g' -e 's/\\363/ó/g' \
       -e 's/\\264/´/g' -e 's/\\324/Ô/g' -e 's/\\364/ô/g' \
       -e 's/\\265/µ/g' -e 's/\\325/Õ/g' -e 's/\\365/õ/g' \
       -e 's/\\266/¶/g' -e 's/\\326/Ö/g' -e 's/\\366/ö/g' \
       -e 's/\\267/·/g' -e 's/\\327/×/g' -e 's/\\367/÷/g' \
       -e 's/\\270/¸/g' -e 's/\\330/Ø/g' -e 's/\\370/ø/g' \
       -e 's/\\271/¹/g' -e 's/\\331/Ù/g' -e 's/\\371/ù/g' \
       -e 's/\\272/º/g' -e 's/\\332/Ú/g' -e 's/\\372/ú/g' \
       -e 's/\\273/»/g' -e 's/\\333/Û/g' -e 's/\\373/û/g' \
       -e 's/\\274/¼/g' -e 's/\\334/Ü/g' -e 's/\\374/ü/g' \
       -e 's/\\275/½/g' -e 's/\\335/Ý/g' -e 's/\\375/ý/g' \
       -e 's/\\276/¾/g' -e 's/\\336/Þ/g' -e 's/\\376/þ/g' \
       -e 's/\\277/¿/g' -e 's/\\337/ß/g' -e 's/\\377/ÿ/g' "$ALBUMNAME/$ALBUMNAME.toc"


## https://unix.stackexchange.com/questions/155331/sed-replace-a-character-in-a-matched-line-in-place
sed -i -e '/TITLE/s/\\"//g' "$ALBUMNAME/$ALBUMNAME.toc"




#### AVEC CUECONVERT ( voir si on peut améliorer )
#### Message is too long -- (Deep Purple Europe MK III Final concert)
message_is_too_long=$(awk '{print $0}' "$ALBUMNAME/$ALBUMNAME.toc" | awk '/MESSAGE/ && length($0) > 100' | wc -l)
line=$(grep -n MESSAGE "$ALBUMNAME/$ALBUMNAME.toc" | awk '/MESSAGE/ && length($0) > 100' | cut -d : -f1 | tr "\n" " ")



if [[ "$message_is_too_long" -gt 0 ]] ; then
echo "Message(s) trop long(s)"
sleep 2
for i in $line; do
sed -i "${i}s/.*/    MESSAGE \"\"/" "$ALBUMNAME/$ALBUMNAME.toc"
echo -e "\e[3;94mSupression du message à la ligne $i\033[m"
sleep 2
done
else
echo -e  "\e[3;32mLe fichier toc ne contient pas de messages trop longs ...\033[m"
sleep 2



   fi


### RETOUCHE FICHIER TOC POUR (AC/DC)
### Exemple dans le fichier toc :
###    TITLE "DC / Highway To Hell"
###    PERFORMER "AC"
TOC_ACDC=$(grep -c '    TITLE "DC /.*"' "$ALBUMNAME/$ALBUMNAME.toc")

if [[ "$TOC_ACDC" -eq 1 ]]  ; then
echo -e "\e[3;32mCorrection du fichier toc pour un problème du slash de type AC/DC\033[m"
sleep 2
sed -i -e 's/    PERFORMER "AC"/    PERFORMER "ACDC"/g' "$ALBUMNAME/$ALBUMNAME.toc"
sed -i -e 's/DC \/ //' "$ALBUMNAME/$ALBUMNAME.toc"
else
echo -e  "\e[3;32mSlash de type AC/DC non détecté...\033[m"



   fi

## Vérification du fichier toc et édition le cas échéant.
#if  [[ "$input" == "n" ]] ; then
#echo -e "\e[3;32mVous avez opté pour un nom d'album personnalisé, veuillez changer title dans le fichier toc.\033[m"
#sleep 2
#nano "$ALBUMNAME/$ALBUMNAME.toc"
#else
#echo -e "\e[3;32mLe nom de l'album proposé n'a pas été modifié, alors on continue ....\033[m"
#sleep 2
#fi

## https://unix.stackexchange.com/questions/188264/want-to-substitute-only-first-occurence-with-sed
## Add quotes around a value using sed
## https://unix.stackexchange.com/questions/120211/add-quotes-around-a-value-using-sed

if  [[ "$input" == "n" ]] ; then
sed -i -e "0,/TITLE/ s/TITLE.*/TITLE \"${ALBUMNAME}\"/g" "$ALBUMNAME/$ALBUMNAME.toc"
echo -e "\e[3;94mTITLE \"${ALBUMNAME}\"\033[m\e[3;32m à bien été injecté dans le fichier toc.\033[m"
sleep 2



   fi



## EDITION FICHIER TOC
read -t 10 -p "Voulez-vous vérifier le fichier TOC ? [Y/n] ou attendre 10 secondes." input
echo ""
case $input in
    [yY][eE][sS]|[yY])

    nano -w "$ALBUMNAME/$ALBUMNAME.toc" < /dev/tty
echo ""
echo -e "\e[3;94mLe fichier $ALBUMNAME.toc a été vérifié et éventuellement corrigé.\033[m"
echo -e "\e[3;94mOn continue ...\033[m"
sleep 2
 ;;
    [nN][oO]|[nN])
    echo -e "\e[3;94mNon, on continue...\033[m"
sleep 2
 ;;
     *)
echo ""
echo -e "\e[3;94mles 10 secondes sont écoulées, on continue ...\033[m"
 ;;
esac




#### Création du fichier CDDB depuis le fichier toc avec l'utilitaire toc2cddb (cdrdao).

    toc2cddb "$ALBUMNAME/$ALBUMNAME.toc" > "$ALBUMNAME/$NAME_FILE"



#EXTRA PERSO A INTEGRER PLUS TARD POUR CREER LE DOSSIER ~/.cddb
cddb_folder=~/.cddb

  if [ ! -d "$cddb_folder" ]; then
echo -e "\e[3;32mLe dossier n'existe pas ... création du dossier .cddb\033[m"
mkdir -p "$cddb_folder"
else
echo -e "\e[3;32mLe dossier .cddb existe.\033[m"
sleep 2



   fi



 if [ -d "$cddb_folder" ] && [ -f "$cddb_folder/$NAME_FILE" ]; then
echo -e "\e[3;32mLe fichier $NAME_FILE est déjà présent\033[m"
sleep 2
else
echo -e "\e[3;32mLe fichier $NAME_FILE n'est pas présent, on le copie dans .cddb\033[m"
sleep 2
cp "$ALBUMNAME/$NAME_FILE" ~/.cddb/"$NAME_FILE"

 

   fi



#### Conversion en UTF-8 si necessaire du fichier cddb.
CODE=$( file -i "$ALBUMNAME/$NAME_FILE" | sed 's/^.*charset=/charset=/')

if [[ "$CODE" == "charset=iso-8859-1" ]]; then
    echo -e "\e[3;94mConversion du fichier CDDB en UTF-8.\033[m"
ICONV "$ALBUMNAME/$NAME_FILE" > "$ALBUMNAME/CONV_$NAME_FILE"
rm -f "$ALBUMNAME/$NAME_FILE"
mv "$ALBUMNAME/CONV_$NAME_FILE" "$ALBUMNAME/$NAME_FILE"

else
    echo -e "\e[3;32mLe fichier CDDB à le bon encodage UTF-8.\033[m"




   fi



# CRÉATION DU SCRIPT "toc2tag.pl"
## https://gist.github.com/diresi/a1a905546aa0136eaf7399c3ae4ffedd#file-toc2tag-pl

{ echo "#!/usr/bin/perl -w" ;
echo '';  
echo '$GotAlbum=0;' ;
echo '$Tracknum=0;';
echo '#$IsVarious=0;';  
echo '$Artist="";';  
echo '';  
echo 'while (<>)';  
echo '{';  
echo 'if (/\/\/ Track (\d*)/)';  
echo '{';  
echo '$Tracknum=$1;';  
echo 'print "TRACKNUMBER[$Tracknum]=$Tracknum\n";';  
echo '}';  
echo '';  
echo 'if (/TITLE "(.*)"/)';  
echo '{';  
echo 'if (!$GotAlbum)';  
echo '{';  
echo '$GotAlbum=1;';  
echo '$Album=$1;';  
echo '$Album=~ s/\// - /;';  
echo 'print "ALBUM=$Album\n";';  
echo '}';  
echo 'else';  
echo '{';  
echo 'print "TITLE[$Tracknum]=$1\n";';  
echo '}';  
echo '}';  
echo '';  
echo 'if (/PERFORMER "(.*)"/)';  
echo '{';  
echo 'if ($Tracknum==0)';  
echo '{';  
echo '$Artist=$1;';  
echo '$Artist=~ s/\///;';  
echo 'print "ARTIST=$Artist\n";';  
echo '}';  
echo 'else';  
echo '{';  
echo 'if ($1 ne $Artist)';  
echo '{';
echo 'print "ARTIST[$Tracknum]=$1\n";';
echo '}';
echo '}';
echo '}';
echo '}';
} >> "$ALBUMNAME/toc2tag.pl"

chmod u+x "$ALBUMNAME/toc2tag.pl"


awk '{print $0}' "$ALBUMNAME/$ALBUMNAME.toc" | "$ALBUMNAME"/./toc2tag.pl > "$ALBUMNAME/$ALBUMNAME.tags"


#cueconvert -i toc -o cue "$ALBUMNAME/$ALBUMNAME.toc" "$ALBUMNAME/$ALBUMNAME.cue"
yatoc2cue "$ALBUMNAME/$ALBUMNAME.toc" "$ALBUMNAME/$ALBUMNAME.cue"

#### Vivaldi.wav: ERROR parsing cuesheet "Vivaldi/Vivaldi.cue" on line 5: illegal INDEX offset (not of the form MM:SS:FF)
#### ====>>

#### TRACK 01 AUDIO
#### PREGAP 00:00:38
#### INDEX 00 00:00:-38
#### INDEX 01 00:00:00

#### Supprimer toutes les lignes qui se trouvent entre PREGAP et TRACK
#### Créer un INDEX 00 00:00:00 au dessus de PREGAP
#### Remplacer le mot PREGAP par INDEX 01
#### Supprimer tous les espaces entre les lignes ( c'est pas utile )

sed -i -e '/PREGAP/,/TRACK/{//!d}' "$ALBUMNAME/$ALBUMNAME.cue"
sed -i -e '/^PREGAP.*/i INDEX 00 00:00:00' "$ALBUMNAME/$ALBUMNAME.cue"
sed -i -e 's/PREGAP/INDEX 01/g' "$ALBUMNAME/$ALBUMNAME.cue"
sed -i -e '/^[[:blank:]]*$/d' "$ALBUMNAME/$ALBUMNAME.cue"


flac --cuesheet="$ALBUMNAME/$ALBUMNAME.cue" "$ALBUMNAME/$ALBUMNAME.wav"


# IMPORTER TAGS DANS LE FICHIER FLAC
     metaflac --add-replay-gain --no-utf8-convert \
         --import-tags-from="$ALBUMNAME/$ALBUMNAME.tags" "$ALBUMNAME/$ALBUMNAME.flac"


mkdir -p "$ALBUMNAME/FLACS"


cuebreakpoints "$ALBUMNAME/$ALBUMNAME.cue" | shnsplit -d "$ALBUMNAME/FLACS" "$ALBUMNAME/$ALBUMNAME.flac" -o "cust ext=flac flac -V --fast -o %f -"


 tail /etc/os-release | awk '/^ID=/ { print $0 }'
arch=$(tail /etc/os-release | awk '/^ID=/ { print $0 }')

if  [ "$arch" = "ID=arch" ]; then
echo ""
echo -e "\e[3;94mOn est sous Archlinux, on utilise la commande cuetag.sh\033[m"
cuetag.sh "$ALBUMNAME/$ALBUMNAME.cue" "$ALBUMNAME/FLACS"/split-track*.flac
else
echo -e "\e[3;94mOn n'est pas sous Archlinux, on essaie d'utiliser la commande cuetag.sh\033[m"
cuetag "$ALBUMNAME/$ALBUMNAME.cue" "$ALBUMNAME/FLACS"/split-track*.flac



   fi



for i in "$ALBUMNAME/FLACS"/split-track*; do

    title=$(metaflac --show-tag=TITLE "$i" | sed -e 's/TITLE=//' | sed -e 's/\//-/g')
    album=$(metaflac --show-tag=ALBUM "$i" | sed -e 's/ALBUM=//' | sed -e 's/\//-/g')
    artist=$(metaflac --show-tag=ARTIST "$i" | sed -e 's/ARTIST=//' | sed -e 's/\//-/g')
        track=$(metaflac --show-tag=TRACKNUMBER "$i" | sed -e 's/TRACKNUMBER=//' | sed -e 's/\//-/g')
       

mv "$i" "$ALBUMNAME/FLACS/$track - $title.flac"
echo ""
echo "Le fichier "$i" a bien été renommé avec son numéro, ainsi que son titre:"
echo -e "\e[3;94m$track - $title.flac\033[m"
echo ""
sleep 1
done


## CRÉER UN FICHIER M3U POUR LES FLACS SÉPARÉS.
## https://superuser.com/questions/650291/how-to-get-video-duration-in-seconds
( cd "$ALBUMNAME/FLACS" || exit

  echo '#EXTM3U'
for file in *.flac; do


duration=$( ffprobe "$file" -show_format 2>&1 | sed -n -E 's/duration=([0-9]+).*/\1/p')
TAG_ARTIST=$( ffprobe "$file" -show_format 2>&1 | sed -n 's/TAG:ARTIST=//p')
TAG_track=$( ffprobe "$file" -show_format 2>&1 | sed -n 's/TAG:track=//p')
TAG_TITLE=$( ffprobe "$file" -show_format 2>&1 | sed -n 's/TAG:TITLE=//p')


  echo '#EXTINF:'"$duration","$TAG_ARTIST" - "$TAG_TITLE"
  echo "$file"
done ) >> "$ALBUMNAME/FLACS/$ALBUMNAME.m3u"







### Conversion En MP3
if [[ $reply == "y" || $reply == "Y" ]]
then
echo -e "\e[3;32mSortie des Mp3s\033[m"
sleep 2
mkdir -p "$ALBUMNAME/MP3S"

for a in "$ALBUMNAME/FLACS"/*.flac; do
  < /dev/null ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}"
mv "${a[@]/%flac/mp3}" "$ALBUMNAME/MP3S"
done
cp "$ALBUMNAME/FLACS/$ALBUMNAME.m3u" "$ALBUMNAME/MP3S/$ALBUMNAME.m3u"
sed -i -e 's/.flac/.mp3/g' "$ALBUMNAME/MP3S/$ALBUMNAME.m3u"
else
echo -e "\e[3;32mPas de sortie Mp3\033[m"
sleep 2



  fi




#glyrc cover -v 0 -w "$ALBUMNAME/$ALBUMNAME.png" -f lastfm -F png --artist "$artist" --album "$album"



eject $DEVICE

CLEANUP

echo -e "\e[32mTemps total écoulé:\e[0m \e[3;6;94m$(date -ud "@$(($(date +%s) - START_TIME))" +%T)\e[0m  (HH:MM:SS)"

#143 04-02-2022 18:37:43

Debian Alain
Membre
Lieu : Bretagne
Distrib. : sid (unstable) / bullseye (stable)
Noyau : Linux sid 6.4.0-3-amd64
(G)UI : Gnome X.org (X11) / GDM3
Inscription : 11-03-2017
Site Web

Re : [En cours ...] Tester mon script pour archivage Compact Disc

bonsoir Anonyme big_smile  big_smile  big_smile

je teste actuellement ton script .

j'ai dû installer "abcde"

apt policy abcde


abcde:
  Installé : 2.9.3-1
  Candidat : 2.9.3-1
 Table de version :
 *** 2.9.3-1 500
        100 http://deb.debian.org/debian testing/main amd64 Packages
        100 http://deb.debian.org/debian testing/main i386 Packages
        500 http://deb.debian.org/debian unstable/main amd64 Packages
        500 http://deb.debian.org/debian unstable/main i386 Packages
        100 http://deb.debian.org/debian bullseye/main amd64 Packages
        100 http://deb.debian.org/debian bullseye/main i386 Packages
        100 /var/lib/dpkg/status
 



ls "Vivaldi -"*/


 1c0f9815                                                                         "Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.flac"
 FLACS                                                                            "Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.tags"
 MP3S                                                                             "Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.toc"
 toc2tag.pl                                                                       "Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.wav"
"Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.cue"
 



ls FLACS


alain@sid:~/Téléchargements/Anonyme/Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés$ ls FLACS
'01 - concerto N°1 le printemps Allegro.flac'       "12 - concerto N°4 l'hiver Allegro.flac"
'02 - concerto N°1 le printemps Largo.flac'         '13 - concerto MRV 532 pour 2 mandolines et cordes en sol majeur Allegro.flac'
'03 - concerto N°1 le printemps Allegro.flac'       '14 - concerto MRV 532 pour 2 mandolines et cordes en sol majeur Andante.flac'
"04 - concerto N°2 l'été Allegro molto.flac"        '15 - concerto MRV 532 pour 2 mandolines et cordes en sol majeur Allegro.flac'
"05 - concerto N°2 l'été Adagio.flac"               '16 - concerto R 447 en ut majeur Allegro non molto.flac'
"06 - concerto N°2 l'été Presto.flac"               '17 - concerto R 447 en ut majeur Larghetto.flac'
"07 - concerto N°3 l'automne Allegro.flac"          '18 - concerto R 447 en ut majeur Minuetto.flac'
"08 - concerto N°3 l'automne Adagio molto.flac"     '19 - concerto RV 434 pour flûte Allegro ma non tanto.flac'
"09 - concerto N°3 l'automne Allegro.flac"          '20 - concerto RV 434 pour flûte Largo cantabile.flac'
"10 - concerto N°4 l'hiver Allegro non molto.flac"  '21 - concerto RV 434 pour flûte Allegro.flac'
"11 - concerto N°4 l'hiver Largo.flac"              "Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.m3u"
 



ls MP3S


'01 - concerto N°1 le printemps Allegro.mp3'       "12 - concerto N°4 l'hiver Allegro.mp3"
'02 - concerto N°1 le printemps Largo.mp3'         '13 - concerto MRV 532 pour 2 mandolines et cordes en sol majeur Allegro.mp3'
'03 - concerto N°1 le printemps Allegro.mp3'       '14 - concerto MRV 532 pour 2 mandolines et cordes en sol majeur Andante.mp3'
"04 - concerto N°2 l'été Allegro molto.mp3"        '15 - concerto MRV 532 pour 2 mandolines et cordes en sol majeur Allegro.mp3'
"05 - concerto N°2 l'été Adagio.mp3"               '16 - concerto R 447 en ut majeur Allegro non molto.mp3'
"06 - concerto N°2 l'été Presto.mp3"               '17 - concerto R 447 en ut majeur Larghetto.mp3'
"07 - concerto N°3 l'automne Allegro.mp3"          '18 - concerto R 447 en ut majeur Minuetto.mp3'
"08 - concerto N°3 l'automne Adagio molto.mp3"     '19 - concerto RV 434 pour flûte Allegro ma non tanto.mp3'
"09 - concerto N°3 l'automne Allegro.mp3"          '20 - concerto RV 434 pour flûte Largo cantabile.mp3'
"10 - concerto N°4 l'hiver Allegro non molto.mp3"  '21 - concerto RV 434 pour flûte Allegro.mp3'
"11 - concerto N°4 l'hiver Largo.mp3"              "Vivaldi - Les Quatres Saisons - Concertos Célèbres - Chefs-d'Oeuvre Sacrés.m3u"
 



çà và comme retours ?

amicalement .

alain .

coyotus.png

Dernière modification par Debian Alain (04-02-2022 18:47:26)

Hors ligne

#144 04-02-2022 19:53:59

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

@Debian Alain

Bonsoir,

ça m'a l'air pas mal tout ça.
Fais moi un retour sans cd dans le lecteur wink

#145 04-02-2022 20:31:02

--gilles--
Membre
Lieu : Orléans - La Source
Distrib. : Debian 12
Noyau : Linux 6.1.0-18-amd64
(G)UI : Gnome - mutter 43.8-0+deb12u1
Inscription : 15-02-2016

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Il faudrait mettre plus de messages d'avertissement concernant la présence des paquets ( pour universaliser le script avec ceux qui voudraient faire marcher le script en ayant une installation de base ) :
Exemple avec abcde :

apt install abcde

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
Lecture des informations d'état... Fait      
Les paquets supplémentaires suivants seront installés :
  cd-discid glyrc libclass-accessor-perl libclass-method-modifiers-perl libcommon-sense-perl libcpanel-json-xs-perl libev-perl
  libfuture-asyncawait-perl libfuture-perl libglyr1 libio-socket-ip-perl libio-socket-socks-perl libjs-bootstrap4
  libjs-highlight.js libjs-popper.js libjs-sizzle libmojo-server-fastcgi-perl libmojolicious-perl libmusicbrainz-discid-perl
  librole-tiny-perl libwebservice-musicbrainz-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl
  libxml-sax-expat-perl libxml-sax-perl libxs-parse-sublike-perl node-jquery
Paquets suggérés :
  distmp3 id3 id3v2 eyed3 normalize-audio vorbisgain mkcue mp3gain atomicparsley libxml-sax-expatxs-perl
Les NOUVEAUX paquets suivants seront installés :
  abcde cd-discid glyrc libclass-accessor-perl libclass-method-modifiers-perl libcommon-sense-perl libcpanel-json-xs-perl
  libev-perl libfuture-asyncawait-perl libfuture-perl libglyr1 libio-socket-ip-perl libio-socket-socks-perl libjs-bootstrap4
  libjs-highlight.js libjs-popper.js libjs-sizzle libmojo-server-fastcgi-perl libmojolicious-perl libmusicbrainz-discid-perl
  librole-tiny-perl libwebservice-musicbrainz-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl
  libxml-sax-expat-perl libxml-sax-perl libxs-parse-sublike-perl node-jquery
0 mis à jour, 29 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 5360 ko dans les archives.
Après cette opération, 16,0 Mo d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n]

 




Avec abcde cela marche :

~/Musique$ ./conversion-automatique.sh
yatoc2cue présent, on peut donc continuer.
Un CD Audio détecté, on continue ...

Server(s) trouvé(s) :
1.  Michel Berger - Celui qui chante CD 1 ====> sur le site freac.org

Titres:
     Pour être moins seul (on n'est pas seul)
     Ecoute la musique
     Celui qui chante
     Diego, libre dans sa tête
     Mademoiselle Chang
     Quelque chose de Tennessee / Si maman si (live)
     Quand on est ensemble
     Maria Carmencita, sourde et muette
     L'amour est là
     Ça balance pas mal à Paris (avec France Gall)
     Seras-tu là
     À moitié, à demi, pas du tout
     Pour me comprendre
     Voyou
     Ça ne tient pas debout
     Si tu plonges

2.  Michel Berger - Celui qui chante ====> sur le site gnudb.org

Titres:
     Pour être moins seul (on n'est pas seul)
     Ecoute la musique
     Celui qui chante
     Diego, libre dans sa tête
     Mademoiselle Chang
     Quelque chose de Tennessee / Si maman si (live)
     Quand on est ensemble
     Maria Carmencita, sourde et muette
     L'amour est là
     Ça balance pas mal à Paris (avec France Gall)
     Seras-tu là
     À moitié, à demi, pas du tout
     Pour me comprendre
     Voyou
     Ça ne tient pas debout
     Si tu plonges

3.  Michel Berger - Celui qui chante CD 1 ====> sur le site dbpoweramp.com

Titres:
     Pour être moins seul (on n'est pas seul)
     Ecoute la musique
     Celui qui chante
     Diego, libre dans sa tête
     Mademoiselle Chang
     Quelque chose de Tennessee / Si maman si (live)
     Quand on est ensemble
     Maria Carmencita, sourde et muette
     L'amour est là
     Ça balance pas mal à Paris (avec France Gall)
     Seras-tu là
     À moitié, à demi, pas du tout
     Pour me comprendre
     Voyou
     Ça ne tient pas debout
     Si tu plonges


Entrer votre choix, 0 pour quitter: 2

En plus des fichiers Flacs, vous faut-il des fichiers au format mp3 ?
Oui ou Non ? ( attente 10 secondes maxi )   [Y/n] n
Réponse: Non

Le nom de l'album proposé est: Michel Berger - Celui qui chante
Confirmez vous ce choix ? [Y/n] y
Réponse: Oui
cdparanoia III release 10.2 (September 11, 2008)


Attempting to set speed to 40x...
Ripping from sector       0 (track  1 [0:00.00])
      to sector  247481 (track 16 [4:33.51])

outputting to Michel Berger - Celui qui chante.wav

(== PROGRESS == [                              | 247481 00 ] == :^D * ==)   

Done.


OK, Rip terminé!
On cherche l'info sur gnudb.gnudb.org
Cdrdao version 1.2.4 - (C) Andreas Mueller <andreas@daneb.de>
/dev/sr0: hp DVD-RAM GH60L    Rev: RD01
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x20000)

Reading toc data...

Track   Mode    Flags  Start                Length
------------------------------------------------------------
1      AUDIO   0      00:00:00(     0)     01:30:10(  6760)
2      AUDIO   0      01:30:10(  6760)     02:58:50( 13400)
3      AUDIO   0      04:28:60( 20160)     03:09:25( 14200)
4      AUDIO   0      07:38:10( 34360)     02:40:05( 12005)
5      AUDIO   0      10:18:15( 46365)     04:45:67( 21442)
6      AUDIO   0      15:04:07( 67807)     03:50:18( 17268)
7      AUDIO   0      18:54:25( 85075)     03:57:52( 17827)
8      AUDIO   0      22:52:02(102902)     02:27:33( 11058)
9      AUDIO   0      25:19:35(113960)     02:17:70( 10345)
10      AUDIO   0      27:37:30(124305)     02:16:25( 10225)
11      AUDIO   0      29:53:55(134530)     03:42:20( 16670)
12      AUDIO   0      33:36:00(151200)     02:10:10(  9760)
13      AUDIO   0      35:46:10(160960)     03:29:67( 15742)
14      AUDIO   0      39:16:02(176702)     04:35:03( 20628)
15      AUDIO   0      43:51:05(197330)     06:35:00( 29625)
16      AUDIO   0      50:26:05(226955)     04:33:52( 20527)
Leadout AUDIO   0      54:59:57(247482)

PQ sub-channel reading (audio track) is supported, data format is BCD.
Raw P-W sub-channel reading (audio track) is supported.
Analyzing track 01 (AUDIO): start 00:00:00, length 01:30:10...
Analyzing track 02 (AUDIO): start 01:30:10, length 02:58:50...
Analyzing track 03 (AUDIO): start 04:28:60, length 03:09:25...
Analyzing track 04 (AUDIO): start 07:38:10, length 02:40:05...
Analyzing track 05 (AUDIO): start 10:18:15, length 04:45:67...
Analyzing track 06 (AUDIO): start 15:04:07, length 03:50:18...
Analyzing track 07 (AUDIO): start 18:54:25, length 03:57:52...
Analyzing track 08 (AUDIO): start 22:52:02, length 02:27:33...
Analyzing track 09 (AUDIO): start 25:19:35, length 02:17:70...
Analyzing track 10 (AUDIO): start 27:37:30, length 02:16:25...
Analyzing track 11 (AUDIO): start 29:53:55, length 03:42:20...
Analyzing track 12 (AUDIO): start 33:36:00, length 02:10:10...
Analyzing track 13 (AUDIO): start 35:46:10, length 03:29:67...
Analyzing track 14 (AUDIO): start 39:16:02, length 04:35:03...
Analyzing track 15 (AUDIO): start 43:51:05, length 06:35:00...
Analyzing track 16 (AUDIO): start 50:26:05, length 04:33:52...
Found disk catalogue number.
           
CDDB: Connecting to http://gnudb.gnudb.org:80/~cddb/cddb.cgi ...
CDDB: Ok.
Reading CDDB record for: cc0ce310-rock-Michel Berger / Celui qui chante
CDDB: Connecting to http://gnudb.gnudb.org:80/~cddb/cddb.cgi ...
CDDB: Ok.
CD-TEXT data was added to toc-file.
Reading of toc data finished successfully.
Le fichier toc ne contient pas de messages trop longs ...
Slash de type AC/DC non détecté...
Voulez-vous vérifier le fichier TOC ? [Y/n] ou attendre 10 secondes.y


Le fichier Michel Berger - Celui qui chante.toc a été vérifié et éventuellement corrigé.
On continue ...
Le dossier .cddb existe.
Le fichier cc0ce310 n'est pas présent, on le copie dans .cddb
Le fichier CDDB à le bon encodage UTF-8.

flac 1.3.3
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

Michel Berger - Celui qui chante.wav: wrote 340045690 bytes, ratio=0,584
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track01.flac] (1:30.10) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track02.flac] (2:58.50) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track03.flac] (3:09.25) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track04.flac] (2:40.05) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track05.flac] (4:45.67) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track06.flac] (3:50.18) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track07.flac] (3:57.52) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track08.flac] (2:27.33) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track09.flac] (2:17.70) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track10.flac] (2:16.25) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track11.flac] (3:42.20) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track12.flac] (2:10.10) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track13.flac] (3:29.67) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track14.flac] (4:35.03) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track15.flac] (6:35.00) : 100% OK
Splitting [Michel Berger - Celui qui chante/Michel Berger - Celui qui chante.flac] (54:59.57) --> [Michel Berger - Celui qui chante/FLACS/split-track16.flac] (4:33.52) : 100% OK
ID=debian
On n'est pas sous Archlinux, on essaie d'utiliser la commande cuetag.sh

Le fichier Michel Berger - Celui qui chante/FLACS/split-track01.flac a bien été renommé avec son numéro, ainsi que son titre:
01 - Pour être moins seul (on n'est pas seul).flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track02.flac a bien été renommé avec son numéro, ainsi que son titre:
02 - Ecoute la musique.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track03.flac a bien été renommé avec son numéro, ainsi que son titre:
03 - Celui qui chante.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track04.flac a bien été renommé avec son numéro, ainsi que son titre:
04 - Diego, libre dans sa tête.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track05.flac a bien été renommé avec son numéro, ainsi que son titre:
05 - Mademoiselle Chang.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track06.flac a bien été renommé avec son numéro, ainsi que son titre:
06 - Quelque chose de Tennessee - Si maman si (live).flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track07.flac a bien été renommé avec son numéro, ainsi que son titre:
07 - Quand on est ensemble.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track08.flac a bien été renommé avec son numéro, ainsi que son titre:
08 - Maria Carmencita, sourde et muette.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track09.flac a bien été renommé avec son numéro, ainsi que son titre:
09 - L'amour est là.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track10.flac a bien été renommé avec son numéro, ainsi que son titre:
10 - Ça balance pas mal à Paris (avec France Gall).flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track11.flac a bien été renommé avec son numéro, ainsi que son titre:
11 - Seras-tu là.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track12.flac a bien été renommé avec son numéro, ainsi que son titre:
12 - À moitié, à demi, pas du tout.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track13.flac a bien été renommé avec son numéro, ainsi que son titre:
13 - Pour me comprendre.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track14.flac a bien été renommé avec son numéro, ainsi que son titre:
14 - Voyou.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track15.flac a bien été renommé avec son numéro, ainsi que son titre:
15 - Ça ne tient pas debout.flac


Le fichier Michel Berger - Celui qui chante/FLACS/split-track16.flac a bien été renommé avec son numéro, ainsi que son titre:
16 - Si tu plonges.flac

Pas de sortie Mp3
Temps total écoulé: 00:05:01  (HH:MM:SS)
intervenant101@machine:~/Musique$

Dernière modification par --gilles-- (04-02-2022 20:32:00)


Si tout le monde pense pareil, c'est qu'aucune personne ne pense beaucoup.
 Intel® Core™2 Duo E8500  × 2
4,0 Gio DDR3 - 1333 MHz
Et si vous cherchiez votre solution dans le wiki => https://debian-facile.org/accueil palestine.png

Hors ligne

#146 04-02-2022 20:40:52

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

@--gilles--

Merci ton essai et ton post 145.
Je vais voir pour les messages d'avertissement. ( Je suis sous Arch donc je ne peux que compter sur vous ) wink

Dernière modification par Anonyme (04-02-2022 20:41:06)

#147 04-02-2022 21:03:01

anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Bonsoir


Titres:

3.  for disc ID 8a10d20a. ====> sur le site dbpoweramp.com

Titres:


Entrer votre choix, 0 pour quitter: 1

En plus des fichiers Flacs, vous faut-il des fichiers au format mp3 ?
Oui ou Non ? ( attente 10 secondes maxi )   [Y/n] y
Réponse: Oui

Le nom de l'album proposé est: for disc ID 8a10d20a.
Confirmez vous ce choix ? [Y/n] y
Oui
cdparanoia III release 10.2 (September 11, 2008)


Attempting to set speed to 48x...
Ripping from sector      32 (track  1 [0:00.00])
    to sector  322959 (track 10 [10:59.14])

outputting to for disc ID 8a10d20a..wav

 (== PROGRESS == [                              | 322959 00 ] == :^D * ==)  

Done.


OK, Rip terminé!
On cherche l'info sur freedb.freac.org
 





Input #0, flac, from 'for disc ID 8a10d20a./FLACS/09 - .flac':
  Metadata:
    track           : 09
    TRACKTOTAL      : 10
  Duration: 00:07:38.71, start: 0.000000, bitrate: 1062 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'for disc ID 8a10d20a./FLACS/09 - .mp3':
  Metadata:
    TRCK            : 09
    TRACKTOTAL      : 10
    TSSE            : Lavf58.20.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc58.35.100 libmp3lame
size=   14715kB time=00:07:38.71 bitrate= 262.8kbits/s speed=  62x    
video:0kB audio:14715kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001938%
ffmpeg version 4.1.8-0+deb10u1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version=0+deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, flac, from 'for disc ID 8a10d20a./FLACS/10 - .flac':
  Metadata:
    track           : 10
    TRACKTOTAL      : 10
  Duration: 00:10:59.20, start: 0.000000, bitrate: 1085 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'for disc ID 8a10d20a./FLACS/10 - .mp3':
  Metadata:
    TRCK            : 10
    TRACKTOTAL      : 10
    TSSE            : Lavf58.20.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc58.35.100 libmp3lame
size=   22375kB time=00:10:59.20 bitrate= 278.1kbits/s speed=59.9x    
video:0kB audio:22375kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001274%
test6.sh: ligne 710: glyrc : commande introuvable
Temps total écoulé: 00:06:29  (HH:MM:SS)
 



pour glyrc , je l'ai installé .

tout fonctionne je refais un essaie

Dernière modification par anonyme (04-02-2022 21:10:45)

#148 04-02-2022 21:07:19

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

@anonyme

Bonsoir


En plus des fichiers Flacs, vous faut-il des fichiers au format mp3 ?
Oui ou Non ? ( attente 10 secondes maxi )   [Y/n] y
Réponse: Oui
 



Eh ben voyons big_smile

Output #0, mp3, to 'for disc ID 8a10d20a./FLACS/10 - .mp3':



Tu t'es pas servi de nano ici ?

#149 04-02-2022 21:09:16

Anonyme
Invité

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Pour pour glyrc pas moyen d'avoir plus de 300x300. Même le man, j'ai du mal et surtout le glyrc --list  hmm

#150 04-02-2022 21:12:31

Debian Alain
Membre
Lieu : Bretagne
Distrib. : sid (unstable) / bullseye (stable)
Noyau : Linux sid 6.4.0-3-amd64
(G)UI : Gnome X.org (X11) / GDM3
Inscription : 11-03-2017
Site Web

Re : [En cours ...] Tester mon script pour archivage Compact Disc

Anonyme  a écrit :

@Debian Alain

Bonsoir,

ça m'a l'air pas mal tout ça.
Fais moi un retour sans cd dans le lecteur



bash test6.sh


yatoc2cue présent, on peut donc continuer.
Aucun CD Audio détecté, on quitte.
 

Hors ligne

Pied de page des forums