SIPSorceryMedia.FFmpeg icon indicating copy to clipboard operation
SIPSorceryMedia.FFmpeg copied to clipboard

Adds HEVC (H.265), use Dynamic ID for video codecs, and auto-detect decode video codecs.

Open ha-ves opened this issue 8 months ago • 2 comments

SIPSorcery supported H.265 packets via https://github.com/sipsorcery-org/sipsorcery/pull/1346

Improvements:

  • [x] H.265/HEVC support with libx265,
  • [x] Use dynamic RTP codecs ID counter,
  • [x] Adds auto-detection of received video codec by supported formats.

(Fixed) Quirks :

  • For now only direct IVideoSource.OnVideoSourceEncodedSample to IVideoSink.GotVideoFrame will work flawlessly,
  • Only tested with SIPSorcery peers, (nvm, not applicable)
  • only(?) I-frames (keyframes) are getting corrupted(?).

https://github.com/user-attachments/assets/5f098789-26d2-4702-9009-92af4f7ee765

https://github.com/user-attachments/assets/0858f157-43cc-48e5-9adb-077e3d3d27cd

ha-ves avatar Mar 08 '25 22:03 ha-ves

Added some QOL improvement and bitstream filter template comment in FFmpegVideoEncoder.cs, should be OK after https://github.com/sipsorcery-org/sipsorcery/pull/1394 is merged.

@sipsorcery do you have something that I might have missed?

ha-ves avatar May 02 '25 10:05 ha-ves

@ha-ves thanks for the update. Good for merge now just needs the conflcit resolved.

sipsorcery avatar May 10 '25 15:05 sipsorcery

Force pushing to rebase with the master branch.

ha-ves avatar Oct 24 '25 17:10 ha-ves

@ha-ves thanks for updating the PR. Have you been able to test H265 with Chrome, or any other browser, yet?

sipsorcery avatar Nov 01 '25 19:11 sipsorcery

@sipsorcery, I added some small QoLs. I use H265 with Intel QSV wrapper, so far no glitches. image

Chrome args for HEVC/H265
--enable-features=PlatformHEVCEncoderSupport,WebRtcAllowH265Receive,WebRtcAllowH265Send --force-fieldtrials=WebRTC-Video-H26xPacketBuffer/Enabled

ha-ves avatar Nov 04 '25 02:11 ha-ves