You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: H264Payloader() is 'removing' NAL units of type 9 and type 1.
My Test:
I created an mpegts file using FFmpeg. h264, baseline, 30 fps, all frames evenly spaced with PTS/DTS delta of 3000. GOP size is two seconds (60 frames). I log the NAL units via FFmpeg/FFplay.
I stream the mpegts file via FFmpeg into my Go program over SRT. I log the NAL units as they come of out the Haivison SRT library. (They match the NAL units recorded from the mpegts file)
I send each NAL unit into pion/h264Packetizer.Packetize(). I log the NAL unit types. Some units of type 9 and 1 are missing.
What is lost:
Entire Access Units that contain:
NAL Unit Type 1 (Coded slice of a non-IDR picture).
NAL Unite Type 9 (NAL Unit Delimiter)
I have isolated a single Access Unit to diagnose. (Though these Access Unit drops occur multiple times per stream.) Here is the original Access Unit of the .ts file that is sent via SRT:
[FFprobe & FFMpeg output]
Please note that Pion is parsing the first NAL type as '0' (Incorrect), and the second as AUD (Correct). Both NAL units are discarded, and therefore the entire Access Unit.
The text was updated successfully, but these errors were encountered:
Your environment.
Problem: H264Payloader() is 'removing' NAL units of type 9 and type 1.
My Test:
(H264) -> SRT -> (mpegts) -> pion/264Reader.NextNAL() -> pion/h264Packetizer.Packetize() -> [Some frames are missing]
Line 87 "filters out" AUD NAL units. https://github.com/pion/rtp/blob/master/codecs/h264_packet.go
But is also removes types 1 & 9 NAL units.
h264_packet.go
What is lost:
Entire Access Units that contain:
NAL Unit Type 1 (Coded slice of a non-IDR picture).
NAL Unite Type 9 (NAL Unit Delimiter)
I have isolated a single Access Unit to diagnose. (Though these Access Unit drops occur multiple times per stream.) Here is the original Access Unit of the .ts file that is sent via SRT:
[FFprobe & FFMpeg output]
Here is what happens when the Pion Packetizer consumes it:
srtConnection-handleH264Data() nal.UnitType: 0 nal.RefIdc: 0 nal.ForbiddenZeroBit: false
srtConnection-handleH264Data() Adding srt NAL unit to rtp packets. len(nal.Data): 6 samples: 3000
Packetizer-Packetize() len(payload): 6
pion.rtp.codec.H264Payloader-Payload()
pion.rtp.codec.H264Payloader-Payload() AUD NAL type found, RETURNING!
Packetizer-Packetize() len(payloads): 0
Please note that Pion is parsing the first NAL type as '0' (Incorrect), and the second as AUD (Correct). Both NAL units are discarded, and therefore the entire Access Unit.
The text was updated successfully, but these errors were encountered: