• 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.

ALSA sound mix problem (Youtube)

Scheduled Pinned Locked Moved Development
2 Posts 1 Posters 921 Views 1 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.
  • ? Offline
    A Former User
    last edited by A Former User Oct 26, 2018, 3:04 PM Oct 26, 2018, 2:45 PM

    I’m not an expert of system admin or *nix machine. So I need a help.

    Maybe it’s not a MM-specific question. Anyway,

    WHAT I WANT… :

    • playing several videos(Youtube) simultaneously in Electron / Chromium of Raspbian (Stretch)
    • I just embedded 2 youtube videos together, then tried to play both by manual.
    • When I play a video alone, it worked well.
    • But when I play 2 videos at the same time, one is not played. And system spits out this error.
    ALSA lib pcm.c:8481:(snd_pcm_set_params) Unable to set hw params for PLAYBACK: Device or resource busy
    

    Is there anyone who experienced this? Or anyone who knows how to solve this? I think it could be related with some Mixer, but I have no idea about ALSA at all.

    UPDATE
    In my research, ALSA dmix is not working properly in Raspbian Stretch (or Jessie)
    pulseaudio could be used for easy mixing, but not be included and not guaranteed to be worked in Raspbian.
    Hmmmm…

    1 Reply Last reply Reply Quote 2
    • ? Offline
      A Former User
      last edited by Oct 29, 2018, 2:53 PM

      UPDATE
      Weird thing.
      in RPI (model 3 B+ / Raspbian Stretch), in getDom() I rendered belows;

      < iframe width="560" height="315" src="https://www.youtube.com/embed/8CdcCD5V-d8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>< /iframe>
      

      This works. but

      < audio src="test.mp3" >
      < iframe width="560" height="315" src="https://www.youtube.com/embed/8CdcCD5V-d8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>< /iframe>
      
      

      This doesn’t work often. but I don’t know why and when.

      When audio tag exists before youtube, 100% failed. When after, sometime worked, sometime didn’t. I suspect Electron(Chromium) on RPI cannot handle multi-sound output.

      I’m rebuilding my MMM-AssistantMk2 more stable, lighter and independent from some annoying dependencies, but I’m stuck on this. I’m even considering to drop youtube features from module if I cannot solve this problem. (But who cares… -_- )

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        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