Vous n'êtes pas identifié(e).
Merci par avance à celui ou ceux qui voudront bien m'aider.
Dernière modification par Anonyme (01-03-2015 14:16:42)
#!/bin/bash
#patrick@debian:~$ pactl list sources | grep Name:
# Name: alsa_input.pci-0000_05_01.1.analog-stereo
# Name: alsa_output.pci-0000_05_02.0.analog-surround-51.monitor
# Name: alsa_input.pci-0000_05_02.0.analog-stereo
#patrick@debian:~$
Format=(" Monitor 6 Channels 16 Bits Wav" " Monitor 2 Channels Flac" " Monitor 2 Channels 24 Bits Wav" " Line")
choice=$(zenity --list --radiolist --width=450 --height=250 \
--title "Capture" \
--text="Sélectionner un choix" \
--column="Choix" --column=" Entrée Format" \
FALSE "${Format[0]}" \
FALSE "${Format[1]}" \
FALSE "${Format[2]}" \
FALSE "${Format[3]}");
echo "choice=$choice"
if [ "$choice" == "${Format[0]}" ]; then avconv -ac 6 -ar 96000 -f pulse -i alsa_output.pci-0000_05_02.0.analog-surround-51.monitor -acodec copy ~/Bureau/Monitor-$(date +%F-%H-%M-%S).wav & export PID=$$
wait $PID
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
export YES=$
elif [ "$choice" == "${Format[1]}" ]; then avconv -ac 2 -ar 96000 -f pulse -i alsa_output.pci-0000_05_02.0.analog-surround-51.monitor -acodec flac -compression_level 0 ~/Bureau/Monitor-$(date +%F-%H-%M-%S).flac & export PID=$$
wait $PID
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
export YES=$
elif [ "$choice" == "${Format[2]}" ]; then avconv -ac 2 -ar 96000 -f pulse -i alsa_output.pci-0000_05_02.0.analog-surround-51.monitor -acodec pcm_s24le ~/Bureau/Monitor-$(date +%F-%H-%M-%S).wav & export PID=$$
wait $PID
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
export YES=$
elif [ "$choice" == "${Format[3]}" ]; then avconv -f alsa -ac 2 -ar 44000 -f pulse -i alsa_input.pci-0000_05_02.0.analog-stereo -acodec pcm_s16le ~/Bureau/LINE-$(date +%F-%H-%M-%S).wav & export PID=$$
PID=$$
wait $PID
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
export YES=$
else
echo "Aucun choix, -- Arrêt"
exit 1
fi
Dernière modification par Anonyme (02-03-2015 00:54:44)
#!/bin/bash
#patrick@debian:~$ pactl list sources | grep Name:
# Name: alsa_input.pci-0000_05_01.1.analog-stereo
# Name: alsa_output.pci-0000_05_02.0.analog-surround-51.monitor
# Name: alsa_input.pci-0000_05_02.0.analog-stereo
#patrick@debian:~$
Format=(" Monitor 6 Channels 16 Bits Wav" " Monitor 2 Channels Flac" " Monitor 2 Channels 24 Bits Wav" " Line")
choice=$(zenity --list --radiolist --width=450 --height=250 \
--title "Capture" \
--text="Sélectionner un choix" \
--column="Choix" --column=" Entrée Format" \
FALSE "${Format[0]}" \
FALSE "${Format[1]}" \
FALSE "${Format[2]}" \
FALSE "${Format[3]}");
echo "choice=$choice"
if [ "$choice" == "${Format[0]}" ]; then avconv -ac 6 -ar 96000 -f pulse -i alsa_output.pci-0000_05_02.0.analog-surround-51.monitor -acodec copy ~/Bureau/Monitor-$(date +%F-%H-%M-%S).wav & export PID=$$
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
elif [ "$choice" == "${Format[1]}" ]; then avconv -ac 2 -ar 96000 -f pulse -i alsa_output.pci-0000_05_02.0.analog-surround-51.monitor -acodec flac -compression_level 0 ~/Bureau/Monitor-$(date +%F-%H-%M-%S).flac & export PID=$$
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
elif [ "$choice" == "${Format[2]}" ]; then avconv -ac 2 -ar 96000 -f pulse -i alsa_output.pci-0000_05_02.0.analog-surround-51.monitor -acodec pcm_s24le ~/Bureau/Monitor-$(date +%F-%H-%M-%S).wav & export PID=$$
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
elif [ "$choice" == "${Format[3]}" ]; then avconv -f alsa -ac 2 -ar 44000 -f pulse -i alsa_input.pci-0000_05_02.0.analog-stereo -acodec pcm_s16le ~/Bureau/LINE-$(date +%F-%H-%M-%S).wav & export PID=$$
zenity --progress --width=600 --height=50 --pulsate --auto-close --text="Capture en cours..."
else
echo "Aucun choix, -- Arrêt"
exit 1
fi
Dernière modification par Anonyme (02-03-2015 17:20:57)