How to transcode the parts of a segment
captain-bugs opened this issue · 0 comments
I want to do ABR for LHLS. Is it possible to transcode the AnexB bitstream format directly using ffmpeg or libav libraries?
for now i'm trying to store the muxerPart.videoSamples[]
data in a .h264
file.
I read if i provide the SPS
and PPS
as extradata
to AVCodecContext
i can transcode it.
But not every part has SPS
and PPS
only the first part of every segment.
The .h264
file which I created has order like SPS, PPS, SPS, PPS, slice of IDR, slice of non-IDR ...
but only the 1st part of segment has this order the other parts only have slice of non-IDR ...
And if i want to get SPS and PPS from 1st part when i unmarshal the contents of .h264
file using h264.AnnexBUnmarshal()
function i get error: NALU count (546) exceeds maximum allowed (21)
.
even though every au
that are marshalled have the prefix of []byte{0x00, 0x00, 0x00, 0x01}
- Is it possible to transcode the parts
- If yes is the adding SPS and PPS as
extradata
toAVCodecContext
right way - why
h264.AnnexBUnmarshal()
gives error