-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vis problem : Skipping frame 2 ...49 #15
Comments
Thanks for the investigation. I've fixed this bug. Could you check if it works now for you? |
Thank you for responding and fixing the bug. Actually i made it working this afternoon by adding the option --occupancy in both mpegflow and vis, otherwise it doesn't work. I will restrart from the begining and test with many videos and let you know. Thanks. |
Thank you, Vadim. you fixed most of the issues. In my case, I still need to link to /urs/local/lib. With another video sequence with high resolution, even skipping dummies doesn't solve it, my algorithm still skips some frames not all of them. |
The same happens to me. With dummies it doesn't work, but without them skips too many frames. |
You can check the Group of Pictures (GOP) structure of your file by sth like |
In my case, commenting dummy helps a lot with bad alloc issue. But when I use mp4 instead of avi format video it can't give right motion vector on each frame. It seems that all the vector value in P frame is 0 and only vectors in B frame is non-zero. |
In theory, it doesn't skip specifically B-frames, it just tries to extract the motion vector info if it's filled in by ffmpeg: https://github.com/vadimkantorov/mpegflow/blob/master/mpegflow.cpp#L155 Will be happy to take a patch that fixes dummies and the mem leak. |
Dear Vadim
Thank you for sharing your code. I had some problems with make vis. Finally i linked vis.ccp with openCV 3.2 and changed the Makefile INSTALLED_DEPS = -I/usr/local/include -L/usr/local/lib. . make vis worked.
When I run "mkdir -p examples/vis_dump && ./mpegflow examples/mpi_sintel_final_alley_1.avi | ./vis examples/mpi_sintel_final_alley_1.avi examples/vis_dump", the vis doesn't work fine. Actually, It skips all the frames from 2 to 49 but without any errors.
If i used mpegflow with --raw option, it starts skipping from the 3rd frame.
I added a line in the main function of vis.cpp to display flow.second from the function read.flow
inside the loop for
fprintf(stderr,"flow second = %d.\n", int(flow.second));
It always returns -1
I want to say that i received warnings when compiling mpegflow and vis regarding the types, example:
"mpegflow.cpp:293:128: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=]
lld frame_index=%d pict_type=%c output_type=raw shape=%zux4\n", pts, frameIndex, pictType, motionVectors.size()); "
So the problem comes from the https://github.com/vadimkantorov/mpegflow/blob/master/vis.cpp#L72
I tried many types lld ld to match vis and mpegflow but nothing happens
Thank you for your consideration
The text was updated successfully, but these errors were encountered: