Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Using sfemovie, the ending of the movie is always cut off  (Read 2510 times)

0 Members and 1 Guest are viewing this topic.

_Fiction_

  • Newbie
  • *
  • Posts: 35
    • View Profile
Using sfemovie, the ending of the movie is always cut off
« on: April 03, 2019, 11:45:52 pm »
There isn't really a forum for sfemovie so I figured this was my best chance at finding an answer. I am using the newest sfemovie along with SFML 2.4.2.

They include a demo with their library called sfeMovieDemo and thats what I'm using to test this movie.

Here is a link to the mp4 movie, which is a large particle effect type thing:

https://www.dropbox.com/s/kjhnfdie9xmteqe/nexus_core_02.mp4?dl=0


The movie stops maybe half a second to a second before its ending when played with sfeMovie and I get this debug message:

Debug: C:\Users\ficti\Documents\Libs\sfeMovie-master\src\VideoStream.cpp:239: sfe::VideoStream::getSynchronizationGap() - failed computing synchronization gap for video stream, it may become out of sync

I don't really understand the message so I'm hoping someone else does.

Any ideas?

Here is a screenshot showing the final frame played in sfeMovie(left) vs the final frame played in the default windows player(right)


« Last Edit: April 03, 2019, 11:52:29 pm by _Fiction_ »

_Fiction_

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Using sfemovie, the ending of the movie is always cut off
« Reply #1 on: April 16, 2019, 04:05:18 am »
Is there no help to be found for this? I tested on FFMPEG with ffplay.exe and it plays the video until the end. But sfemovie just can't seem to. Would really like some assistance :(

billarhos

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Using sfemovie, the ending of the movie is always cut off
« Reply #2 on: April 16, 2019, 02:00:50 pm »
Hi,
i 've noticed that long time ago.
You can add some frames (dublicate the last) at the end of the video. I know this is not a solution.

However, i think it has to do with the "Synchronization Gap". If you change the function "getSynchronizationGap(sf::Time& gap)" to return always true you will see the last frame. I know also that this is also not a solution to the problem.
Maybe the creator can provide a valid fix for this.


in VideoStream.cpp

bool VideoStream::getSynchronizationGap(sf::Time& gap)
    {
        sf::Time position;
        if (computeEncodedPosition(position))
        {
            gap = (position - codecBufferingDelay()) - m_timer->getOffset();
            return true;
        }
        else
        {
            sfeLogDebug("failed computing synchronization gap for video stream, it may become out of sync");

            //return false; comment this
            return true; //add this one
        }
    }