[Libav-user] How to pack h264 RTSP stream into flv container?

Spencer Graffe sgraffe at gmail.com
Wed Mar 30 18:59:05 CEST 2011


I haven't needed to encode anything, but I'm pretty sure that you need to
write the header to your file before you start encoding your data. There is
a separate call to write the header (I don't know what it is called, but
I've seen it before in the Doxygen docs).

On Wed, Mar 30, 2011 at 3:49 AM, Kulti <kultihell at gmail.com> wrote:

> Hi, all.
>
> I can successfully receive h264 rtsp stream, then decode and encode it
> to h264 again, then write to flv container. But when I try to write
> received AVPacket to flv container without decoding/encoding - the
> output file cannot be played. VLC outputs the following errors:
>
>
> [h264 @ 0xb0b0d5b0] QP 120 out of range
> [h264 @ 0xb0b0d5b0] decode_slice_header error
> [h264 @ 0xb0b0d5b0] concealing 4000 DC, 4000 AC, 4000 MV errors
> [h264 @ 0xb0b0d5b0] deblocking_filter_idc 32 out of range
> [h264 @ 0xb0b0d5b0] decode_slice_header error
> [h264 @ 0xb0b0d5b0] concealing 4000 DC, 4000 AC, 4000 MV errors
> [h264 @ 0xb0b0d5b0] illegal memory management control operation 32
> [h264 @ 0xb0b0d5b0] top block unavailable for requested intra mode at 6 0
> [h264 @ 0xb0b0d5b0] error while decoding MB 6 0
> [h264 @ 0xb0b0d5b0] number of reference frames exceeds max (probably
> corrupt input), discarding one
> .....
> etc
>
> I read some documentation and found, that av_write_frame must receive
> AVPacket with one video frame, but av_read_frame read one video frame
> too. Also I've try to start writing from packet with flag
> AV_PKT_FLAG_KEY.
>
> At now I cannot understand, what I'm doing wrong...
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>



-- 
Spencer Graffe
- A Guy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110330/d114607a/attachment.html>


More information about the Libav-user mailing list