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
I’m newbie in the field of video streaming, please help me to understand your code in method sampleOutput(video sampleBuffer: CMSampleBuffer) in RTMPMuxer.swift:
data in buffer is formed by a header and encoded video data got from CMBlockBuffer in the CMSampleBuffer.
the header is 5 bytes in length, byte[0] is either 0x17(if it’s a keyframe) or 0x27(if it’s not a keyframe)
byte[1] is 1(NAL type)
I watched from debug window that byte[2]..byte[4] is always 0x000000
so I get every buffer data(in hex):
1701000000 followed by encoded H264 video data
or
2701000000 followed by encoded H264 video data
I know that the encoded video buffer should be converted to NALU before sent to stream,the NALU should be Annex B(3 or 4 bytes start code in header) or AVCC(4bytes in length in header) type. so I donnt understand why the 5 bytes header be added before the encoded H264 video data, would you please to explain this to me? thank you very mush!
The text was updated successfully, but these errors were encountered:
I’m newbie in the field of video streaming, please help me to understand your code in method sampleOutput(video sampleBuffer: CMSampleBuffer) in RTMPMuxer.swift:
1701000000 followed by encoded H264 video data
or
2701000000 followed by encoded H264 video data
I know that the encoded video buffer should be converted to NALU before sent to stream,the NALU should be Annex B(3 or 4 bytes start code in header) or AVCC(4bytes in length in header) type. so I donnt understand why the 5 bytes header be added before the encoded H264 video data, would you please to explain this to me? thank you very mush!
The text was updated successfully, but these errors were encountered: