• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-MplayerRadio

Scheduled Pinned Locked Moved Entertainment
46 Posts 7 Posters 11.8k Views 8 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    wishmaster270 Module Developer
    last edited by wishmaster270 Nov 5, 2023, 6:32 PM Apr 12, 2020, 3:33 PM

    Description:

    I use an HifiBerry DAC+ on my mirror to play Spotify and Radio.
    The aim of this module is to provide a simple mechanism to play online radios on the mirror and switch between different stations.
    Because my wife and i like different stations i added profile support as well.
    The module can be controlled either by notifications or touch.
    It uses the Raspian “mplayer” to play “m3u” playlist files my favorite webpage of online radios (http://www.surfmusik.de/) provides. But you can use any m3u file you like.

    Download:

    MMM-MplayerRadio
    [card:Tom-Hirschberger/MMM-MplayerRadio]


    Version 0.1.3

    • the vlcWrapper.bash and vlcPaWrapper.bash scripts now stop vlc with a kill followed by a kill -9 after one second delay. The processes did not stop with the current versions of vlc otherwise.

    Version 0.1.2

    • the streamlink wrapper supports additional custom arguments like the vlc wrappers now

    Version 0.1.1

    • the vlcWrapper.bash and vlcPaWrapper.bash now support a variable count of custom options that can be added after the stream url. The options will be added directly to the vlc command line i.e. to disable certificate verification.

    Version 0.1.0

    • it is possible to display the current stream information if vlc is used now. Use the provided vlcWrapper.bash script to start vlc with the options needed.
    • modified the vlcPaWrapper.bash script to use the additional options needed to start vlc with enabled stream information support.
    • updated the options and URLs in the readme

    Version 0.0.14

    • added a new wrapper called vlcPaWrapper.bash which uses vlc to play a stream but sets the audio of vlc with pa_volume to a configurable value before

    Version 0.0.13

    • The module now waits for the old process to stop before it starts the new one during station changes which is essential for the xmms2 and HiFiBerryOS wrapper.
    • During a station change the module does not signal a stop of the old station and the start of the new station but only the station change to the frontend now. This is to reduce flickering.
    • The wrapper of HiFiBerryOS is now more robust if the station gets changed or if the playback gets stopped at the HiFiBerryOS interface

    Version 0.0.12

    • fixed wrong state (playing/stopped) if customCommand is used and the wrapper/program stops

    Version 0.0.11

    • All CSS classes are prefixed with the module name now
    • A new wrapper script is included to control a remote HiFiBerryOS instance via ssh

    Version 0.0.10

    • added a new wrapper script (streamlinkWrapper.bash) which can be used to play streams that do not send continuously

    Version 0.0.9

    This now Version 0.0.9 provides:

    • fixed the stations not being stopped if the module gets stopped (i.e. if the mirror gets stopped)

    Version 0.0.8

    This new Version 0.0.8 provides:

    • Fixed a bug which caused the module to ignore the initStation parameter at the first RADIO_PLAY notification

    Version 0.0.7

    This new Version 0.0.7 provides:

    • Fixed a bug which caused the module to be not loaded if only one station is used

    Version 0.0.6

    This new Version 0.0.6 provides:

    • the stations now get displayed correctly if scroll is disabled and there are less stations than needed (count of stations before the current station, the current station and the count of stations to display after)

    Version 0.0.5

    This new Version 0.0.5 provides:

    • The module got a total redesign. Instead of old styling with a table a new flexbox layout is used which makes it possible to do a lot more customization via css.
    • There is a new option which can be used to display more than one station before and after the currently active one.
    • There is a new option to enable scrolling (if active all stations will be displayed in a scrollable container).
    • If scrolling is active a new option can be enabled to focus the currently active station even if it has been changed by notification.
    • The streamInfo line can be hidden with a config option new.
    • The initial state feature (yellow radio instead of stations) has been removed.

    As there are a lot of problems with mplayer at the moment i strongly suggest to use the customCommand feature to play the stations with vlc. See the readme for details!

    Version 0.0.4

    • The flickering has been reduced massively.

    Version 0.0.3

    • it is possible to configure a custom script to play the stations. This way it is possible to use in example xmms2 instead of mplayer
    • added an autoplay feature. Simply add the index of the station you want to start automatically after the module started to the new config option “autoplay”. The index starts with 0.
    • reduced the flickering caused by station and profile changes

    Version 0.0.2

    • added buttons to increase/decrease the volume (send notification to MMM-Volume)

    Version 0.0.1

    The initial release provides the following features

    • Using multiple stations and add an logo for each one
    • The stations can be switched by notification or touch
    • Stations either can have no profile (valid for all profiles) or an profile string

    Screenshots

    E 1 Reply Last reply Apr 29, 2020, 10:07 AM Reply Quote 2
    • O Offline
      omoioli
      last edited by Apr 20, 2020, 12:21 PM

      Your module looks very great, smith notification and profil change ! Can you re-upload the pictures to see it ?

      W 1 Reply Last reply Apr 20, 2020, 12:37 PM Reply Quote 0
      • W Offline
        wishmaster270 Module Developer @omoioli
        last edited by Apr 20, 2020, 12:37 PM

        @omoioli
        Hi, great if you like it.
        What exactly do you mean. Currently there are a lot of problems with the forum. Are the screenshots not visible or do you like to have an different one?

        O 1 Reply Last reply Apr 20, 2020, 2:30 PM Reply Quote 0
        • O Offline
          omoioli @wishmaster270
          last edited by Apr 20, 2020, 2:30 PM

          @wishmaster270 yes, screenshoots were not visible, but now, it’s good … may be a bug…

          1 Reply Last reply Reply Quote 0
          • E Offline
            electros Project Sponsor @wishmaster270
            last edited by Apr 29, 2020, 10:07 AM

            @wishmaster270 Wow this looks great, I like it. But can i have a request please?
            Can you try to make a version with xmms2 player ?. I want to use this to listening aacp or mp3 radio stream and mplayer is so slowly I push button to start and he start playing radio after nearly one minute. And if you can implement a volume graph and volume control will be great.
            Thank you.

            1 Reply Last reply Reply Quote 0
            • W Offline
              wishmaster270 Module Developer
              last edited by Apr 29, 2020, 1:05 PM

              Hi,

              normally mplayer is very fast. Can you try to reduce the caching with the “mplayerCache” option either for one station or globally for all. The default value is 512 and may be a little high.

              There already exists an module to control the volume MMM-Volume which i use in my setup.

              E 1 Reply Last reply Apr 29, 2020, 1:53 PM Reply Quote 0
              • E Offline
                electros Project Sponsor @wishmaster270
                last edited by Apr 29, 2020, 1:53 PM

                @wishmaster270 ok i will try to modify caching to see what happend.
                And about the volume yes i know that module but i have a touchscreen and can be better if i have a buttons for volume in same module from where i start listening.

                W 1 Reply Last reply Apr 29, 2020, 2:00 PM Reply Quote 0
                • W Offline
                  wishmaster270 Module Developer @electros
                  last edited by Apr 29, 2020, 2:00 PM

                  @electros I will check if I can include two control buttons to increase/decrease the volume by sending notifications to MMM-Volume.

                  E 1 Reply Last reply Apr 29, 2020, 2:08 PM Reply Quote 0
                  • E Offline
                    electros Project Sponsor @wishmaster270
                    last edited by Apr 29, 2020, 2:08 PM

                    @wishmaster270 Thank you, and about the caching nothing change with that. here is one of the link http://www.surfmusik.de/m3u/magicfm,14949.m3u can you try please maybe i doing something wrong

                    1 Reply Last reply Reply Quote 0
                    • W Offline
                      wishmaster270 Module Developer
                      last edited by Apr 29, 2020, 3:03 PM

                      I tried this link on the command line:
                      mplayer -cache 256 -playlist http://www.surfmusik.de/m3u/magicfm,14949.m3u

                      Mplayer complains that the station is to slow. It doesn’t even start playing in my case.
                      It looks like mplayer has some known problems with aac.

                      But you are right. If i use xmms2 it works.
                      The problem is, that xmms2 uses a totally different interface.

                      But also some good news. I released a new version 0.0.2 which adds two volume buttons.

                      E 1 Reply Last reply Apr 29, 2020, 3:13 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 1 / 5
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy