Open Von-github opened 2 years ago
The key frame interval is an encoder setting, so you have to set it on the encoder outside of libdatachannel.
However, are you sure only one key frame is actually sent? Note that the connection shows continuous very high packet loss over time (about 30%), not just once. That's why playback would be stuck, irrelevant of the number of keyframes.
I'd need more information about your setup, but from the symptoms it looks more like a duplicate of https://github.com/paullouisageneau/libdatachannel/issues/740. Does the issue still happen with last master
?
I'm using a "streamer" and the video is the sample, encoded using generate_h264.py
I tried the latest master
and found that the problem was still unresolved
The keyframe is still only sent once, and if the packet is lost, it cannot be decoded later.
I am using the code in the streamer
to create an H264 video clip. How do I set the IFRAME INTERVAL?
The keyframe is still only sent once, and if the packet is lost, it cannot be decoded later.
That's not the actual problem here. As you can see on the graphs, the connection experiences very high packet loss: 20K packets are lost while 30K are received, meaning the packet loss rate is roughly 40%. Nothing will play if nearly half of packets are lost. Do you run the example locally or across a network?
I am using the code in the
streamer
to create an H264 video clip. How do I set the IFRAME INTERVAL?
You mean "keyframe interval". The generate_h264.py
script calls ffmpeg under the hood to encode as h264. You can change the default keyframe interval by modifying the script and adding -x264opts "keyint=XX"
to the ffmpeg
command line.
When I was using libdatacahnnel, I found that only one key frame was sent. After packet loss, the video receiver could only play the first frame (the audio is normal). May I ask how to set parameters to solve this problem