Giter VIP home page Giter VIP logo

companion-module-videolan-vlc's Introduction

companion-module-videolan-vlc

See HELP.md and LICENSE

V1.0.1

  • Initial Module
  • Bug fixes
  • Indentation Fix

V1.0.2

  • Added "Play ID"

V1.0.3

  • Added Shuffle

V1.1.0

  • Added dynamic variables and feedback
  • (which was required to)
  • Corrected Play by ID

V1.1.1

  • Timer typo

V1.1.2

  • Catch error when password wrong

V1.1.3

  • Playlist length check

V1.1.4

  • Added default host '127.0.0.1'
  • Fixed error typos

V1.1.5

  • Reduce network polling in certain cases
  • Wait for response or timeout before sending next poll
  • Catch stray error when module is disabled
  • Catch empty playback response (issue #21)
  • Assume "Playlist" is the 1st list instead of checking the label.
  • API labels change with locale/language, so it may not be labeled "Playlist" (issue #20)
  • Add option to override $NA for a defined number of playlist items.
  • Add ID option for feedback colors

V1.1.6

  • Prevent re-initializing variables while the module is being disabled

V1.1.7

  • Catch non-JSON response when VLC's password is empty
  • Additional documentation

V1.1.8

  • adjust rgb to self.rgb

V1.1.9

  • Add variables for Time Elapsed

V1.1.10

  • Add clear playlist, add to playlist, add to playlist and play

V1.1.11

  • Core updates / upgrade scripts

V1.1.12

  • Add delete playlist ID
  • Add volume adjust

V1.1.13

  • Prettier

V1.1.14

  • Add Seek to
  • Added missing default

V1.1.15

  • Added variable parsing to actions

V2.0.1

  • Initial V3 refactor

V2.0.2

  • fix missing feedbacks

V2.1.0

  • Update: Add several Toggle actions, improve feedbacks

V2.2.0

  • Add volume and playlist count variables

V2.2.1

  • Don't strip +/- from volume adjustment

V2.3.0

  • Add actions to adjust playback speed/rate

V2.3.1

  • Refactor for some ES6 features

V2.3.2

  • Upgrade base modules

V2.3.3

  • Provide proper 'empty' response to upgrade script

V2.3.4

  • fix some comparison logic

V2.3.5

  • fix comparisons in toggle logic

V2.3.6

  • Add missing default values to presets

V2.3.7

  • anoter refactor for 'pause'

V2.4.0

  • reduce debug log info
  • Allow host name as well as IP

V2.4.1

  • OBO error left variable set when clearing playlist

companion-module-videolan-vlc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

companion-module-videolan-vlc's Issues

Variable/Feedback Additions

  1. Volume Level (Variable & Feedback)
  2. Feedback for # of clips in reserve loaded in playlist. They don't necessarily need to be playing or paused or stopped just currently loaded.

Youtube link in playlist fails module: cannot read property 'name' of undefined

In VLC it's possible to include a Youtube link. This is accomplished by a lua file, you probably need to update it before it work. https://github.com/videolan/vlc/blob/master/share/lua/playlist/youtube.lua

Problem is that when this item is played while the companion module is connected I get an error:
image
Uncaught Exception: cannot read property 'name' of undefined
File ...\videolan-vlc\index.js:458:74.

I'm running companion 2.1.2 (f4bcaf3-2679).

[BUG]

Hello
No matter how we tried, naming Id song starting 1=3, 2=4, 3=5, etc ... we can't get the button to respond right.
A
Screen Shot 2020-10-23 at 4 20 35 PMll t
![Uploading Screen Shot 2020-10-23 at 4.19.56 PM.png…](3 buttons (timer=5, intro=4, outro=3) ... all of them plays the same clip = 1=3
we put them one by one, restarted Companion and VLC .. nothing works for us.

Here are screen shot of what we're trying to achieve.
Screen Shot 2020-10-23 at 4 21 02 PM

VLC becoming unresponsive to button presses.

Been using the plugin on a few machines on a show, they all seem to lose connection to VLC after a while.

VLC & Companion running on the same machine. If I turn the module off and on again it just gets stuck on "Connecting"

If I swap the target IP from the public IP to the Local IP and vice versa it seems to fix the issue temporarily. I also tried changing the port number which again fixed the issue but only temporarily.

VLC Play Specific PlayList Item ID

Describe the feature
I would like to request a option to play a specific playlist item ID. We should be able to input the ID number of the playlist item in order to play it.

Is this platform dependent (windows, mac, ..)?
Not Applicable
If documentation is required to implement, do you know where to find it?
https://wiki.videolan.org/VLC_HTTP_requests/

Command mentioned on the website.
?command=pl_play&id=

Usecases
The user can have a long playlist on VLC, and it should be able to select what item it should be played using the Item ID.

VLC Module current time/total length/remaing time of a playing clip

Like on the Hyperdeck module a few internal variable would be nice that holds the following timers.

time (current postion)
length (total lenght of clip time)
remain (length - time)

The variable will likely hold values in seconds so something like:
time_hms
length_hms
remain_hms
printing the seconds as hh:mm:ss would be better i guess.

This variables are available via the Webinterface of VLC polling the Status Interface at http://$IP:$Port/requests/status.xml
like: http://127.0.0.1:8080/requests/status.xml

see https://wiki.videolan.org/VLC_HTTP_requests/

it respond with an XML starting like:

false
default
0
3
6
969
333
8873
false
......

where "###" is the current position and "###" is the total length of the currently playing file in Seconds.

In the Hyperdeck Module there is a similar solution in place, a poller is started if enabled that on a configurable Intervall fetches the transportInfo and provides that info.

In the QLAB Advanced Module using TCP there is a similar function that requests that data for the current cue and lists like:
$(INSTANCENAME:r_hhmmss): Remaining time for Running Cue as "HH:MM:SS"
$(INSTANCENAME:r_hh): Hours left for Running Cue
$(INSTANCENAME:r_mm): Minutes left for Running Cue
$(INSTANCENAME:r_ss): Seconds left for Running Cue

Which is maybe the most important anyway. The time left until the current clip end.

VLC Feedback not working in v3.0 betas

In version 3.0 beta 5746, VLC's feedback no longer works for:

vlc: Item state
vlc: Loop mode
vlc: Repeat mode
vlc: Shuffle mode
vlc: Full Screen

Thanks!

Companion crash if VLC password is empty when plugin is enabled

If Lua HTTP Password in VLC is empty (not set), Companion crashes when enabling VLC plugin on Win 10 (valid for latest stable Companion release 2.1.2 and for "companion-2.2.0-ef39a2d-2740-win64.exe", containing vlc module version 1.1.5 according to info log)

bild

Enable Shuffle Feature for VLC

Hello Folks,

I would find it useful to have the possibility to enable shuffle (random) mode in playlist.

I already have a fix for it but i don't have write permissions to create a branch / pull request


@ -98,6 +98,7 @@ instance.prototype.actions = function(system) {
		'prev':   { label: 'Previous'},
		'full':   { label: 'Full Screen'},
		'loop':   { label: 'Loop'},
		'shuffle':{ label: 'Shuffle'},
		'repeat': { label: 'Repeat'}


@ -144,6 +145,10 @@ instance.prototype.action = function(action) {
			cmd = '?command=pl_loop';
			break;

		case 'shuffle':
			cmd = '?command=pl_random';
			break;

		case 'repeat':
			cmd = '?command=pl_repeat';
			break;

Jens

companion and vlc set up

Hi there, can someone explain how should we configure VLC and Companion to talk to each other?
Do I need to download any extra installer/plug in for VLC?
What should I set on VLC preferences to receive the messages?
I'm using the local host and didn't change the 8080 port
but can't make it to work..
Thanks

Loop feedback

Is it possible to get a feedback if loop is active or not?
Kind Regards
Koen

Feature request: Delete item from playlist

Thank you for the help implementing playlist functions in #35. I'm hoping we can add what appears to be the http interface's one remaining playlist function: Deleting a specific item from playlist ?command=pl_delete&id=.

I have implemented this but not sure the handling of a default ID is done the best way.

No dynamic variables`using companion pi

I have companion 2.1.1 running great on a Pi4 with ATEM mini, OBS and H2R instances loaded.
Adding the VLC instance I do not see a list of dynamic variables under the instance edit menu. VLC client is responding fine but the dynamic variables do not work.
Loaded companion 2.1.2 on a win10 machine connecting to the same vlc client works fine with the list of dynamic variables showing and working.

I would add I am using dynamic variables with the ATEM instance on the pi no problem.
Screenshot 2020-12-20 192906

VLC remaining time and filenames not showing up in Companion on Mac OS

Hi,

I have been struggling with this issue for a while now. Ik have setup VLC as advised and i can control start, stop, full-screen etc. But i'm not able to make the clip remaining time to work. I have tried reinstalling VLC, tried different settings but nothing worked.

I noticed when watching a video from someone installing VLS in companion that he did this with a Windows system and when he add's the VLS instance he has two more options that the apple version does not have.

These two options are "number of clip names to reserve" and a option that sets "use - for empty?". Maybe that has something to do with it.

Any help would be greatly appreciated.

Hans

How add dynamic variables

Hi, I'm completely new to Companion, but I can handle it a bit. If I look at all the dynamic variables of VLC I see this variable: $ (vlc: r_num). If I look at the buttonpresets, this variable is not in between them. Do I have to add a preset? How? Or do I have to do something else?

Warning Message and no connection

I try to connect VLC and companion.

I tried different versions of both softwares but I always get the following warning in companion, and no connection.

could someone please help me?

Warning Message

<!doctype html> <title>Bitfocus Companion - Admin</title> <script type="module" crossorigin src="/assets/index-DFOWECnU.js"></script> <script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script> <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script> You need to enable JavaScript to run Companion.

<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script> <script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-DzFawMcf.js"></script> <script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-fckjhKxA.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>

Varible speed playback

Is there way that varible speed playback options to Companion ? John Knight Jr may of already addressed this.

Jump Backward, Jump Forward

Could the Very short, shot, medium and long lump forward and backward VLC "hotkeys" get added to Companion to help skip through clips and skip back ?

image

Save button disabled for IPs with a two-digit last octet

Version 3.4.0 (3.4.0+7015-main-c61cc19c)
Docker image

In the VLC module, "Save" is grayed out after entering an IP address with a two-digit number in the last octet.

For example: 192.168.0.9 allows "Save":
image

But 192.168.0.19 doesn't:
image

A three-digit last octet seems fine too:
image

I've tested with many different values in the first 3 octets of the IP address, and this behavior has been consistent. As a workaround, I am able to save the module with the first digit entered (for example: 192.168.0.4) and the other information correct, and then type another digit and save again (eg 192.168.0.41).

companion and vlc set up

Hello,
I have a problem with connecting vlc to companion.
This issue has been in a earlyer topic but the solution for the problem wound't work for me.
I can control vlc trough my webbrowser but i can't give it a command to start or stop truh companion.
I did a new install for companion and vlc but that didn't work either.
Is there a setting that you must turn on to give companion over VLC?

Thanks in advance for your help!
Kind regards,
Marc

problems deleting titles in vlc from companion

hi,

In companion, the VLC_xxxx: Clear Playlist function does not clear the last button indicating the title ($(VLC_portable:pname_x)) from the VLC title list.

For the moment, to delete all the titles on the companion buttons, I have to add one more title to the playlist that I do not display on companion to avoid this problem.

On the other hand, all the titles are removed from the VLC playlist.

loading files

after clear playlist

Thank you for your answers

VLC Volume Up for Companion 3.0

When I use "Set Volume" action to go down by a value like -25 I can use a button to go down in increments of approx. 10%. However the same does not work when I set volume to +25. This worked in 2.4.2 NOT in 3.0

VLC Module upgrade

Hi, would it be possible to update the VLC module to iniclude the ability to record and take a snapshot?

VLC REPEAT - request new functionality - Looping ON/OFF for individual clips

  • I have researched the list of existing Companion modules and requests and have determined this has not yet been requested YES

The name of the device, hardware, or software you would like to control:
VLC

What you would like to be able to make it do from Companion:
Setting for Looping specific clips in the playlist. i.e. a REPEAT On/Off setting pr clip

Direct links or attachments to the ethernet control protocol or API:

Preset play list buttons

Expected behaviour

The value for number of clip names to reserve is used in the preset buttons
image

Actual behaviour

Only 5 preset play list buttons are displayed

image

System

Build version

2.2.0 (2.2.0-56056c0b-3505)

Operating System

Windows 10

Browser

Chrome

Password in VLC

Hi are there any Options to enter a Password which is needed for VLC

VLC Module causes 100% CPU Load on large Playlists (RPi4)

Hello Everyone,

I tracked down an issue with large playlists on raspberry pi.
I have a playlist with roughly 50000 mp3 files. It is a 25MB playlist file !

Whenever I connect the module with my running (and playing) VLC instance the VLC cpu usage spikes to 100%

Therefore VLC comes unresponsive on "next,play,pause,etc..."

I checked the sourcecode and suggest it comes from the

pollPlaylist() {
		// don't ask until connected (we have a valid status response)
		if (this.lastStatus == InstanceStatus.Ok) {
			this.getRequest('/requests/playlist.json', this.updatePlaylist.bind(this))
		}
	}

function as it polls every 500ms !

	startup() {
		this.stopTimers()

		this.reset_variables()

		if (this.config.host && this.config.port) {
			this.updateStatus(InstanceStatus.Connecting)

			this.baseURL = `http://${this.config.host}:${this.config.port}`
			this.headers = {}

			if (this.config.password) {
				this.headers = {
					Authorization: 'Basic ' + Buffer.from(`:${this.config.password}`).toString('base64'),
				}
			}

	---->		this.plPoll = setInterval(() => this.pollPlaylist(), 500)      <---
			this.pbPoll = setInterval(() => this.pollPlayback(), 10)
		} else {
			this.updateStatus(InstanceStatus.BadConfig)
		}
	}

It is a shame I couldn't evaluate further as the code is obfuscated in my companion instance.

[BUG] VLC plugin / play ID command not working anymore

Is this a bug in companion itself or a module?

  • I believe this to be a bug in companion

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi guys, previously I was running a 2.2.0 RC / beta version from April 2021 on Windows 10 - everything was running stable and smooth, the "play ID" command of VLC module was working 100% reliable and smooth.

Last week I installed the lastest official release 2.1.4 and noticed that VLC "play ID" command is not working anymore. No errors, just the fact that nothing happens if the command is triggered.

I then downloaded the latest 2.2.0 RC2 and also in this version the "play ID" command for VLC is not working anymore. So I ended up in "downgrading" to the 2.2.0 RC from April 2021 and everything is working again.

I tried to access VLC via browser using http://127.0.0.1:8080 address - it's accessible in all companion versions I have tried out. So I think the problem might not be located in the VLC module.

Steps To Reproduce

  1. Install and setup VLC module with either latest RC2 or latest official companion build
  2. Create new button with action "vlc: Play ID"
  3. Open VLC player with playlist (make sure ID from step 2 exists in playlist)
  4. Press "Test actions" button and see that nothing happens

Expected Behavior

No response

Environment (please complete the following information)

- OS: Windows 10
- Browser: Chrome 99
- Companion Version: 2.1.4-b03d4f0f

Additional context

No response

Trigger when countdown timer ends (feature request?)

This module is super useful and the recent update with the timer is great! Paired with the Yamaha QL1 module, this setup has been a game changer in our broadcast studio. I was looking for a way to activate a trigger when the timer hits 0, but I'm not sure if this is currently possible. Alternatively, the trigger could be activated when the player changes state from "playing" to "stopped." Basically, I'd like to make stuff happen when the video ends.

Is there a way to achieve this with the current module, or if not, could this be considered for a future update?

Thanks!

Connection to VLC 3.0.0 and up

By default, the web interface is completely locked down – it’s restricted to localhost. To allow access from other computers, you’ll have to edit the web interface’s .hosts file.

This link covers how the process is done, at least for now:
https://www.howtogeek.com/117261/how-to-activate-vlcs-web-interface-control-vlc-from-a-browser-use-any-smartphone-as-a-remote/

Key Info File Location:

  • Windows: C:\Program Files (x86)\VideoLAN\VLC\lua\http (use “Program Files” instead of “Program Files (x86)” on 32-bit versions of Windows.)
  • Mac OS X: /Applications/VLC.app/Contents/MacOS/share/lua/http/.hosts
  • Linux: /usr/share/vlc/lua/http/.hosts

This is partially a reminder to write up some info about the process inside the module or link to a page here on GitHub if the other link breaks

VLC: available variables doesn't work

Hey,

the available variables which shown in the help for videolan vlc doesn't work in my 2.1.2 (f4bcaf3-2679) companion with the latest vlc. The names of the items does not shown up even the remaining time of the playing item. I just got "Play $NA" and "00:00:00" on my Stream Deck and companion no matter which id oder item I choose or is active. The $(vlc:r_stat) is the only variable which works without any issue in my companion. I've tried the other one in totally empty buttons and in combination with Play without any success.

Enhancement: VLC Seek to read Custom Variables

Currently the "vlc: Seek To" Action requires a number in the field.

It would be useful if the field could read Custom Variables. This way, the user could store a specific timecode to a Custom Variable, and then recall that Custom Variable to "Seek" in VLC.

Here's an example screen-shot using a Custom Variable called "tc" (timecode) to seek the play position to 0:24:

vlc-seek-read-variable

Pause/Resume/Toggle has no effect when stopped

Howdy!

As the title says, the action vlc: Pause / Resume does not work if the player is stopped.

I recall that in previous versions, if the player was stopped, this action would bump it into play by default, and then pause/ resume toggle after that.

Can that behavior be reinstated? Or do we need to use the play button separately?

Thanks,
David

vlc: Play ID did not longer work with companion 2.1.1

With the Version 2.1.1 the vlc function Play ID did not work.
Nothing happened when I press the button with e.g. Play ID 4
Play, Pause, Stop and the color responses works fine.

With companion Version 2.0.1-2660 it worked fine.

Working on a Mac 10.15.7 with VLC 3.0.11.1

ps: The new functions with the remaining time of a file did not work ether.

Module crash on song skip

So I was able to crash the module by skipping a song quite a few times now by mistake but I can't repo it anymore.

image

Missing Variables

The preset play list buttons use a variable $(vlc:pname_X) in the button text and it appears to work

This variable is not present in the list of available variables

If you try to copy the text to another button or edit the button etc you get an error

image

image

System

Build version

2.2.0 (2.2.0-56056c0b-3505)

Operating System

Windows 10

Browser

Chrome

Feature request: VLC Volume control

set volume level to (can be absolute integer, percent or +/- relative value):

?command=volume&val=
Allowed values are of the form:
+, -, or %

VLC: How to play a specific playlist file with ID?

There is an http command to play a specific file from playlist with corresponding ID -
?command=pl_play&id=
how can i use this with companion or is ist possible to have that command directly in the VLC instance??

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.