-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
WebRTC: Convert RTSP to WebRTC, very weird webrtc playback issue #3870
Comments
attach client info and stream info here, no much difference between good case and bad case
|
looks like key frame is not recognized properly in srs for some rtsp sourceffprobe、ffmpeg pull rtsp again also can trigger the webrtc play again, but not for long, in webrtc debug console, it only triggers 2 keyframe decoded each time, but still, the rtmp output always works, so which one could be the problem, the camera or the webrtc implementation in srs? |
recorded 2 mp4 files by ffmpeg pulling rtsp stream from 2 cameras, bad.mp4 means webrtc cannot render properly(ffmpeg push mp4 file to srs directly), but both can be played with vlc or normal mp4 players good.mp4good.mp4bad.mp4bad.mp4 |
I believe this issue is caused by the video content from your RTSP camera. Therefore, the best solution is to use ffmpeg to transcode your video stream. For example, you can pull the RTSP stream with ffmpeg and then transcode it to RTMP to publish to SRS. It is a straightforward conversion, but it should work very well. Please note that when you transcode a stream with ffmpeg, you should disable the B-frames. You can simply use the baseline profile because WebRTC does not support B-frames. |
Describe the bug
Pulling rtsp stream from camera(in h264 codec) and pushing rtmp to srs without any transcoding, webrtc can not play, but exectuting a snapshot on camera will make webrtc playback work, if clicking on play button on webrtc page, the playback will stop again
Version
srs:v5.0-b6 in docker.
To Reproduce
Expected behavior
webrtc should be working.
Screenshots
webrtc player stuck.
no video recognized in chrome
after a snapshot on camera, video is recognized without restarting anything
plicount keeps increasing until snapshot kicks in, meaning frame data were lost
Additional context
snapshot command reference:
ffmpeg -re -rtsp_transport tcp -i rtsp://xxx -y -f mjpeg -t 0.001 r13-snap.jpg
The text was updated successfully, but these errors were encountered: