[SOLVED] Can not play https (not http) audio stream
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to stream internet audio over Bluetooth from CLI of Raspberry Pi to soundbar. For this purpose I use such command:
Code:
mpg123 -b 1024 -a bluealsa:DEV=01:28:6F:AD:B5:4D,PROFILE=a2dp http://stream.rcs.revma.com/ypqt40u0x1zuv
It works properly. But when I try to use https, i got an errors:
Code:
root@NanoPi-NEO:/home/pi/Pobrane# mpg123 -b 1024 -a bluealsa:DEV=01:28:6F:AD:B5:4D,PROFILE=a2dp https://stream.nowyswiat.online/mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.22.4; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
[readers.c:1182] error: Cannot open file https://stream.nowyswiat.online/mp3: No such file or directory
[mpg123.c:634] error: Cannot open https://stream.nowyswiat.online/mp3: File access error. (code 22)
or
Code:
root@NanoPi-NEO:/home/pi/Pobrane# mpg123 -b 1024 -a bluealsa:DEV=01:28:6F:AD:B5:4D,PROFILE=a2dp -@ https://stream.nowyswiat.online/mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.22.4; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
https://stream.nowyswiat.online/mp3: No such file or directory
So, how can I proper stream https stream?
My RPi does not have video chip (nano version), so only CLI is avaliable.
mpg123 test.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.25.13; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Directory: ***
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: test.mp3 ...
MPEG 1.0 L III cbr128 44100 j-s
[0:14] Decoding of test.mp3 finished.
Yes, its correct if You want to play/stream to on-board audio chip. Nano Pi has one. But my goal is to play on Bluetooth soundbar. So it is necessary to redirect output to another device that is Bluetooth, like in the command "mpg123". Is it possible in case mpv or ffmpeg? I dont see such option (or maybe I miss something). Have You any idea?
Yes, its correct if You want to play/stream to on-board audio chip. Nano Pi has one. But my goal is to play on Bluetooth soundbar. So it is necessary to redirect output to another device that is Bluetooth, like in the command "mpg123". Is it possible in case mpv or ffmpeg? I dont see such option (or maybe I miss something). Have You any idea?
Are you saying mpg123 can play HTTPS, but cannot if you use bluetooth for output?
And mpg123 can play HTTP, also with bluetooth output?
Are you saying mpg123 can play HTTPS, but cannot if you use bluetooth for output?
No. mpg123 can play http over Bluetooth. It works for me very fine. But I can not play htpps using mpg123. Does not matter via on-board audio chip or Bluetooth. ffmpeg and mpv can play but I dont know how to redirect output to Bluetooth.
Quote:
And mpg123 can play HTTP, also with bluetooth output?
Seems that is the core of your problem and it has nothing to do with bluetooth.
"HTTP" is mentioned often, but the term "HTTPS" is conspicuously missing from mpg123's man page. There might be ways around that limitation, see "HTTP SUPPORT".
1 - mpg123 can play only http and it is possible to specify deviye to play on (-D option)
2 - ffmpeg and mpv can play https but I don know how to redirect output do another device. Does not matter Bluetooth or for example second sound card (like USB dongle)
The redirection or specifying device in command line in case of ffmpeg or mpv is my issue. And probably too little knowledge :-(
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.