VLC interface script for Syncplay 1.2.6

Discuss your Lua playlist, album art and interface scripts.
Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

VLC interface script for Syncplay 1.2.6

Postby Etoh » 15 Jun 2013 22:00

Hello all,

As you may know from some of my previous posts and messages on the #VideoLAN IRC channel, I have been hard at work over the past few months helping to add VLC support to the video playback synchronisation tool Syncplay. The existing VLC interfaces did not have all the features I needed, so with the help of posts on this forum I made a special interface for communication between Syncplay and VLC. Syncplay is available from: http://syncplay.pl/ and the VLC/Syncplay interface script is available from: https://raw.github.com/Uriziel/syncplay ... ncplay.lua - who knows, this interface might be helpful for other projects as well. A full description of the protocol appears at the top of the file.

NOTE: To use with VLC 2.1 nightlies change the line "while not vlc.misc.should_die() do" to "while true do" within syncplay.lua.

Syncplay synchronises video playback across multiple instances of VLC so that a group of people who all have the same videos can watch them together. Pausing, unpausing and jumping position within a media player is all synchronized, giving everyone connected to the same virtual room a shared viewing experience. Syncplay differs from VLC's netsync function in that all viewers connect to a server and anyone in the same viewing session can control the playback.

Syncplay for VLC has only really been tested on Windows with VLC 2.0.6/2.0.7. It works for some people on Linux, but not for others. If there are any Linux-using Python testers out there who want to figure out why then that'd be great. Similarly, Syncplay waits for 5 seconds before connecting to VLC so that it can connect on the first attempt on slower systems so it'd be great if someone could write some Python code to allow for multiple connection attempts so that this value can be lowered.

To use Syncplay with VLC, users need the Syncplay interface module for VLC. The interface allows Syncplay to query VLC as to what video the user is playing and their position, as well as whether the video or not the video is paused. Furthermore, it allows Syncplay to play, pause and seek within the video, load a new video, and display messages on the OSD.

The interface can be installed when the user installs Syncplay. Optionally, it can be installed by placing the syncplay.lua file in one of the following folders:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\intf\
* Windows (current user): %APPDATA%\VLC\lua\intf\
* Linux (all users): /usr/lib/vlc/lua/intf/
* Linux (current user): ~/.local/share/vlc/lua/intf/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/intf/

P.S. The VLC Addon entry is available from: http://addons.videolan.org/content/show ... ent=159160

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC interface script for Syncplay 1.2.6

Postby Jean-Baptiste Kempf » 17 Jun 2013 17:52

This is cool.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

NoMoreNicksLeft
Blank Cone
Blank Cone
Posts: 21
Joined: 06 Aug 2012 19:39

Re: VLC interface script for Syncplay 1.2.6

Postby NoMoreNicksLeft » 18 Jun 2013 02:55

The Mac OSX directory is wrong, every time they upgrade to the latest version, anything in /Applications/VLC.app will be blown away.

They should install it in ~/Library/Application Support/org.videolan.vlc/lua/intf/ instead.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 18 Jun 2013 09:54

The Mac OSX directory is wrong, every time they upgrade to the latest version, anything in /Applications/VLC.app will be blown away.

They should install it in ~/Library/Application Support/org.videolan.vlc/lua/intf/ instead.
Cheers, I've updated it to include the location you suggested.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 26 Jun 2013 23:44

I am currently working on Syncplay 1.2.7 which will have better streaming support for VLC and will remove the pause that occurs when running Syncplay with VLC.

However, for Syncplay to support VLC 2.1.X the bug at https://trac.videolan.org/vlc/ticket/8882 would need to be addressed as it prevents the communication between Syncplay and VLC on Windows (unless you can think of an alternative).

There is at least one other bug which affects 2.1.X that I know of, but until that is fixed it is hard to test for more. The feature allowing people to load files in VLC via the Syncplay main window uses a command which does not seem to work in 2.1.X, which would require https://trac.videolan.org/vlc/ticket/8869 to be fixed. I also encountered issues trying to set the position of a file to 0 when loading "Windows Movie Maker Sample File.wmv" on an earlier version of 2.1.X but as the more recent versions of 2.1.X do not work with Syncplay I do not know whether this has already been resolved.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 09 Nov 2013 22:17

Syncplay 1.2.7 Release Candidate 1 is now available from http://syncplay.pl/Syncplay_1.2.7_RC1_Setup.exe (Windows installer) and https://github.com/Uriziel/syncplay/arc ... 2.7rc1.zip (Linux source code).

Feedback and bug reports appreciated. It now works with VLC 2.0 & 2.1 (and probably 2.2) on Linux and VLC 2.0 on Windows.

To get it to work with VLC 2.1 & VLC 2.2 on Windows you need to replace the syncplay.lua file in %ProgramFiles%\VideoLAN\VLC\lua\intf\ folder with https://raw.github.com/Uriziel/syncplay ... ncplay.lua. VLC 2.1/2.2 does not support --data-path so it has to be in that folder.

Changes to VLC support:
* Improved stream support for VLC: allows URLs in configuration window and uses stream title
* Improved loading code for VLC: now waits just as long as needed instead of 5 seconds before connecting to VLC
* Graceful close for versions of VLC that do not support Syncplay (e.g. VLC 2.1 on Windows)
* If VLC 2+ is installed then the option to install syncplay.lua is checked by default in Syncplay installer
* VLC instructed to use the Syncplay copy of syncplay.lua if an acceptable version is not installed in the VLC intf folder (cheers to jb for pointer on how to do this)
* Fixed problem with VLC in locales where the decimal point is a comma
* Added VLC command-line arguments to override quiet and single instance modes (as they cause Syncplay to not work properly).
Other changes include:
* Added filename and file size privacy settings
* Added 'Pause when user leaves' option
* Various UI improvements
* Better network code.
Full changelog listed at http://syncplay.pl/syncplay-1-2-7-rc1/

p.s. Support for MyAnimeList isn't currently working due to issues over at MAL - some changes might be needed before the final release to get it to work again.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 16 Nov 2013 17:16

The second release candidate of Syncplay 1.2.7 is now available from: https://github.com/Uriziel/syncplay/rel ... g/1.2.7rc2

Note: For VLC to work interface file logging needs to be enabled – this will be fixed in RC3.

In addition to the general changes in Syncplay noted in relation to RC1, we have some bug fixes and general improvements for RC2:
  • Syncplay support for VLC 2.1+ on Windows – Works, except if you don’t have the Syncplay script installed it will not use the version in the Sycplay folder due to that functionality being removed from VLC.
  • Fixed the issue with utf8 filenames hashing
  • Fixed error that could occur when processing an empty player list
Still waiting to hear back from MyAnimeList regarding getting access to their API. Until then the MAL functionality will probably remain broken.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 27 Nov 2013 00:39

RC3 is out now: https://github.com/Uriziel/syncplay/rel ... g/1.2.7rc3

* Improved VLC support (in RC2 you needed to have interface file logging enabled)
* MyAnimeList support has been temporarily disabled, because it isn’t currently working.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 22 Feb 2014 12:44

Syncplay 1.2.7 RC4 is out: http://syncplay.pl/syncplay-1-2-7-rc4-now/ and it works far better with VLC than in previous versions.

Key changes:
  • Added more VLC player paths to search for
  • Various tweaks to syncplay.lua
  • VLC support now installs by default on Linux
  • Improved UTF-8 support in userlist
  • Fixed bug where VLC would not close properly (i.e. it would disappear, but process would never end)
Available from: https://github.com/Uriziel/syncplay/rel ... g/1.2.7rc4
(plus blaenk made an archlinux package and Richi is currently working on a Debian package.)

This should be pretty close to the final release of 1.2.7, so please let me know of any bugs with the VLC implementation!

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 04 Apr 2014 16:28

Syncplay 1.2.7 is now out, and available from: http://syncplay.pl/download/

Syncplay 1.2.7 uses version 0.1.7 of the VLC syncplay.lua script rather than the newer version 0.1.8 version.

Version 0.1.8 of syncplay.lua includes initial VLC DVD playback synchronisation support. It would be helpful if people could let me know if this works or not!

If you want version 0.1.8 of the interface script to test the DVD synchronisation support then you can get it from https://raw2.github.com/Uriziel/syncpla ... ncplay.lua and install it to:
  • Windows: %ProgramFiles%\VideoLAN\VLC\lua\intf\
  • Linux: /usr/lib/vlc/lua/intf/
  • Mac OS X: /Applications/VLC.app/Contents/MacOS/share/lua/intf/
You either want to install Syncplay first then the new syncplay.lua script second, or deselect the installation option to install the syncplay.lua script when installing Syncplay (or else you will be downgraded to version 0.1.7 of syncplay.lua).

It would be helpful to know more generally how well VLC works with Syncplay for you (especially for Linux and OS X users, but also if you are using Windows). If there are any problems then I want to be able to fix them (and if it works then I want to be able to relax :D).

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 27 Apr 2014 23:18

Syncplay 1.2.8 out now.

Highlights:
  • Added initial support for DVD sync with VLC
  • Fixed issue with VLC and Windows XP
  • Allows command line interface to be opened without PySide being installed (reported by /u/supersaw7)
  • Fixed makefile handling of single user installations (code contributed by joelixny)
It's available from https://github.com/Uriziel/syncplay/releases/latest

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 24 Jul 2014 23:52

Syncplay 1.2.9 Release Candidate 1 out now for testing, available from https://github.com/Uriziel/syncplay/rel ... /1.2.9-RC1

It uses the newer v0.2.2 Syncplay Interface, and has the following VLC fixes:
  • Fixed UTF-8 not working when loading files into VLC via Syncplay (prompted by nnamrrehdlopoel)
  • Fixed VLC not displaying UTF-8 characters in OSD messages
  • Fixed VLC interface using excessive CPU (adapted from code by DerGenaue)
  • Fixed bug where closing VLC directly from VLC did not close Syncplay and did not end the LUA script
  • Fixed VLC closing at end of playlist (by using –play-and-pause switch)
  • Fixed VLC bug setting position >1000 on locales with thousand separator enabled (thanks tompreuss)
  • Fixed VLC bug with eternal waits on no-input response (thanks tompreuss)
  • (Hopefully) Fixed VLC title bug, where title was erroneously set to 1 during input change
Hilights include:
  • Improvements config window with greater access to control Syncplay functionality (e.g. OSD messages and rewind/slowdown thresholds).
  • VLC stays open after all files have finished playing, so so you do not have to re-open the player.
  • If a user pauses while the leave message is displayed, it now states both that someone left and that someone paused. (Really useful if someone has “Pause when user leaves” enabled!)
Full changelog at http://syncplay.pl/changelog/ - let me know if you find any bugs.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 12 Aug 2014 21:19

Syncplay 1.2.9 is out now, with improved OSX instructions.

Oh, and fixed the bug which made public servers not work in RC1.

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 09 May 2015 16:41

Syncplay 1.3.0 RC1 is now available from http://syncplay.pl/syncplay-1-3-0/ - New features include the readiness indicator, better support for VLC, and managed rooms (which makes it better for hosting larger viewing parties).

It includes version 0.2.6 of the syncplay.lua file (also available here), with the biggest change to the interface being the addition of a version check feature to ensure people are on 2.2.1+ (as some on older versions were having problems).

Etoh
Blank Cone
Blank Cone
Posts: 60
Joined: 12 Jan 2013 16:33

Re: VLC interface script for Syncplay 1.2.6

Postby Etoh » 18 Nov 2017 11:00

Syncplay 1.5.0 released at http://syncplay.pl/syncplay-1-5-0/ with Mac proper support, better VLC support for the shared playlist feature, and a chat feature.

The -256 volume trick in Syncplay/VLC INTF Script 0.3.3 doesn't wok for detecting VLC was closed on Mac, so we now use Syncplay to monitor VLC's STDERR/STDOUT messages for "[syncplay] core interface debug: removing module" as per PR #151.

WolLoth
New Cone
New Cone
Posts: 1
Joined: 17 May 2020 23:06

Re: VLC interface script for Syncplay 1.2.6

Postby WolLoth » 17 May 2020 23:31

Hi, I'm new in this forum and didn't find an answer for my problem, so I put this question to the nearest post!
I want to get synchchronized audio and video playback, so I started to use SyncPlay 1.6.4a with VLC 3.0.8/10 on MAC OS 10.14.6, but it won't work together !!!
Problem looks like a missing handshake back from VLC to SyncPlay after initialising, so VLC is triggered to play the desired track i.e. it starts , but then SyncPlay argues: "lua interface error" .... "Cannot listen to localhost: XXXXX", and XXXXX is not a fixed value, but changes with every program start.
Is any one around who has an idea how to get them collaborating ??

Regards Wolfgang


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 4 guests