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 am having trouble processing some H.264 streams. After using h264bsdDecode() and getting H264BSD_PIC_RDY, sometimes h264bsdNextOutputPicture() returns a NULL pointer.
In the end, for a 122 images stream (122 times H264BSD_PIC_RDY, and 122 frames produced by ffmpeg when used to convert the .264 file to png), I may end up being able to decode 112 of them.
Those streams are specifically those extracted from MP4 generated by Safari on iPhones using the html MediaRecorder api (mimeType 'video/mp4;codecs="avc1.42001e" for instance). ffprobe shows that they are baseline 3.1 profiles, exactly as similar files produced on Macs (which do work). The only difference I can see is that iPhone files seem to be full color range, but patching this info does not seem to change the result.
Any lead or clue would be greatly appreciated.
Cheers,
Alban
The text was updated successfully, but these errors were encountered:
By the way, I found that if I hard-coded seqParamSet.maxDpbSize value to 2 after h264bsdDecodeSeqParamSet(&strm, &seqParamSet); in h264bsdDecode (default value is 5), I could decode more pictures (but not all of them).
I don't know if my stream is ill-formed or if h264bsd misconfigures the decoder, but that might give clues regarding the nature of this bug.
More testing shows that in my case (decoding streams from Safari encoded with the MediaRecorder API), forcing seqParamSet.numRefFrames = 1; seqParamSet.maxDpbSize = 1;
allows decoding every frame but the last one on iOS sources, and all frames on OSX sources.
I hate doing these kinds of hacks, but at least it will do the trick for the moment.
Hello,
I am having trouble processing some H.264 streams. After using
h264bsdDecode()
and gettingH264BSD_PIC_RDY
, sometimesh264bsdNextOutputPicture()
returns aNULL
pointer.In the end, for a 122 images stream (122 times H264BSD_PIC_RDY, and 122 frames produced by ffmpeg when used to convert the .264 file to png), I may end up being able to decode 112 of them.
Those streams are specifically those extracted from MP4 generated by Safari on iPhones using the html MediaRecorder api (mimeType
'video/mp4;codecs="avc1.42001e"
for instance). ffprobe shows that they are baseline 3.1 profiles, exactly as similar files produced on Macs (which do work). The only difference I can see is that iPhone files seem to be full color range, but patching this info does not seem to change the result.Any lead or clue would be greatly appreciated.
Cheers,
Alban
The text was updated successfully, but these errors were encountered: