最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to stream video from my WebRTC to Facebook RTMP server directly? - Stack Overflow

programmeradmin3浏览0评论

I'm trying to develop a web application with WebRTC and I'm getting video from my webcam through WebRTC and I want to do live streaming on Facebook and YouTube with my browser I have searched python and node js libraries but I haven't find any library for that. I want to build an application like streamyard. I have watched ffmpeg

I'm trying to develop a web application with WebRTC and I'm getting video from my webcam through WebRTC and I want to do live streaming on Facebook and YouTube with my browser I have searched python and node js libraries but I haven't find any library for that. I want to build an application like streamyard.. I have watched ffmpeg

Share Improve this question edited Apr 3, 2020 at 2:34 Penny Liu 17.6k5 gold badges86 silver badges108 bronze badges asked Apr 3, 2020 at 0:55 Ali MuhammadAli Muhammad 1592 silver badges11 bronze badges 2
  • 1 Since WebRTC and RTMP are different protocols, you can't do it directly. – Jaromanda X Commented Apr 3, 2020 at 0:59
  • Duplicated to stackoverflow./questions/56238148/… – Winlin Commented Mar 8, 2023 at 10:47
Add a ment  | 

1 Answer 1

Reset to default 8

You can do this using Pion WebRTC and ffmpeg!

I have created a demo here. If you have ffmpeg installed and the Go piler this should just work!

This takes audio/video from the browser, and then constructs a webm in memory. It then passes this WebM to ffmpeg via a stdin pipe, which then is transcode and sent to Twitch!

There are a lot of optimizations we could make here (like taking H264 from the browser directly) but H264 isn't supported everywhere, so this just makes the sample easier to reason with.

发布评论

评论列表(0)

  1. 暂无评论