[Risolto] rippare cd audio ubuntu 12.04

Installazione, configurazione e utilizzo di applicativi multimediali, masterizzazione, acquisizione e codec audio/video, streaming e altro.
klemvor
Prode Principiante
Messaggi: 28
Iscrizione: sabato 12 gennaio 2013, 14:06
Desktop: Enlightment 17
Distribuzione: Ubuntu 12.04.1 LTS i686

Re: rippare cd audio ubuntu 12.04

Messaggio da klemvor »

io ho scritto uno script che usa il programma pacpl, funziona, ma non è così elegante perché in realtà pacpl richiama altri programmi, comunque la versione attuale è la seguente:

Codice: Seleziona tutto

#!/bin/sh
#script pacprip
cdinfo=`pacpl --device=/dev/sr0 --cdinfo`
#
#computing info about album
#
album=`echo "$cdinfo" | head -n 4 | tail -n 1`
lengthalbum=`echo $album | wc -c | tr -d ' '`
album=`echo "$album" | cut -c10-"$lengthalbum"`
#
#computing information about artist
#
artist=`echo "$cdinfo" | head -n 3 | tail -n 1`
lengthartist=`echo $artist | wc -c | tr -d ' '`
artist=`echo "$artist" | cut -c10-"$lengthartist"`
#
#computing information about year
#
year=`echo "$cdinfo" | head -n 7 | tail -n 1`
lengthyear=`echo $year | wc -c | tr -d ' '`
lengthyear=`echo  $lenghtyear | bc`
year=`echo "$year" | cut -c10-"$lengthyear"`
#
#checking the number of traks
#
track=`echo "$cdinfo" | head -n 6 | tail -n 1`
lengthtrack=`echo $track | wc -c | tr -d ' '`
lengthyear=`echo  $lenghttrack | bc`
track=`echo "$track" | cut -c10-"$lengthtrack"`

echo "Will be ripped the $album ($year) album by $artist. There are $track tracks\n"

#make a directory named after the artist and one named after the album
#with the year before the title, so if you have the discography
#it will be ordered from the older to the newer
#In order to do this first we have to make the artist
#and the album title in a way such that they could be accepted by mkdir
#

OUTDIR=~/Musica/"$artist"/"$year - $album"

if [ ! -d "$OUTDIR" ]; then
	echo "Output dir will be created."
	mkdir -p "$OUTDIR"
fi


if [ $track -gt 10 ]; then
	pacpl -v --rip 1,2,3,4,5,6,7,8,9 --to mp3 --bitrate 320 --nscheme "0%tr - %ti" --device=/dev/sr0 --outdir "$OUTDIR";
	counter=10
	while [ $counter -le $track ];do
		pacpl -v --device=/dev/cdrom1 --rip $counter --to mp3 --bitrate 320 --nscheme "%tr - %ti" --device=/dev/sr0 --outdir "$OUTDIR";
	counter=`echo  $counter+1 | bc`
	done
else
	pacpl -v --device=/dev/cdrom1 --rip all --to mp3 --bitrate 320 --nscheme "0%tr - %ti" --device=/dev/sr0 --outdir "$OUTDIR";
fi
Il mio device del cdrom è cdrom1! fate attenzione, se il vostro fosse /dev/cdrom dovete cambiare! Per eserguirlo basta che lo salviate in un file gli diate i permessi di esecuzione con chmod e poi li lanciate dopo aver messo il cd nel drive
Avatar utente
Janvitus
Amministratore
Amministratore
Messaggi: 18787
Iscrizione: lunedì 25 aprile 2005, 15:52
Desktop: GNOME Shell / Xfce
Sesso: Maschile
Località: Potenza
Contatti:

Re: rippare cd audio ubuntu 12.04

Messaggio da Janvitus »

max4109 » [url=http://forum.ubuntu-it.org/viewtopic.php?p=4292538#p4292538]sabato 12 gennaio 2013, 18:04[/url] ha scritto:Mi sembra un po' eccessivo il (dovete)! Anche perché. Non tutti sono programmatori....comunque piuttosto usero cdex. Grazie comunque
Programmatori?

http://en.wikipedia.org/wiki/Gconf-editor
http://askubuntu.com/questions/17249/ho ... onf-editor

Ricorda molto lontanamente il registro di sistema di Windows, solo che qui non fai danni ed è essenziale capirne il funzionamento per via delle molte configurazioni nascoste :)
+Fedora 40 • +Xubuntu 24.04
max4109
Prode Principiante
Messaggi: 31
Iscrizione: giovedì 10 gennaio 2013, 4:28
Desktop: gnome-shell 3.22
Distribuzione: ubuntu

Re: rippare cd audio ubuntu 12.04

Messaggio da max4109 »

Grazie a tutti ma alla fine userò cdex con wine...funziona alla grande e velocemente.
Avatar utente
Mdfalcubo
Moderatore Globale
Moderatore Globale
Messaggi: 20420
Iscrizione: venerdì 26 dicembre 2008, 11:17
Desktop: Solo XFCE
Distribuzione: Xubuntu 64 bit
Sesso: Maschile

Re: rippare cd audio ubuntu 12.04

Messaggio da Mdfalcubo »

Allora aggiungi [Risolto] al titolo del primo post grazie.
"Il genere umano è stimolante, è la gente che non sopporto,, (Linus - Peanuts)
Scrivi risposta

Ritorna a “Multimediale”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 3 ospiti