Capture a video stream

asked 2015-03-28 11:34:16 -0600

LBerger gravatar image

updated 2015-03-29 10:17:07 -0600

Hi I try to capture a video stream and I cannot opent it using opencv. First I have try this command (from ffmpeg) with success

ffplay ""

with this message :

[mjpeg @ 0000000002bedb40] Format mjpeg detected only with low score of 25, misdetection possible! Input #0, mjpeg, from '': Duration: N/A, bitrate: N/A Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg), 640x480, 25 tbr, 1200k tbn, 25 tbc [swscaler @ 000000000595be40] deprecated pixel format used, make sure you did set range correctly

second this command using vlc with success :

vlc ""

and with no success using opencv (with WITH_FFMPEG=true in cmake) new cv::VideoCapture("");

In debugging I can see file cannot be opened at line 201 of cap_ffmpeg.cpp :

    virtual bool open( const char* filename )

    if( !icvCreateFileCapture_FFMPEG_p )
        return false;
    ffmpegCapture = icvCreateFileCapture_FFMPEG_p( filename );  // ffmpegCapture =0 with my stream
    return ffmpegCapture != 0;

I have check my program with web stream like and it works. So where is my mistake? How can I open this stream? Thanks for yours answers

edit retag flag offensive close merge delete