Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Most likely the problem is with ffmpeg and the used video codec. Could you share one of these videos? then we can check the codec and see what's wrong. Also we don't know what ffmpeg version you've got on your system. </p> <p>Just side note, why are you mixing the cv and cv2 interfaces? the code would look better by using just the cv2 interface.</p> <p><strong>Edit:</strong> I forgot to mention, I tested the code, so certainly the problem isn't in the code.</p> <p><strong>Edit 2:</strong> It's likely the problem is with ffmpeg not being able to handle your videos. Without testing the videos in question it's hard to say. You can give the cv2 interface a try, <a href="http://opencv.itseez.com/modules/highgui/doc/reading_and_writing_images_and_video.html?h#videocapture-videocapture" rel="nofollow">cv2.VideoCapture</a> is what you should use to grab frames from a video file.</p> <p><strong>Edit 3:</strong> I had a look at the video, it seems the way OpenCV uses ffmpeg has a problem with your video. A quick workaround is to process your videos with ffmpeg before opening by OpenCV. <code>ffmpeg -sameq -i normal.avi p_norma.avi</code> gives you a video, <code>p_norma.avi</code>, that you can process by OpenCV without problem. For <code>normal.avi</code>:</p> <pre><code>Selected video codec: [rawbgr8flip] vfm: raw (RAW BGR8) </code></pre> <p>and for the generated video <code>p_norma.avi</code>:</p> <pre><code>Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4) </code></pre> <p>Hence, the generated video is about 10 times smaller. Would that be a possible solution for you?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload