Using cvCaptureFromFile on a rtsp stream glitch

asked 2013-06-04 10:08:55 -0500

asqz gravatar image

Hi, I want to display a rtsp stream and display it in a window. But this lines :


avformat_network_init();

CvCapture *camera = cvCaptureFromFile("rtsp://192.168.253.14/video/input3/encoder1/transmitter3");


trigger the following error message :


[mpeg4 @ 0x2102ea0] hmm, seems the headers are not complete, trying to guess time_increment_bits [mpeg4 @ 0x2102ea0] my guess is 5 bits ;) [mpeg4 @ 0x2102ea0] hmm, seems the headers are not complete, trying to guess time_increment_bits [mpeg4 @ 0x2102ea0] my guess is 5 bits ;) [mpeg4 @ 0x2102ea0] looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag [mpeg4 @ 0x2102ea0] [IMGUTILS @ 0x7fff64efb200] Picture size 0x0 is invalid [mpeg4 @ 0x2102ea0] get_buffer() failed (-1 0 (nil)) [mpeg4 @ 0x2102ea0] [IMGUTILS @ 0x7fff64efb200] Picture size 0x0 is invalid [the same repeted many time...]

[mpeg4 @ 0x2102ea0] get_buffer() failed (-1 0 (nil)) [rtsp @ 0x20fefa0] Estimating duration from bitrate, this may be inaccurate


This are only warning because the the stream display the right images, but i want my code to be clean. Moroever the window doesn't notice my key press. Can you help me fix this problem please.

edit retag flag offensive close merge delete