Giter Site home page Giter Site logo

Comments (7)

turingmachine avatar turingmachine commented on June 24, 2024

Hi Zoran

Unfortunately syncing behavior is dependent on the quality of the movies that you are trying to play. A 1080p video behaves different than a 720p video. There is constant at the beginning of the omxplayer-sync script called SYNC_WINDOW. This parameter needs to be adapted according to the content you want to play.

You can determine the correct sync window for your content by following these steps:

  1. prepare two rasperries with a single testfile and a direct ethernet connection
  2. start one player as master in verbose mode: omxplayer-sync -muv synctest.mp4
  3. start one player as slave in verbose mode: omxplayer-sync -luv synctest.mp4
  4. wait until the slave syncs to the master and then note down the value of the moving_deviation verbose output of the slave
  5. if it says for example -0.12 adjust the SYNC_WINDOW constant at the top of the omxplayer-sync script as follows:

before

SYNC_WINDOW = (-0.30, -0.25)

after

SYNC_WINDOW = (-0.18, -0.13)

The rule is: add the value of moving_deviation to the first value, the second value is always 0.05 lower. Basically this means the slave will start to play file when still 0.18 seconds ahead. Because the slave takes some time to start the movie.

from omxplayer-sync.

surfingobo avatar surfingobo commented on June 24, 2024

Hi turingmachine

I have tried to follow your instructions above, however your instructions are slightly contradictory. You say to ADD the moving_deviation to the SYNC_WINDOW value however you have SUBTRACTED it (i.e. -0.30 - (-0.12) = -0.18. Please could you clear this up? What is the role of the second value out of interest?

Cheers

from omxplayer-sync.

turingmachine avatar turingmachine commented on June 24, 2024

You you are right, there are inconsistencies in the explanation. So basically negative values mean that you are ahead in time. So if you see a moving_deviation of -0.12, it means that the slave is 0.12 seconds ahead of the master. A positive value means that the slave is behind the master. The values for the SYNC_WINDOW are always negative values. The sync mechanism works as follows: The slave jumps 2 seconds ahead of the master, switches to pause mode and waits until the difference in time between master and slave is within the SYNC_WINDOW range. That's when the slave will resume playback. Only the first value of the SYNC_WINDOW is really relevant, the second value just has to be 0.05 seconds higher. So if you end up being ahead of the master after sync (negative moving_deviation values) you need to raise the SYNC_WINDOW values (closer to 0). If you end up being behind the master (positive moving_deviation values) you need to lower the SYNC_WINDOW values.

from omxplayer-sync.

surfingobo avatar surfingobo commented on June 24, 2024

Cheers that helped :) Now using this principle, would it be possible to develop the code a little further so that ALL the videos started a little early to get rid of the pause between the end and start of the videos?

from omxplayer-sync.

turingmachine avatar turingmachine commented on June 24, 2024

What kind of pause between end and start of the videos do you mean exactly?

from omxplayer-sync.

surfingobo avatar surfingobo commented on June 24, 2024

When the video is looping there is a black screen between the video finishing and restarting

On 24 Nov 2014, at 10:24, Simon Josi [email protected] wrote:

What kind of pause between end and start of the videos do you mean exactly?


Reply to this email directly or view it on GitHub #13 (comment).

from omxplayer-sync.

turingmachine avatar turingmachine commented on June 24, 2024

This is a totally different issue and i suggest you open a new issue for that. It would be fairly difficult to get rid of it completely as omxplayer-sync needs to spawn a new omxplayer process for every file. This because omxplayer itself only supports playing one file per invocation.

from omxplayer-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.