[Libav-user] h264 decoder problem with rtsp stream

Alexander Wischnewski aw.wisch at googlemail.com
Thu Nov 1 15:34:33 CET 2012


Hello,

im using ffmpeg on iOS to decode a h264 rtsp stream of an ip camera, im
connection to the stream via http tunneling and it is working so far but
the decoder has different problems with some frames, resulting in bad image
quality. Im new to ffmpeg and video decoding in general so i have no guess
where the problem might be. I mostly used the iFrameExtractor app as an
example to write my own code which is working very well for cameras with
mjpeg stream.

I ve heard that normally you have to extract the SPS / PPS of the rtsp
frames and send them to the decoder, on the other side some people writing
that ffmpeg is extracting them itself. this is the output I'm recieving in
xcode:

[h264 @ 0xba7bc00] sps_id (32) out of range

[h264 @ 0xba7bc00] sps_id (32) out of range

[h264 @ 0xba7bc00] sps_id (32) out of range

[h264 @ 0x9ab5e00] max_analyze_duration 100000 reached at 120000

[h264 @ 0x9ab5e00] decoding for stream 0 failed

[h264 @ 0x9ab5e00] Estimating duration from bitrate, this may be inaccurate

[swscaler @ 0x9b2f000] No accelerated colorspace conversion found from
yuv420p to rgb24.

[h264 @ 0x9b2e400] sps_id (32) out of range

[h264 @ 0x9b2e400] sps_id (32) out of range

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e800] sps_id out of range

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0x9b2e400] Partitioned H.264 support is incomplete

[h264 @ 0x9b2e400] Partitioned H.264 support is incomplete

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9a9a800] sps_id out of range

[h264 @ 0xba7bc00] chroma_format_idc 32 is illegal

[h264 @ 0x9a9a800] chroma_format_idc 32 is illegal

[h264 @ 0x9a9a800] chroma_format_idc 32 is illegal

[h264 @ 0x9b2ec00] Partitioned H.264 support is incomplete

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e400] sps_id out of range

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e000] sps_id out of range

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e400] sps_id out of range

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] illegal bit depth value (28, 8)

[h264 @ 0x9b2e000] illegal bit depth value (28, 8)

[h264 @ 0x9b2e000] illegal bit depth value (28, 8)

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] illegal bit depth value (8, 50)

[h264 @ 0x9b2e800] illegal bit depth value (8, 50)

[h264 @ 0x9b2e800] illegal bit depth value (8, 50)

[h264 @ 0x9b2e800] Partitioned H.264 support is incomplete

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e000] sps_id out of range

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] chroma_format_idc 5 is illegal

[h264 @ 0x9b2e400] chroma_format_idc 5 is illegal

[h264 @ 0x9b2e400] chroma_format_idc 5 is illegal

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e800] sps_id out of range

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e800] sps_id out of range

[h264 @ 0x9b2e400] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e400] decode_slice_header error

[h264 @ 0x9b2e400] no frame!

[h264 @ 0x9b2e800] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e800] decode_slice_header error

[h264 @ 0x9b2e800] no frame!

[h264 @ 0x9b2ec00] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2ec00] decode_slice_header error

[h264 @ 0x9b2ec00] no frame!

[h264 @ 0x9a9a800] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9a9a800] decode_slice_header error

[h264 @ 0x9a9a800] no frame!

[h264 @ 0x9b2e000] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e000] decode_slice_header error

[h264 @ 0x9b2e000] no frame!

[h264 @ 0x9b2e400] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e400] decode_slice_header error

[h264 @ 0x9b2e400] no frame!

[h264 @ 0x9b2e800] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e800] decode_slice_header error

[h264 @ 0x9b2e800] no frame!

[h264 @ 0x9b2ec00] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2ec00] decode_slice_header error

[h264 @ 0x9b2ec00] no frame!

[h264 @ 0x9a9a800] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9a9a800] decode_slice_header error

[h264 @ 0x9a9a800] no frame!

[h264 @ 0xba7bc00] illegal aspect ratio

[h264 @ 0x9b2e000] illegal aspect ratio

[h264 @ 0x9b2e000] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e000] decode_slice_header error

[h264 @ 0x9b2e000] no frame!

[h264 @ 0x9b2e400] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e400] decode_slice_header error

[h264 @ 0x9b2e400] no frame!

[h264 @ 0x9b2e800] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2e800] decode_slice_header error

[h264 @ 0x9b2e800] no frame!

[h264 @ 0x9b2ec00] Width/height/bit depth/chroma idc changing with threads
is not implemented. Update your FFmpeg version to the newest one from Git.
If the problem still occurs, it means that your file has a feature which
has not been implemented.

[h264 @ 0x9b2ec00] decode_slice_header error

[h264 @ 0x9b2ec00] no frame!

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] non-existing PPS referenced

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2e400] sps_id out of range

[h264 @ 0xba7bc00] sps_id out of range

[h264 @ 0x9b2ec00] sps_id out of range

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0xba7bc00] missing picture in access unit with size 16

[h264 @ 0x9b2e800] Partitioned H.264 support is incomplete

My ffmpeg build options (i386 simulator):

--disable-shared --disable-doc --disable-devices --disable-ffmpeg
--disable-ffplay --disable-ffprobe --disable-ffserver --disable-protocols
--enable-protocol=http --enable-protocol=rtp --enable-protocol=udp
--disable-filters --disable-encoders --disable-decoders
--enable-decoder=mjpeg --enable-decoder=h264 --disable-demuxers
--enable-demuxer=mjpeg --enable-demuxer=h264 --enable-demuxer=rtsp
--disable-demuxer=mov --disable-muxers --disable-parsers
--enable-parser=mjpeg --enable-parser=h264 --enable-neon --enable-pthreads
--enable-swscale --enable-cross-compile --arch=i386 --target-os=darwin
--cpu=i386 --prefix=compiled/i386 --enable-pic --enable-static

Pseudo code in the app lokks like this:

av_register_all();

avformat_network_init();

pFormatCtx = avformat_alloc_context();

avInformat = av_find_input_format("h264");

avformat_open_input(&pFormatCtx, moviePath, avInformat, &options)

avformat_find_stream_info(pFormatCtx, NULL)

pCodecCtx=pFormatCtx->streams[videoStream]->codec;

pCodec=avcodec_find_decoder(pCodecCtx->codec_id);

AVDictionary* codecOpts = NULL;

avcodec_open2(pCodecCtx, pCodec, &codecOpts)

.....

Im using the latest git head of ffmpeg and already tested with turned off
pthreading in my build configuration but the output is still the same, vlc
cant access the http tunnel but the rtsp directly works but not with ffmpeg.

Hope someone can give me a hint

Best regards,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20121101/b44deb17/attachment.html>


More information about the Libav-user mailing list