Ask Your Question
0

VideoReader_GPU Problem

asked 2013-03-08 07:22:03 -0600

I'm trying to read a video using cv::gpu::VideoReader_GPU but it reads only about 80% of the video and stops. I tried with different video formats and sizes, but the problem is the same. Can someone help me?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-03-08 07:33:46 -0600

Simple thing, when using videoReader_GPU, the video data is stored in GPU data memory. If it stops at 80% it means that your assigned GPU data memory is full. Cut your video into parts, feed whole parts to the GPU and then process them. This will do the trick.

edit flag offensive delete link more

Comments

Thanks for your help! However I don't now if this is the problem because i tried with smaller videos and the problem was the same. For example, one video has frame size 320 x 240 and 169 frames but videoReader_GPU reads only 150 frames. The other has frame size 400 x 224 and 4289 frames and it reads 3445 frames. Do you have any idea of what is wrong?

Thanks!

susilvaalmeida gravatar imagesusilvaalmeida ( 2013-03-08 08:15:54 -0600 )edit

Have no clue here, lets wait for some guidance :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-03-08 08:22:14 -0600 )edit
0

answered 2013-11-12 12:51:04 -0600

reza gravatar image

I have same problem, and the issue wont change with different size or length of video. IT will throw: Unsupported format or combination of formats (Unsupported video source) in grab, file /home/reza/Templates/opencv-2.4.6.1/modules/gpu/src/video_reader.cpp

I have tried it with many video files

edit flag offensive delete link more

Comments

Was this issue ever resolved? I am getting the same issue in 2.4.9 .

antz24 gravatar imageantz24 ( 2015-04-07 12:28:33 -0600 )edit

@antz24 simply said, do not use 2.4.9 but go grab the bugfree 2.4.11 version!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-08 01:25:40 -0600 )edit

@StevenPuttemans I tried the new version but the issue still seems to occur. I was able to trace it down to the HandlePictureDisplay callback function. I added counters to the HandlePictureDecode and HandlePictureDisplay to verify they are both counting the same amount of frames but i found the HandlePictureDisplay stops before the video is done. The HandlePictureDecode callback is counting the correct amount of frames though. Do you know why this could be?

antz24 gravatar imageantz24 ( 2015-04-16 12:11:55 -0600 )edit

Hmm it seems to point at a corrupt video format ... Could you try to grab the details of the last frame it can visualise and the following frame that doesn't work anymore?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-17 03:27:24 -0600 )edit

Figured it out! There is a bug in the grab function of the video_reader.cpp file. The code is returning false before the frameQueue_ is empty . The code has to go into the infinite for loop and dequeue the frames, if not there will be frames missing at the end. I had to comment out frameQueue_->isEndOfDecode and create my own return. I can send my source if needed.

antz24 gravatar imageantz24 ( 2015-04-17 15:54:10 -0600 )edit

@antz24 it could be nice if you supported the fix yourself through a PR, to the 2.4 branch. More info on how to do so can be found here. If not; let me know and I will do it myself.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-18 07:27:15 -0600 )edit

I created a bug issue here but i don't know how to add the fix. Do you know how to do this?

antz24 gravatar imageantz24 ( 2015-04-20 12:06:51 -0600 )edit

in your bug reply you are talking about 2.4.9, first download the latest 2.4 branch on github to see if it has been fixed there please.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-21 01:55:58 -0600 )edit
1

I did. I updated to 2.4.11 version as you stated above but the bug was still there. I haven't updated the ticket yet but I will now.

antz24 gravatar imageantz24 ( 2015-04-21 11:15:24 -0600 )edit

Question Tools

Stats

Asked: 2013-03-08 07:22:03 -0600

Seen: 1,279 times

Last updated: Nov 12 '13