Tom-Hirschberger / MMM-MplayerRadio

An MagicMirror² module which playes m3u radio playlists with MPlayer and supports various stations to rotate through
MIT License
7 stars 0 forks source link

No audio through MagicMirror #7

Closed 3sclsn closed 3 years ago

3sclsn commented 3 years ago

Hi Sir, very interesting module, however I don't hear any sound when using the Magic Mirror module. When I press 'play', I can see that the link is opening and I receive information, like artist and title, but I cannot hear anything. There is no problem when I play the same streaming link using f.i. VLC, or Mplayer using the command line. I changed the asound.conf file as suggested in the readme. Can you please help? All the best, Dries

Tom-Hirschberger commented 3 years ago

Hi,

great if you like the module. Can you provide some more information about your system. Are you using Raspberry OS? Which version? What kind of audio system (Pulse, Alsa, Unknown)? How are your speakers connected? How do you connect to the Pi (Pulse is controlled by Environment variables which are sometimes overridden during SSH login)? When you started the mplayer on the shell did you do it directly on the pi or via ssh?

Greats Thomad

3sclsn commented 3 years ago

Hi, thanks for your answer. I have a 13.3 inch Magic Mirror with embedded Raspberry Pi 3A+. I’m using Raspberry Pi OS, version 10. It has embedded speakers and microphone, using a WM8960 sound card. The audio system is alsa. I’m booting to the Raspbian Pi desktop. When I choose the built-in the VLC Media Player (using the graphical userinterface) and play an audio stream, I can hear the sound coming from both the built-in speakers as the speakers connected to the 3.5 mm audio jack. The same is true when I open a terminal window and execute the command “mplayer link-to-audio-stream”. All the best, Dries

Op 6 jan. 2021, om 19:02 heeft Thomas Hirschberger notifications@github.com<mailto:notifications@github.com> het volgende geschreven:

Hi,

great if you like the module. Can you provide some more information about your system. Are you using Raspberry OS? Which version? What kind of audio system (Pulse, Alsa, Unknown)? How are your speakers connected? How do you connect to the Pi (Pulse is controlled by Environment variables which are sometimes overridden during SSH login)? When you started the mplayer on the shell did you do it directly on the pi or via ssh?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-755462080, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CQIJSSW5EOYTMWF5CDQLSYSQS3ANCNFSM4VX3GHWA.

Tom-Hirschberger commented 3 years ago

Hi,

your welcome. There is commandline tool called "alsamixer" which can be used to control the alsa subsystem (volume control and so on). Can you play the stream with the mirror, minimize the MagicMirror-Software (CTRL+m) or connect via ssh and run the tool with "sudo alsamixer". It is controlled with the arrow and FN keys. Maybe the sound is send to a channel that is muted at the moment.

I found an instruction on how to set your soundcard as default https://www.waveshare.com/w/upload/5/54/WM8960_Audio_HAT_User_Manual_EN.pdf

Maybe it is only the numbering (because you have both the onboard and the soundcard enabled). So you can try to change the asound.conf to:

    pcm.!default  {
        type hw card 1
    }
    ctl.!default {
        type hw card 1
    }
3sclsn commented 3 years ago

Hi Sir, thanks again. Unfortunately, it didn’t work. I checked alsamixer, but there is still no sound playing from the MagicMirror. I also followed the instructions to set my sound card as default, but without success.

Op 6 jan. 2021, om 19:53 heeft Thomas Hirschberger notifications@github.com<mailto:notifications@github.com> het volgende geschreven:

Hi,

your welcome. There is commandline tool called "alsamixer" which can be used to control the alsa subsystem (volume control and so on). Can you play the stream with the mirror, minimize the MagicMirror-Software (CTRL+m) or connect via ssh and run the tool with "sudo alsamixer". It is controlled with the arrow and FN keys. Maybe the sound is send to a channel that is muted at the moment.

I found an instruction on how to set your soundcard as default https://www.waveshare.com/w/upload/5/54/WM8960_Audio_HAT_User_Manual_EN.pdf

Maybe it is only the numbering (because you have both the onboard and the soundcard enabled). So you can try to change the asound.conf to:

pcm.!default  {
    type hw card 1
}
ctl.!default {
    type hw card 1
}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-755513625, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CQIIAV2UHBW3WZDQUTJ3SYSWUJANCNFSM4VX3GHWA.

Tom-Hirschberger commented 3 years ago

Hi,

currently i do not know any other thing which might be the problem. Can you please change to the Development Console of MagicMirror (CTRL+Shit+i) and check the console if there are any error messages?

Tom-Hirschberger commented 3 years ago

Hi, you may also follow an instruction like this one to disable the on board sound card: https://superuser.com/questions/989385/how-to-make-raspberry-pi-use-an-external-usb-sound-card-as-a-default

3sclsn commented 3 years ago

Hi, the development console gives two warnings about “Electron security warning”. Can this be an issue? I added a screen print in attachment.

[cid:5826ACB6-28E1-44B4-AB20-9C951CD0CBB1]

Op 9 jan. 2021, om 21:45 heeft Thomas Hirschberger notifications@github.com<mailto:notifications@github.com> het volgende geschreven:

Hi, you may also follow an instruction like this one to disable the on board sound card: https://superuser.com/questions/989385/how-to-make-raspberry-pi-use-an-external-usb-sound-card-as-a-default

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-757364695, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CQIJVWR74UI2SQNAQ4M3SZC55JANCNFSM4VX3GHWA.

Tom-Hirschberger commented 3 years ago

Sorry, but i can't find any attachment. Some security warnings of electron are normal during startup. If there is a problem with the audio output there are errors instead.

Majerhofer commented 3 years ago

I have a similar problem. No sound. But I have speakers over usb. Sound works via http://www.surfmusik.de. It worked for about two months. Thanks for the reply.

Tom-Hirschberger commented 3 years ago

Hi, do you mean it worked with the module and now it doesn't? There have been a lot of changes on the soundsystem of Raspberry OS. I use an Hifiberry Amp which is connected to the Pi via GPIO and Bluetooth works well, too.

Does it work if you call mplayer on the shell?

Majerhofer commented 3 years ago

Yess mplayer works!

Tom-Hirschberger commented 3 years ago

Did you install any system updates during the first of December and now?

Majerhofer commented 3 years ago

No i hawe no update instal!

V pon., 25. jan. 2021 14:26 je oseba Thomas Hirschberger < notifications@github.com> napisala:

Did you install any system updates during the first of December and now?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-766814398, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTMS3MSGRXJEF5NESWTS3VWPRANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

So you did not change anything but the module stopped working. That's crazy. Currently I do not have an idea where to start. I do not have any usb sound card which I can test.

Tom-Hirschberger commented 3 years ago

Did you change to a different monitor which has speakers integrated and causes the system to route the sound via Hdmi, maybe?

Majerhofer commented 3 years ago

I did not make any change. Can you test if it works for you? The station "radio city" Evropa-Slovenija

V pon., 25. jan. 2021 15:10 je oseba Thomas Hirschberger < notifications@github.com> napisala:

Did you change to a different monitor which has speakers integrated and causes the system to route the sound via Hdmi, maybe?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-766841780, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTPXB5UGHUI7YYXW3ITS3V3VRANCNFSM4VX3GHWA .

matze6486 commented 3 years ago

I've got the same problem -> The Mirror displays the stations, but there is no audio output

I use an pi 4 with an Samsung TV connected via HDMI. Sound via youtube or AirPlayMirror works. I installed the module like you described and i use the same config (+ autoplay), but htere is no audio output.

If i try to open "http://www.surfmusik.de/m3u/antenne-bayern,922.m3u" in my browser in works fine by opening through VLC. But if i want to start mplayer in terminal with this url, the terminals shows:

$ mplayer http://www.surfmusik.de/m3u/antenne-bayern,922.m3u

MPlayer 1.3.0 (Debian), built with gcc-8 (C) 2000-2016 MPlayer Team do_connect: could not connect to socket connect: No such file or directory Failed to open LIRC support. You will not be able to use your remote control.

Playing http://www.surfmusik.de/m3u/antenne-bayern,922.m3u. Resolving www.surfmusik.de for AF_INET6... Connecting to server www.surfmusik.de[2001:8d8:880:f800::51:c13e]: 80...

Unsupported http 301 redirect to https protocol STREAM_ASF, URL: http://www.surfmusik.de/m3u/antenne-bayern,922.m3u Resolving www.surfmusik.de for AF_INET6... Connecting to server www.surfmusik.de[2001:8d8:880:f800::51:c13e]: 80...

Server returned 301:Moved Permanently Failed to parse header. Failed, exiting. Resolving www.surfmusik.de for AF_INET6... Connecting to server www.surfmusik.de[2001:8d8:880:f800::51:c13e]: 80...

Unsupported http 301 redirect to https protocol No stream found to handle url http://www.surfmusik.de/m3u/antenne-bayern,922.m3u

Exiting... (End of file)

DirkM22 commented 3 years ago

Hello,

I have the same problem. It works for some months and then since ~begin of january it no longer works. I even changed my sound card to a new one (same type and also other new type), install new OS and MM on new PI and new SD. But nothing... Then I rede this issue here :-(. To late for my effort. Never mind... Do we have any way to fix it? The module is really great and I can't find a better one. I have been thinking about what changed in January but I found only a new OS version (2021-01-11). I can't remember if I installed it. But it could have happened... Since th OS version from 2020-12-02 PulseAudio is default instead of ALSA and at OS from 2021-01-11 many sound points are included in the release notes. Can it be related to this?? I hope we find a solution. Many thanks!

Dirk

Tom-Hirschberger commented 3 years ago

Hi,

@matze6486 I think your problem is different from the others. Looks like the link of your radio station changed. An other user had the same problem recently with a link of surfmusik and could fix it by searching for a different stream of the same station. Maybe you can try this, too.

There are two things that changed since the last year. As @DirkM22 wrote the main audio system of Raspberry OS has been changed from ALSA to PulseAudio and the new MagicMirror versions do contain a lot of library updates (especially electron). I use the newest version of MagicMirror with the newest version of Raspberry OS. There are some graphical tools to configure PulseAudio. Maybe you can install them and check that the USB sound card is configured as default one.

matze6486 commented 3 years ago

I think The link must be ok. When i Open the link in the Browser it opens the Station via VLC Player but i‘ll try it in the evening with another Station.

Tom-Hirschberger commented 3 years ago

Hi, if you have installed vlc you may want to try to let the module call cvlc (vlc without graphical interface) with a custom command:

{
            module: "MMM-MplayerRadio",
            header: "Radio",
            position: "top_center",
            config: {
                customCommand: "/usr/bin/cvlc",
                customCommandArgs: ["###URL###"],
                stations: [
                    {
                        title: "Antenne.de",
                        url: "http://www.surfmusik.de/m3u/antenne-bayern,922.m3u",
                        logo: "https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png",
                        profiles: "pageTwoSpotify pageTwoRadio pageTwoRadioTom pageOneEveryone pageOneTom pageThreeEveryone pageThreeTom pageFiveEveryone pageFourSyno"
                    },
                ],
            },
        },
DirkM22 commented 3 years ago

Hello Tom, I have check this with "pavucontrol". I see 3 options, my soundcard (iqaudio, amp, internal), hdmi and other one. The other booth can be dissable or better are dissable. I can change the volume and so on. It works fine with sound from browser (youtube) but not more mith the Mirror. Today I have install OS again (current version), MagicMirror and MPlayer newest version (1.4). Not more. But the same issue... Sound via browser works fine, via MM no sound. On your installation it work?

Thx... Dirk

robferrero commented 3 years ago

(my two cents: the no audio output problem happens also to me and also on a my old backupped version that I write on an SD for a speedy test.. strange.. I have a Google AIY kit v1 and follow this interesting 3D. Bye)

robferrero commented 3 years ago

(and with you your config test lines and custom Command: "/usr/bin/cvlc", for me works)

Tom-Hirschberger commented 3 years ago

Hi, that is interesting. Maybe mplayer tries to use alsa for some reason. Can you try this custom command which uses mplayer but give a higher priority to pulse, please

        {
            module: "MMM-MplayerRadio",
            header: "Radio",
            position: "top_center",
            config: {
                customCommand: "/usr/bin/mplayer",
                customCommandArgs: ["-ao", "pulse,", "-playlist", "###URL###"],
                stations: [
                    {
                        title: "Antenne.de",
                        url: "http://www.surfmusik.de/m3u/antenne-bayern,922.m3u",
                        logo: "https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png",
                    },
                ],
            },
        },
matze6486 commented 3 years ago

I tested both solutions. First of all i checked the link of "rockantenne". The only thing what was different was that it is now a "https" link, but as i said, the vlc plays the original stream, so this wasn't the solution.

But with: customCommand: "/usr/bin/cvlc", customCommandArgs: ["###URL###"], it works! Thx a lot!

Next issue is that, if i stop MM, the stream does not stop. I start the stream with autoplay, but there is no "automatic stop" by closing down the mirror. I think the only solution would be to implent a remote like MMM-keybindings or MMM-ModuleScheduler?

robferrero commented 3 years ago

about test with customCommand: "/usr/bin/mplayer", customCommandArgs: ["-ao", "pulse,", "-playlist", "###URL###"],

it still dosn't works

Tom-Hirschberger commented 3 years ago

I get a lot of problems while testing the different options of the mplayer at the moment. Maybe the best solution is to use vlc at the moment. The only disadvantage is that no stream information is provided by the module. @matze6486 In my case the sub-process which got started will be killed the moment i stop MagicMirror (using pm2 stop MagicMirror) and the radio stops as well. Maybe you would call vlc directly with the correct option instead of calling the cvlc wrapper (which actually calls vlc with -I dummy option). The config then will be:

                customCommand: "/usr/bin/vlc",
                customCommandArgs: ["-I","dummy","###URL###"],
Majerhofer commented 3 years ago

Wher to add this option?

V sob., 30. jan. 2021 21:34 je oseba Thomas Hirschberger < notifications@github.com> napisala:

I get a lot of problems while testing the different options of the mplayer at the moment. Maybe to the best solution is to use vlc at the moment. The only disadvantage is that no stream information is provided by the module. @matze6486 https://github.com/matze6486 In my case the sub-process which got started will be killed the moment i stop MagicMirror (using pm2 stop MagicMirror) and the radio stops as well. Maybe you would call vlc directly with the correct option instead of calling the cvlc wrapper (which actually calls vlc with -I dummy option). The config then will be:

          customCommand: "/usr/bin/vlc",
          customCommandArgs: ["-I","dummy","###URL###"],

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770276651, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTKU5UH3FH4LYHTWSSLS4RULPANCNFSM4VX3GHWA .

Majerhofer commented 3 years ago

module: "MMM-MplayerRadio", header: "Radio", position: "top_center", config: { customCommand: "/usr/bin/vlc", customCommandArgs: ["-I","dummy","###URL###"], //autoplay: 0, stations: [ { title: "Aktual", url: "https://radioaktual.si/live/onair1", logo: " https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png ", }, { title: "city", url: "http://www.surfmusik.de/m3u/radio-city,13798.m3u", logo: " https://upload.wikimedia.org/wikipedia/de/thumb/d/d3/Bayern_3.svg/200px-Bayern_3.svg.png ", }, { title: "Maribor", url: "http://www.surfmusik.de/m3u/radio-maribor,2087.m3u", logo: " https://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Rock_Antenne_Logo_2017.svg/200px-Rock_Antenne_Logo_2017.svg.png ", mplayerCache: 2048, }, { title: "center", url: "https://www.surfmusik.de/m3u/hitradio-center,19482.m3u", logo: " https://upload.wikimedia.org/wikipedia/commons/7/78/Radio_Gong_96.3_Logo.png ", } ], displayStationsOnStartup: true }, },

V ned., 31. jan. 2021 13:08 je oseba Rajko Majerhofer < rajko.majerhofer@gmail.com> napisala:

Wher to add this option?

V sob., 30. jan. 2021 21:34 je oseba Thomas Hirschberger < notifications@github.com> napisala:

I get a lot of problems while testing the different options of the mplayer at the moment. Maybe to the best solution is to use vlc at the moment. The only disadvantage is that no stream information is provided by the module. @matze6486 https://github.com/matze6486 In my case the sub-process which got started will be killed the moment i stop MagicMirror (using pm2 stop MagicMirror) and the radio stops as well. Maybe you would call vlc directly with the correct option instead of calling the cvlc wrapper (which actually calls vlc with -I dummy option). The config then will be:

         customCommand: "/usr/bin/vlc",
         customCommandArgs: ["-I","dummy","###URL###"],

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770276651, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTKU5UH3FH4LYHTWSSLS4RULPANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

Hi, looks ok to me. Did it work this way?

Majerhofer commented 3 years ago

No. No sound.

V ned., 31. jan. 2021 16:57 je oseba Thomas Hirschberger < notifications@github.com> napisala:

Hi, looks ok to me. Did it work this way?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770403737, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTOEMB3QX643FTYP5ZDS4V4U7ANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

@Majerhofer Did you check if vlc is installed? If there is an output like "Command vlc not found" if you call

  /usr/bin/vlc -h

please install vlc with this command:

  sudo apt -y update && sudo apt -y install vlc
Majerhofer commented 3 years ago

pi@raspberrypi:~ $ /usr/bin/vlc -h VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)

V ned., 31. jan. 2021 17:04 je oseba Thomas Hirschberger < notifications@github.com> napisala:

@Majerhofer https://github.com/Majerhofer Did you check if vlc is installed? If there is an output like "Command vlc not found" if you call

/usr/bin/vlc -h

please install vlc with this command:

sudo apt -y update && sudo apt -y install vlc

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770404803, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTIIKU6SHL5DWLZLM3DS4V5PPANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

@Majerhofer Do you have sound if you run vlc on the console? i.e.

  /usr/bin/vlc -I dummy http://www.surfmusik.de/m3u/radio-maribor,2087.m3u
Majerhofer commented 3 years ago

Yes thanks. Its work.

V ned., 31. jan. 2021 17:53 je oseba Thomas Hirschberger < notifications@github.com> napisala:

@Majerhofer https://github.com/Majerhofer Do you have sound if you run vlc on the console? i.e.

/usr/bin/vlc -I dummy http://www.surfmusik.de/m3u/radio-maribor,2087.m3u

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770412416, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTKZKILLWP7ZZ2K6FMLS4WDJFANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

@Majerhofer Sorry, but does it work in the mirror or on the console?

Majerhofer commented 3 years ago

Works in mirror

V ned., 31. jan. 2021 18:08 je oseba Thomas Hirschberger < notifications@github.com> napisala:

@Majerhofer https://github.com/Majerhofer Sorry, but does it work in the mirror or on the console?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770414734, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTIH3WHNTYXNV4DU2KDS4WFB7ANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

Perfect. So as i can see everbody except @3sclsn is able to play stations in the mirror with the custom command now. I already worked on a complete (optical) redesign of the module in a branch of the repository. Currently i am unsure if i will merge this big changes (Flexbox design instead of a table with scroll support) to the main branch or create a new module which uses vlc instead of mplayer in default. I will at least add an information about the mplayer problems and the vlc option to the readme the next days.

Majerhofer commented 3 years ago

Information doesn’t work!

V ned., 31. jan. 2021 18:15 je oseba Thomas Hirschberger < notifications@github.com> napisala:

Perfect. So as i can see everbody except @3sclsn https://github.com/3sclsn now is able to play stations in the mirror with the custom command. I already worked on a complete (optical) redesign of the module in a branch of the repository. Currently i am unsure if i will merge this big changes (Flexbox design instead of a table with scoll support) to the main branch or create a new module which uses vlc instead of mplayer in default.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Tom-Hirschberger/MMM-MplayerRadio/issues/7#issuecomment-770415755, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHLKTJJVULJZ5D2Q5GRJ2LS4WF3FANCNFSM4VX3GHWA .

Tom-Hirschberger commented 3 years ago

@Majerhofer As I mentioned above vlc does not provide any stream information neither does xmms2. The only player I know that provides stream info is mplayer.

DirkM22 commented 3 years ago

Hello Tom,

for me it works also with VLC integration. Yes, no information from station - but better then no sound. :-) Thanks a lot..

Dirk

G-Christ commented 3 years ago

Dear @Tom-Hirschberger,

Thanks for this great MM module!

I am experiencing an issues but I am uncertain whether it is related to the one here, or should be created as a new one.

what I am experiencing is that some of my URLs do work with VLC if used as CustomCommand but not with the default mplayer. In this case no audio output and no streaming info is displayed.

Actually none of the URLs from your configuration example or others I find on surfmusik.de such as "https://www.surfmusik.de/m3u/pop-fm-on-radio-play,17428.m3u" work with mplayer, but work fine with VLC

Other URLs such as "http://live-icy.dr.dk/A/A05H.mp3.m3u" work with both mplayer and VLC.

Could it be the URL format or any configuration is needed to get it working with mplayer?

I hope you can help me identify the reason for this issue, and whether there is a solution.

Please let men know f you need any logs or other details.

Thanks, Ghassan

Tom-Hirschberger commented 3 years ago

@G-Christ Hi,great if you like my module. Did not know that this much people are using it. I think the problem is related. If you play the urls on the shell with mplayer there will be the same redirect errors as mentioned some posts above. It looks like surfmusik (and maybe some other providers) implemented https and redirect all http to the crypted version now. Mplayer isn't able to handle theses redirects an does not play the stations. The problem is that I can't fix neither the problem of the initial post nor your problem can be fixed in the module. Hopefully the mplayer team will fix them and an updated version will be provided. As long as there is no update using vlc will be the only solution.

G-Christ commented 3 years ago

@G-Christ Hi,great if you like my module. Did not know that this much people are using it. I think the problem is related. If you play the urls on the shell with mplayer there will be the same redirect errors as mentioned some posts above. It looks like surfmusik (and maybe some other providers) implemented https and redirect all http to the crypted version now. Mplayer isn't able to handle theses redirects an does not play the stations. The problem is that I can't fix neither the problem of the initial post nor your problem can be fixed in the module. Hopefully the mplayer team will fix them and an updated version will be provided. As long as there is no update using vlc will be the only solution.

Hi @Tom-Hirschberger , Correct, looks like there is an issue with redirects from Surfmusik but this is not the whole story.

for example i downloaded the URL file: https://www.surfmusik.de/m3u/pop-fm-on-radio-play,17428.m3u and inside It I found the redirection addresse which is "http://stream.popfm.dk/pop128"

Now I tried to "MPlayer http://stream.popfm.dk/pop128" from the shell consol and it streamed perfectly Then I put this url in the configuration of your module, but unfortunately, this still don't work

Could you please examine this further?

/Thanks

Tom-Hirschberger commented 3 years ago

@G-Christ The module expects a Playlist but gets an stream url. You can try the following custom command:

customCommand: "/usr/bin/mplayer", customCommandArgs: ["-msglevel", "all=4", "###URL###"],

I can not guarantee that it will work but if it does you will get stream info as well.

G-Christ commented 3 years ago

ustomCommand: "/usr/bin/mplayer", customCommandArgs: ["-msglevel", "all=4", "###URL###"],

Hi @Tom-Hirschberger, I works, thanks for your quick help ;)

Tom-Hirschberger commented 3 years ago

Finally i added an hint to the documentation that there are a lot of problems with mplayer at the moment and that i suggest to switch to vlc instead. I added an configuration example, too. I will close this issue because there is nothing i can change in the module code that will avoid these problems. As i mentioned above i think about a new module which uses the code in the redesign branch but with vlc instead of mplayer.