-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twitch "Conversion failed!" with panic: write |1: broken pipe #62
Comments
:( that's no good! Honestly I think https://github.com/pion/webrtc/tree/master/examples/rtp-forwarder is better. Having to put stuff inside an MKV -> rtmp is really wasteful. If you do the example ^ you will waste a lot less CPU cycles! |
Thanks Sean for pointing me in the right direction. As you said, it would simply forward the RTP packets to whatever app is able to receive them, in my case ffmpeg. So we don’t have to decode in Pion and then feed to ffmpeg: we can just forward and have ffmpeg do its thing, potentially encoding Opus to AAC and sending the result to my existing RTMP listening endpoint, right? I’ll give it a try. By the way: in your experience should I prefer gstreamer to ffmpeg for this use case? |
Yea exactly! Right now we waste CPU cycles because our The more examples the better, that would be amazing :D I love just have a grab bag of examples to inspire people. My biggest motivation for Pion is to kickstart people to go do interesting things. I like that these examples don't just help people solve problems, but maybe show them what else could be done. If you are interested in blogging/writing I would love to link to that as well! Really w/e you feel most inspired to do. I am also up for massive refactors/changes if you think that is best :) |
To follow up on this, the rtp-forwarder example worked well coupled with this FFMPEG command line to send to an existing RTMP: |
|
Yes and so I would need to change the accepted video codec in https://github.com/pion/webrtc/blob/master/examples/rtp-forwarder/main.go to specify H264 instead of the current VP8. Thanks! |
Hey @Sean-Der and @ldenoue, thanks for the great comments. I am currently working on something like this, but I need get the H264 video, for my case other codecs are impractical. The question is, after changing and registering the H264 codec like this:
The ffmpeg is now reporting strange informations about the video and VLC is not working at all with the default SDP file of the example.
Searching about the SDP format, I get this pattern:
But.... again the same error. Any ideas? |
Oh, my mistake, after another research about SDP (and fixing the UDP ports) the video is now working perfectly. The correct SDP file for my case is:
Thank you guys. |
That's awesome, glad it worked @mqgmaster. Always excited to see people use Pion :) Sorry I have been slow on responses, my backlog grows faster then I can close stuff |
Regarding RTP Forwarders, is it possible to forward rtp to some other ip address instead of localhost?? |
Hey @xoraingroup Yes that is easily possible! You can change this line to be w/e address you want! |
Hey @Sean-Der , In continuation to this issue. One of the possible solution is at hexcord-mediaserver or v2.0 of my project which i have tested. Both implement webrtc v 3.0. |
Your environment.
What did you do?
I ran the twitch sample by sending my SDP using EXPORT SDP=... and then echo $SDP | go run main.go
What did you expect?
I expect ffmpeg to keep converting the incoming RTP audio and video packets and pushing the converted audio/video to my RTMP endpoint.
What happened?
Everything works for a few seconds (and I can see my stream for a little while, even though it's highly pixelated), but then it fails with the stack trace shown above.
The text was updated successfully, but these errors were encountered: