Closed belveder79 closed 8 months ago
Thanks for the question. I wonder if it is B-frames. When you made the x265 encoding from the cat video with libx265 there are extra flags you can add to ffmpeg to pass into libx265 to make only do I-Frames and P-Frames. They are called something like "presets" or "tune" A quick web search hinted at
ffmpeg -i test.avi -c:v libx265 -preset medium -x265-params crf=23:bframes=0 test_HEVC.mp4
The other thing to check is using SharpRTSP in TCP mode as SharpRTSP does not handle RTP packets being out of order on your LAN (ie UDP packets being out of order on the LAN if some network routing could cause one UDP packet to overtake another). Using RTP over RTSP (aka TCP mode) is fine as any out-of-order packet are handled in the OS TCP stack.
good hint... I did not really play around with the params or I/B/P frame settings... what I saw was that it is not an issue of TCP/UDP however, because it was doing the same thing regardless of the used protocol...
I ran the test again without B-frames and it works nicely - thx a lot...
glad it worked
just another quick question concerning the H265Payload...
I stored the raw incoming packets (NALS, VPUs, etc.) to a raw .h265 file (and .aac for some more fun). The video is sent using ffmpeg with
and plays just nicely like that in VLC (no stuttering, no forth/back jumping of frames).
The code to write an mp4 file from the raw outcome is
Looking at this video in Chrome, it stutters forth and back. While this might be due to Chrome not handling B-frames well, it is pretty similar in VLC. It stutters, but instead seems to drop frames... I know that the H265 does a lot of magic on the reordering of frames after decoding, but I guess there must be something missing (or off), if a plain copy of the received units creates bumpy videos.
Probably this happens also because we are streaming 25-30fps per sec, which means that the phenomenon just becomes visible there, and not for webcams with 5-10fps or so... however, I wanted to ask about your experience with the H265 payload parser and about the testing practice... probably I can fix it somehow...