Skip to content
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

onVideoEnd sometimes does not fire #87

Closed
adamkalicinscy opened this issue Aug 25, 2016 · 7 comments
Closed

onVideoEnd sometimes does not fire #87

adamkalicinscy opened this issue Aug 25, 2016 · 7 comments

Comments

@adamkalicinscy
Copy link

I have playlsit with 2 videos (30fps h264) with endless loop loading in non-texture mode. Sometimes one video ends and onVideoEnd does not file and next video can not load.

There is no error and it happens randomly. Sometimes after 3 loops sometimes after 100.

I have Raspberry Pi 3 with latest wheezy

@adamkalicinscy
Copy link
Author

I tested it on files from the phone, which had a variable frame rate (18.676 fps - 30.477 fps). It could be a problem.
Now I am testing files with a fixed number of frames, and it seems to be ok.

@adamkalicinscy
Copy link
Author

The problem still appears now after 7 hours and 280 video playbacks

@jvcleave
Copy link
Owner

is it a particular movie it is failing on or different ones?

You could try moving onVideoEnd() up to here
https://github.com/jvcleave/ofxOMXPlayer/blob/master/src/ofxOMXPlayerEngine.cpp#L307

@adamkalicinscy
Copy link
Author

adamkalicinscy commented Aug 27, 2016

Videos are Timecoded_Big_bunny_1.mov and http://pdl.warnerbros.com/wbmovies/gravity/trailer2/GRAVITY_TRAILER_5-1080.mov and it stops on second one last frame.

I need a solution that is reliable and works non-stop 24 hours a day. For now I've done the dirty solution but reliable. I rely on the system time and length of the movie getDurationInSeconds. I will check your hint but unfortunately probably again I have to wait at least seven hours on the result :/

By the way, I discovered one more thing. For the film Timecoded_Big_bunny_1.mov getCurrentFrameat some point it is much higher than getTotalNumFrames. Someone has already had a problem with it Hemisphere-Project/HPlayer#34

@adamkalicinscy
Copy link
Author

Now after 30h loop I have "Segmentation Fault" and app crashes :/

@jvcleave
Copy link
Owner

jvcleave commented Aug 30, 2016

Without the fix above, another thing to try here
https://github.com/jvcleave/ofxOMXPlayer/blob/master/src/ofxOMXPlayerEngine.cpp#L284

            isCacheEmpty = !videoPlayer->getCached();
#if 0
            if (hasAudio)
            {
                if (!audioPlayer->getCached() && !videoPlayer->getCached())
                {
                    isCacheEmpty = true;
                }
            }
            else
            {
                if (!videoPlayer->getCached())
                {
                    isCacheEmpty = true;
                }
            }
#endif       

I think the audio cache is getting an incorrect value/not decrementing to 0 at times.

If you are not using audio, disabling it in ofxOMXPlayerSettings may work as well

@adamkalicinscy
Copy link
Author

Ok I will try enableAudio = false. I had only useHDMIForAudio = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants