Playing Youtube streams via NodeJS


    Apr 20 2020 | 3:12 pm
    Hi Forum,
    I'm working on a patch to play Youtube streams in jit.movie~ via NodeJS and the ytdl package. It is *almost* working. The patch can play standard Youtube videos, with MSP audio, which was very promising. For live streams it can play the video - but no sound. Also it seems to loop the first several seconds of the video rather than allow it to continuously play.
    Curiously if one opens the file that the patch downloads in VLC it can play live streams perfectly, with sound. I've experimented with downloading live streams into different "container" types (flv, mp4, webm, etc) - while most of these will play (with sound) in VLC, I just can't get sound working in Max. But standard youtube videos will play fine, with MSP audio.
    Any thoughts on how to get sound working with live streams? Seems like an excellent potential source of multimedia antics in this age of copious live streaming...
    Patch with the .js and .json's are in the linked zip. Click "script npm install" the first time to install ytdl-core.

    • May 22 2020 | 7:22 pm
      +1
    • May 22 2020 | 7:48 pm
      cool patch, I missed this the first time around! it looks like it's just jit.movie~ that's struggling, jit.movie seems to play the audio fine. i'll see if I can figure out why jit.movie~ is unhappy.
    • May 24 2020 | 3:49 am
      :)