[Libav-user] Compressed h264 avc1 frames to transport stream

Valérian contact at valerian.be
Tue Jan 24 16:44:43 CET 2012


Hi,

I directly receive compressed h264 avc1 frames that I want to write to a
transport stream.
I have compiled ffmpeg without x264 as I can't use GPL stuff.

I added h264_mp4toannexb to my bitstream filters and when calling
av_bitstream_filter_filter I get a 0 which basically means nothing
happened...
So I've set the following for my output stream:

st->codec->extradata = av_mallocz(FF_INPUT_BUFFER_PADDING_SIZE);
st->codec->extradata_size = FF_INPUT_BUFFER_PADDING_SIZE;

But that just changed my error to :

[h264 @ 0x1010b2000] Warning: SPS NALU missing or invalid. The resulting
stream may not play.
[h264 @ 0x1010b2000] Warning: PPS NALU missing or invalid. The resulting
stream may not play.
h264_mp4toannexb failed for stream 0, codec h264

Which leads to the following error when writing the frame:
H.264 bitstream malformed, no startcode found, use -vbsf h264_mp4toannexb

I have no idea what I should do to solve this.

Any help, hint would be greatly appreciated. Thanks in advance.

Best regards,

Valérian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120124/e8808b57/attachment.html>


More information about the Libav-user mailing list