Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • CLI
  • Multimedia
  • Plugins
  • Windows
  • Contact

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN
  • Incus

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

spotifyripper

Install

git clone https://github.com/panticz/spotifyripper.git
cd spotifyripper
./spotifyripper.py

Spotify ripper
https://github.com/panticz/spotifyripper

[embed_url: https://raw.githubusercontent.com/panticz/spotifyripper/master/spotifyripper.py]

Record stream

SPOTIFY=$(pacmd list-sink-inputs | while read line; do
  [[ -n $(echo $line | grep "index:") ]] && index=$line
  [[ -n $(echo $line | grep Spotify) ]] && echo $index && exit
done | cut -d: -f2)
echo ${SPOTIFY}

# muted
pactl load-module module-null-sink 'sink_name=spotify'
pactl move-sink-input ${SPOTIFY} spotify
parec -d spotify.monitor | oggenc -b 320 -o /tmp/spotify.ogg --raw -
parec --verbose --monitor-stream=${SPOTIFY} | oggenc -b 320 -o /tmp/spotify.ogg --raw -

# v2
# unmuted
#parec --verbose --monitor-stream=${SPOTIFY} | oggencode -b 320 -o /tmp/spotify.ogg --raw -
parec --verbose --monitor-stream=${SPOTIFY} --file-format=wav /tmp/recording.wav 
#parec --verbose --monitor-stream=${SPOTIFY} | lame -r --quiet -q 3 --lowpass 17 --abr 192 - /tmp/spotify.mp3
parec -d record-n-play.monitor 

# cleanup / restart pulseaudio
# systemctl --user restart pulseaudio.service
pulseaudio -k && pulseaudio --start

Links
https://amish.naidu.dev/blog/dbus/
https://ccoffey.ie/?p=53
https://programtalk.com/vs2/python/14193/spotify-music-downloader/spotify_downloader.py/#
https://pypi.org/project/pulsectl/#usage
http://panticz.de/pulseaudio

music