-
Notifications
You must be signed in to change notification settings - Fork 254
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
Browser vs Pion and Ffmpeg stream #69
Comments
met the same problem, any suggestion? |
hi, @silverark I solved this problem. ivfwriter is not reliable, I recommand samplebuilder instead of ivfwriter because samplebuilder will sort rtp packet by sequence number. Check the expamle named "Save-to-webm", and use ffmpeg pipe as videowriter. Later, I will commit a new example, Good Luck! |
Thank you @iammeizu I will give it a go tomorrow! I was also contacted by Sean DuBois toio who said he was workign on Interceptors for V3 too: pion/webrtc-v3-design#34 |
@iammeizu - I've got this working with sampleBuilder but strangely found the image to be worse using this method! What value did you have for the I'm wondering if it's my ffmpeg command? I tried using the example from the twilio example, but outputting to pipe1 instead, but I found that the stream never started! |
hi @silverark , my Maxlate is 50, and you can use send PLI by rtcp, which is used to control keyframe internal. I set 1 PLI per second, which means server get a complete frame per second. so the snow phenomenon can be relief by this way. |
Sorry for the slow response on this! @silverark emailed me directly, copying my respond here
|
I am having the exact same issue with rtp-forwarder. But its happening always, not only when the signal is bad. To get this ready for production, i need to somehow solve this. I would appreciate any guidance Thanks |
Not usre where exactly yo ask this, but I'm looking for some advise on processing a stream. Firstly, thank you for Pion, it's awesome!
We have it in a project that connects in to a call and monitors the users by doing some facial recognition and adult content detection. Everything is working really well, apart from when a user has a bad wifi connection.
We started building from the
janus-gateway
example and to get the image so we can process it in gocv we use the example ingocv-receive
.This uses ffmpeg with an input and output pipe. An ivfWriter sends it to the input, and we read it from the 'output' as per the example. We then open it as an opencv mat.
The problem:
When viewing the stream in a browser, when it get's choppy due to a bad wifi signal the browser drops the frames rather than showing garbled data. With pion -> ffmpeg -> gocv we get garbled frames as shown in the image below.
I've tried various ffmpeg commands to see if we can detect these bad fames/packets:
"ffmpeg", "-err_detect", "buffer", "-fflags", "discardcorrupt"
but whatever I try, when we simulate a bad connection it destroys the image.Is there a way of detecting when the image is bad? Is there a way of stopping or dropping these frames? I'm not 100% sure where the issue is so even pointing me in the right direction would be greatly appreciated!
What did you expect?
When the signal is bad, for bad frames to be dropped.
What happened?
I'm seeing garbled frames when the connection is bad, or just before it disconnects.
The text was updated successfully, but these errors were encountered: