python-vlc icon indicating copy to clipboard operation
python-vlc copied to clipboard

Play audio CD from external drive - cdda

Open joern20 opened this issue 5 years ago • 0 comments

Hi, I was able to successful start playing a MP3 file using python-vlc, to verify my setup. I'm using a raspberry pi 4 2GB with latest raspbian and vlc installed.

But I was not able to play any audio cd from my external USB CD drive.

My question is: How does it work to start playing an audio CD using python-vlc?

To verify that the external CD drive is working and the path of external drive is correct I put in a terminal window: cvlc cdda://sr0 and cvlc cdda:///dev/cdrom both variants work and I can hear the music.

Using the following basic code the CD rom drive is activated and starts reading the CD, after like ~30 seconds the CD rom drive stops reading.

import vlc media=vlc.MediaPlayer("cdda://sr0") media.play()

I get one error message which is: [0147cc08] vlcpulse audio output error: PulseAudio server connection failure: Connection refused But this message is also appearing playing a MP3, which works.

Thanks in advance.

joern20 avatar Oct 15 '20 12:10 joern20