Hi everyone, I seem to be stuck with this. Have used the demux.c example code and added a jpeg save function (found on the net - but using old libav / ffmpeg calls) using libav's mjpeg encoder, but there are some issues with (some of) the resulting jpeg images.
Here is the code: http://pastebin.com/EkhJ5ZjH So this is downloading the RTSP stream (via TCP) from an IP camera, decoding H.264 and encoding jpeg images from this. Some of the images are empty (grey background) even though I am waiting for a key frame initially. Then once in a while an image is quite bad quality (could be the key frame). At the moment it's only saving one frame per second, but the result is the same with every frame. Some images are also corrupted such as only the top half looks okay and then the last line is somehow smudged all the way to the bottom (ie. unusable for motion detection). Now is there a way to ignore these images? There may be a quality setting or step that I over looked? Maybe there is a bug in the code? The same thing happens when using ffmpeg / libav from the command line though. Now sometimes the stream is losing packets (as accessed over the internet via lower bandwidth), but should this not be ignored somehow? Is there a way to discard faulty frames? /usr/local/bin/avconv -i rtsp://admin:admin@xxx:xxx/video -vsync 1 -r 1 -an -y '%d.jpg' Any help would really be appreciated, happy to pay money via paypal as well. Thanks for your help. _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
