<div>Hi,<br></div><div><br></div><div>I directly receive compressed h264 avc1 frames that I want to write to a transport stream.</div><div>I have compiled ffmpeg without x264 as I can't use GPL stuff.</div><div><br></div>
<div>I added h264_mp4toannexb to my bitstream filters and when calling av_bitstream_filter_filter I get a 0 which basically means nothing happened...</div><div>So I've set the following for my output stream:</div><div>
<br></div><div>st->codec->extradata = av_mallocz(FF_INPUT_BUFFER_PADDING_SIZE);</div><div>st->codec->extradata_size = FF_INPUT_BUFFER_PADDING_SIZE;</div><div><br></div><div>But that just changed my error to :</div>
<div><br></div><div>[h264 @ 0x1010b2000] Warning: SPS NALU missing or invalid. The resulting stream may not play.</div><div>[h264 @ 0x1010b2000] Warning: PPS NALU missing or invalid. The resulting stream may not play.</div>
<div>h264_mp4toannexb failed for stream 0, codec h264</div><div><br></div><div>Which leads to the following error when writing the frame:</div><div>H.264 bitstream malformed, no startcode found, use -vbsf h264_mp4toannexb</div>
<div><br></div><div>I have no idea what I should do to solve this.</div><div><br></div><div>Any help, hint would be greatly appreciated. Thanks in advance.</div><div><br></div><div>Best regards,</div><div><br></div><div>Valérian</div>