WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mpg123 playing https radiostream  (Read 136 times)

Offline opa

  • Newbie
  • *
  • Posts: 2
mpg123 playing https radiostream
« on: February 16, 2026, 12:23:03 PM »
Hi together,

i have installed piCore 16 32-bit on raspberry pi3. Now im trying to play some radiostreams with mpg123.

Here is my command:
Code: [Select]
tc@radiobox:~$ mpg123 "https://liveradio.swr.de/sw282p3/swr3/play.mp3"
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.23.4; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes
[src/libmpg123/readers.c:1182] error: Cannot open file https://liveradio.swr.de/sw282p3/swr3/play.mp3: No such file or directory
main: [src/mpg123.c:731] error: Cannot open https://liveradio.swr.de/sw282p3/swr3/play.mp3: File access error. (code 22)

I get "File access error"

    [Edit]: Added code tags.  Rich
« Last Edit: February 16, 2026, 12:45:06 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12582
Re: mpg123 playing https radiostream
« Reply #1 on: February 16, 2026, 12:45:29 PM »
Hi opa

Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12582
Re: mpg123 playing https radiostream
« Reply #2 on: February 16, 2026, 12:46:02 PM »
Hi opa
Try running it like this:
Code: [Select]
mpg123 "http://liveradio.swr.de/sw282p3/swr3/play.mp3"http instead of https.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12582
Re: mpg123 playing https radiostream
« Reply #3 on: February 16, 2026, 12:53:28 PM »
Hi opa
If you need https, you can try something like this:
Code: [Select]
wget -O - "https://liveradio.swr.de/sw282p3/swr3/play.mp3" | mpg123 -
    [Edit]: Fixed typo.  Rich
« Last Edit: February 16, 2026, 12:56:35 PM by Rich »

Offline opa

  • Newbie
  • *
  • Posts: 2
Re: mpg123 playing https radiostream
« Reply #4 on: February 16, 2026, 12:54:51 PM »
Hello Rich,
thank you for the quick response. Problem solved. Playing http-stream is okay.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 826
Re: mpg123 playing https radiostream
« Reply #5 on: February 16, 2026, 12:56:07 PM »
When it comes to streams from the web I always use ffmpeg its support https, it's supports a lot of codecs.
Works great, but it's little tricky to get it to work with the correct sink, if its HDMI or HEADPHONEJACK on the RPI.

Here my setting for Headphone Jack
Code: [Select]
ffmpeg -loglevel quiet -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 2 -i "$URL" -f alsa default:CARD=Headphones
And here for HDMI.
Code: [Select]
ffmpeg -loglevel quiet -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 2 -i "$URL" -f alsa default:CARD=b1