-
-
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
Problem of video frame skipping when saving RTSP stream as HLS #535
Comments
The failure to decode something in H.264 will result in some information in HLS being incorrect.
|
Hello, I also encountered a similar problem. Did you solve yours?
|
@winlinvip I have some clues here. When pushing the stream to SRS using ffmpeg, it can be confirmed that there is an issue with the RTSP stream from the IPC, whether it is RTP or TCP. In fact, not only HLS but also RTMP will be affected, but the extent of the impact depends on the player. First, it is not possible to confirm whether it is a transmission issue in the network protocol or an issue with the ES stream. Currently, it has been observed that the stream output from the IPC is irregular:
Now, the issue is being resolved by using the transcode method, which involves re-encoding the stream using ffmpeg and then pushing it out. The ffmpeg parameters used are similar to the encoding parameters of the IPC, which effectively solves this problem. nginx-rtmp also has similar issues. The above is a rough positioning of the information provided. Due to the loose coupling of SRS and codec, most of the ES stream processing and protocol handling are delegated to ffmpeg. I don't know if SRS has considered the possibility of tight coupling in the future. My initial consideration is that both the IPC stream and ffmpeg may be related.
|
Does not support pushing RTSP streams from the camera to SRS, only supports ingesting/FFmpeg pulling RTSP streams from the camera and then forwarding them to SRS. Please refer to: #2304 (comment)
|
Hi!
I am using srs (ossrs) 3.0.6, the latest code from the devleop branch. I am using ingest to pull an rtsp stream and output it as rtmp and hls live streams.
The configuration file is as follows:
The rtmp address for the live stream is rtmp://192.168.1.117:1935/live?vhost=live/livestream.
When starting srs, an error occurred and the log is as follows:
Later, upon reviewing the code, it was found that there is a condition for seq_scaling_matrix_present_flag_i in srs_kernel_codec.cpp.
If it fails, it will exit. I think this condition is unnecessary, so I commented it out. After that, the live streaming can be used normally without any lag!
The log is as follows:
When using HLS live streaming, the streaming address is http://192.168.1.117:8080/live/livestream.m3u8. There is no screen flickering when playing, but the video is lagging. The image changes every three seconds, giving a feeling of only playing I-frames. I have uploaded the TS files to Baidu Cloud Drive, you can find them at http://pan.baidu.com/s/1dDwPmG5.
When I enable DVR mode and store the files in FLV format, they can be played normally. Only the TS files generated in HLS mode are not working properly.
Can you please tell me the reason for this?
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: