Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot open some video files in OpenCV 2.4.13 for Java

Hi,

I have a problem regarding opening video files. I recently created an .avi-file from a bunch of images that I had taken from a camera. When I tried to open this using the following line of code,

VideoCapture vidCap = new VideoCapture("C:/somePathOnC/fileName.avi");

everything worked fine. However, when I try another video file, for instance the example video from this example. Video file is called bouncingBall.avi This, however, won't work. The program does not open up the video file, and no errors are shown.

The same happens with another video file I took from my IP-camera. The program I used to record the file, iSpy, saved the file as .mp4. Since this didn't work, I tried to convert it to .avi with different "codecs". I have so far tried all of the settings that the converter program offers. These are:

  • H.264 /MPEG-4 AVC video format
  • AVI-audio-video interleaved
  • XViD-movie
  • Lossless uncompressed AVI
  • AVI with DV-coded

So now, I'm out of ideas on how to solve this. I have done some search about an issue regarding FFMPEG, but I do not understand how to resolve that.

Thank you.

Cannot open some video files in OpenCV 2.4.13 for Java

Hi,

I have a problem regarding opening video files. I recently created an .avi-file from a bunch of images that I had taken from a camera. When I tried to open this using the following line of code,

VideoCapture vidCap = new VideoCapture("C:/somePathOnC/fileName.avi");

everything worked fine. However, when I try another video file, for instance the example video from this example. Video The video file in that example is called bouncingBall.avi bouncingBall.avi. This, however, won't work. The program does not open up the video file, and no errors are shown.

The same happens with another video file I took from my IP-camera. The program I used to record the file, iSpy, saved the file as .mp4. Since this didn't work, I tried to convert it to .avi with different "codecs". I have so far tried all of the settings that the converter program offers. These are:

  • H.264 /MPEG-4 AVC video format
  • AVI-audio-video interleaved
  • XViD-movie
  • Lossless uncompressed AVI
  • AVI with DV-coded

So now, I'm out of ideas on how to solve this. I have done some search about an issue regarding FFMPEG, but I do not understand how to resolve that.

Thank you.

Cannot open some video files in OpenCV 2.4.13 for Java

Hi,

I have a problem regarding opening video files. I recently created an .avi-file from a bunch of images that I had taken from a camera. When I tried to open this using the following line of code,

VideoCapture vidCap = new VideoCapture("C:/somePathOnC/fileName.avi");

everything worked fine. However, when I try another video file, for instance the example video from this example. The video file in that example is called bouncingBall.avi. This, however, won't work. The program does not open up the video file, and no errors are shown.

The same happens with another video file I took from my IP-camera. The program I used to record the file, iSpy, saved the file as .mp4. Since this didn't work, I tried to convert it to .avi with different "codecs". I have so far tried all of the settings that the converter program offers. These are:

  • H.264 /MPEG-4 AVC video format
  • AVI-audio-video interleaved
  • XViD-movie
  • Lossless uncompressed AVI
  • AVI with DV-coded

Also, please not that I've tried to have both of the files in the same folder, but it still didn't work.

So now, I'm out of ideas on how to solve this. I have done some search about an issue regarding FFMPEG, but I do not understand how to resolve that.

Thank you.