kanishka-linux/kawaii-player

Suggestions and feedback on PC-To-PC casting feature

kanishka-linux opened this issue · 1 comments

Recently few commits have been pushed implementing pc-to-pc casting feature. In this feature one can cast local file or playlist managed by kawaii-player from one computer to another computer.

Current Design:

  1. Currently this feature has been designed as master-slave protocol.

  2. In master-slave design, one PC running kawaii-player will be assigned as Master, while another PC running kawaii-player will be assigned as slave.

  3. Master can send audio/video and other playback commands. Slave can receive and play audio/video and execute playback commands as given by master.

  4. It is possible to setup username and password for slave. Authentication will be done via its web interface.

How to use this feature?

  1. Install kawaii-player from master branch on two computers let's say Master and Slave. Add few items in the library of Master and update its Video/Music section.

  2. On Master, go to preferences->Other.

    • Find 'PC To PC Casting' option. Set it to Master from No.
    • Then go to media server section, setup ip address and port number properly and start its media server.
    • Now select any playlist managed by kawaii-player (Here playlist means rightmost column which contains playback entries). Right click playlist, users will see new entry in its contextmenu named 'PC To PC Casting'. From this context menu first setup IP address of slave which master wants to control.
  3. Now repeat similar procedure on slave computer.

    • Enable slave mode on it (Preferences->Other->PC To PC Casting->Slave)
    • Start media server of slave
    • There won't be 'PC To PC Casting' contextmenu in playlist of slave, since its function is to receive commands from master.
  4. Once setup is complete on master and slave, select any playlist of master and from its contextmenu send either single item or entire playlist to slave. For thumbnails, enable 'Preferences->Appearance->List With Thumbnail' option on both.

  5. For controlling other playback activities on slave, enable its remote control functionality.

    • 'Preferences->Media Server->Turn On Remote Control' OR 'More->Turn On Remote Control'
    • Once remote control is enabled on slave, goto its web interface via browser and click 'R:Off' button to enable controlling via web interface and to see expanded controls.

Does it work with chromecast?
No, this feature won't work with chromecast, instead this feature will help users to create their own version of casting device. This feature intends to work as a free, open and cross-platform software solution to audio/video casting. Use any OS of your choice on master and install any OS on slave, and use any browser to control slave. No restrictions whatsoever on users.

Any other benefits apart from being free, open and cross-platform software solution to audio/video casting?

  • Users can get much better playback functionality on slave. As kawaii-player uses mpv/mplayer as a playback engine, there is almost nothing that mpv/mplayer can't play. Almost all popular audio/video formats can be played without any transcoding in original quality.
  • It is possible to exploit full range of options provided by mpv for playback on slave from master. For example: color correction, precise seeking, subtitle rendering, playback speed, taking screenshot (with or without subtitle) etc..
  • Almost zero load on master and minimal load on slave (only required for audio/video playback), as there is no on-the-fly video transcoding.
  • Users can cast entire playlist from master to slave along with thumbnails.

If possible consider providing suggestions and feedback on following points

  1. Currently master client application can send only single entry or entire playlist to slave. What more options are needed on master for controlling slave? mpv provides multiple options, it is almost impossible to provide all of them. But it is possible to implement subset of them. Now the question is what should be that subset, and if more controls are provided then how they should be exposed. Sending various commands to slave via contextmenu of master is tedious, so how should control panel for slave be designed on master for better experience.

  2. Instead of providing more control options on master and cluttering the interface, should more options be provided in web interface. Most users will use web interface (on mobiles) for controlling the slave, as it is convenient. So what control options should be accommodated in web interface apart from existing options?

If users/developers want to discuss any other point not mentioned above (including alternative to master-slave design or authentication) then they are welcome to do so.

Following options have been added to PC To PC Casting Contextmenu of Master

  1. Cast single selected entry
  2. Cast Entire Playlist and play selected entry directly
  3. Send External Subtitle to Slave
  4. Queue Selected item
  5. Set Slave Address
  6. Show More Control Options

In options 1 and 2, the application will automatically search and send subtitle matching name of the video file, if both video and subtitle are in same directory.

In option 6, application will show more control options by opening web interface of slave using internal web browser (either using qtwebkit or qtwebengine). This web interface contains other playback options like play/pause, toggle fullscreen, seeking etc.. Users can open web interface of slave using any external browser of their choice. Only advantage of using internal browser is that it will consume less memory compared to any full fledged browser. If users have setup username/password for slave then authentication can't be done via internal browser, they have to use external browser for it. Once authentication is done, they can use internal browser for controlling it.