Skip to content

Instantly share code, notes, and snippets.

@guest271314
Created February 15, 2021 15:27
Show Gist options
  • Save guest271314/551776848895d972c9cbb8563a2acde5 to your computer and use it in GitHub Desktop.
Save guest271314/551776848895d972c9cbb8563a2acde5 to your computer and use it in GitHub Desktop.
Test infinite Opus stream
audio.src = './stream';
  event.respondWith(fetch('index.php?start=true')
<?php 
  if (isset($_GET["start"])) {
    header("Access-Control-Allow-Origin: *");
    header("Content-Type: audio/x-opus+ogg");
    echo passthru("parec -v --raw --rate=48000 -d <device> | opusenc --expect-loss=25 --max-delay=0 --framesize=2.5 --bitrate=256 --raw - -");
    exit();
  }
@guest271314
Copy link
Author

9 hours

Screenshot_2021-02-15_15-27-55

@guest271314
Copy link
Author

Screenshot_2021-02-15_15-28-47

@guest271314
Copy link
Author

18 hours, 59 minutes, 55 seconds

Screenshot_2021-02-16_02-28-31

@guest271314
Copy link
Author

MediaRecorder => ReadableStream => FetchEvent.responsdWith()

https://plnkr.co/plunk/bK1BfoSgjFUDwkIV

Screenshot_2021-02-20_07-36-50
Screenshot_2021-02-20_15-04-05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment