MediaTunnel

Live audio and video without tears, from Muxable Labs

MediaTunnel lets you publish media easily from any source. For example, try publishing your browser's media.

            
import MediaTunnel from '@muxable/mtun';

...

const stream = await window.navigator.getUserMedia();
// use this id anywhere to play the media.
const id = await new MediaTunnel().publish(stream);
            
        
Run

Stream ID:


Then take that stream id and play it below.

            
import MediaTunnel from '@muxable/mtun';

...

const stream = await new MediaTunnel().play(id);
// a convenience function to make playing a media stream easier.
await MediaTunnel.attach(document.getElementById('video'), stream);
            
        

Stream ID:

Play

Not convinced? That's okay, we're tough critics too. Try publishing from ffmpeg instead.

          
$ ffmpeg -r 30 -f lavfi -i testsrc -f lavfi -i sine=f=440:b=4 -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -acodec aac -f flv rtmp://mtun.io/live/stream-id
          
        

And you'll be able to consume that stream above too. And if you're really not convinced, then try publishing your camera and microphone and consuming rtmp://mtun.io/live/<stream id>.

Plans

You take care of the video, we'll take care of the transport.