[Libav-user] Segfault on corrupted video
Tim Pitman
tapitman11 at gmail.com
Tue Jun 26 21:33:40 CEST 2012
Sorry I forgot to give my setup:
Ubuntu Linux 10.04
ffmpeg version git-2012-05-19-31dfe20
built on May 18 2012 18:08:16 with gcc 4.4.3
On the encoder side:
ffmpeg from webcam:
ffmpeg \
-y \
-f \
v4l2 \
-video_size 640x480 \
-r 25 \
-i /dev/video0 \
-bufsize 50 \
-f yuv4mpegpipe \
-pix_fmt yuv420p \
pipe0
x264 to channel:
x264 \
--vbv-bufsize 50 \
--vbv-maxrate 2000 \
--bitrate 600 \
--fps 25 \
--tune zerolatency \
--intra-refresh \
--ref 0 \
--keyint 7 \
--muxer raw \
-o pipe1 \
pipe0
Decoder version of ffmpeg/libav is similar
On Tue, Jun 26, 2012 at 12:28 PM, Tim Pitman <tapitman11 at gmail.com> wrote:
> I'm experimenting with transmitting h264 over a lossy channel. On the
> receiver side I have a very simple libav/opengl video player that
> takes the stream and feeds it to avcodec_decode_video2 one NALU at a
> time. There are lots of errors but mostly they just result in
> artifacts, which is exactly what I want to happen. However, when the
> channel is bad libav segfaults with:
>
> mmco: unref short failure
>
> I was wondering if anyone has a guess as to how I can avoid this
> crashing. I don't care if the video looks horrible, I just want it to
> keep going and recover when the channel improves again.
>
> I have several ideas that I was going to try:
> 1) Make my video player NALU aware and checksum each NALU, throwing
> out bad ones.
> 2) Make my video player frame-aware and throw out bad frames.
>
> If I knew what it was about the NALU's that are crashing libav, I
> would just get rid of those ones and be done with it.
>
> I'm also planning to do some simple FEC, probably at the NALU level,
> which will help as well.
>
> Thanks,
> Tim
More information about the Libav-user
mailing list