Giter Club home page Giter Club logo

syncp's Introduction

syncP

A tool to sync mpv player between host and clients. Great help from jaseg/python-mpv, please check it out.

How to use

Requirements

  • libmpv_32bit
  • python3

Steps

Install the wheel package manually by downloading it from releases or using pip install syncP.

[For Windows]

  • You will need to download the libmpv zip from Official Mpv Project, please use the lastest 32 bit version of libmpv.
  • After extracting to a folder, add the path of the folder in your system path variable.
  • To test if the path is set right, execute syncp test and check if the test video plays, you can press q to exit.
  • Assuming the test works, you can now either host a connection or join, I have explained the step below.

[For Linux]

  • Install mpv for you distribution and then try executing syncp test in your terminal.
  • Assuming the test works, you can now either host a connection or join, I have explained the step below.

Using the tool

[For Host]

  • Navigate to the directory with your media file you wanna sync and run syncp host. Follow the instructions on the terminal and this will open a port on your system for communication.
  • You will need to port forward using ngrok or config your router, I would suggest use ngrok tcp feature for this purpose.
  • Optionally you can specify port and limit for number of clients you want to add using the options --limit and --port. The default port is 3456 and limit is 5. Example: syncp host --port 1234 --limit 20

[For Client]

  • Nagigate to the directory with your media file you wanna sync and run syncp client. Follow the instructions where it will ask you for the host url and port.
  • Upon entering the details you can choose the media.

If everything went well you will be connected and the media will begin to play in your own respective mpv windows.

Keybindings

Not all events are synced, for now you can use space to sync pause and play and the host can use s to sync the location of the mediaplayback. I would suggest you better pause before syncing the location. No on screen controls are avaible for now. Default mpv keybindings work and you can find them here.

Disclaimer

This project is in no way perfect and could have multiple bugs I will try to fix along with adding some more features. For now it just works and my gf and I enjoy watching movies together. ๐Ÿ˜

syncp's People

Contributors

lawrathod avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

00mjk

syncp's Issues

Adding Multiple Clients

The host script can only add one client, multi threading for multiple parallel connections so many clients can connect to host.

Improve logging

None of the logs get printed in the cmd/shell when doing any actions. It would be nice to see logs for any action attempted on client and host.

It would also be great if possible to figure out if the attempted action passed or failed.

Can't decide to have the overlay controls

Overlay controls will need to have listeners, one problem I faced while trying to listen to toggle on play/pause was the echo effect and then it could be fixed with a delay. Using listeners for toggles eliminates the need to assign key events and the toggle will work as it should. Need to know if that's something I should spend time on or not?

Playback control should also include speed control

Today the playback control can do the following:

  • Sync on a timestamp (only host can do it which I think is fine by now)
  • Play/Pause (any client/host can do it and it works well today)

We need more playback control options for client/host to be able to do:

  • Increase/Decrease playback control

Playlist support

The app needs to be restarted for every media file that needs to be synced. It would be better to have a playlist support so the media player doesn't restart everytime changing the file.

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.