HTTP Control of HUE, and other Video Effects

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
46hype
New Cone
New Cone
Posts: 2
Joined: 14 Jun 2018 04:27

HTTP Control of HUE, and other Video Effects

Postby 46hype » 10 Jul 2018 22:27

Hi Folks.

Is there any VLC remote control mechanism (preferably with an HTTP or telnet interface) to control the video effects of the VLC playback ?

I am particularly interested in remotely controlling HUE, GAMMA and BRIGHTNESS.

Thanks

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: HTTP Control of HUE, and other Video Effects

Postby Jean-Baptiste Kempf » 11 Jul 2018 09:55

Not yet.
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.

rkit
New Cone
New Cone
Posts: 1
Joined: 16 Feb 2019 05:01

Re: HTTP Control of HUE, and other Video Effects

Postby rkit » 17 Feb 2019 20:18

Find httprequests.luac file, remove it, and place this one instead. You have to run vlc with "--video-filter adjust" for it to work. Use it like this : /requests/status.xml?command=brightness&val=1.2

I've added those lines

Code: Select all

elseif command == "brightness" then vlc.var.set(vlc.object.vout(), "brightness", val) elseif command == "gamma" then vlc.var.set(vlc.object.vout(), "gamma", val) elseif command == "saturation" then vlc.var.set(vlc.object.vout(), "saturation", val) elseif command == "contrast" then vlc.var.set(vlc.object.vout(), "contrast", val) elseif command == "windowsize" then os.execute("xdotool search --name vlc windowsize " .. val)

jackspm
Blank Cone
Blank Cone
Posts: 14
Joined: 10 Apr 2020 00:05

Re: HTTP Control of HUE, and other Video Effects

Postby jackspm » 12 Jul 2020 22:07

Find httprequests.luac file, remove it, and place this one instead. You have to run vlc with "--video-filter adjust" for it to work. Use it like this : /requests/status.xml?command=brightness&val=1.2
Just wondering if this is possible to control audio effects as well...in particular, audio pitch. Thanks.

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: HTTP Control of HUE, and other Video Effects

Postby Jean-Baptiste Kempf » 13 Jul 2020 14:32

Yes, in the same way.
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.

jackspm
Blank Cone
Blank Cone
Posts: 14
Joined: 10 Apr 2020 00:05

Re: HTTP Control of HUE, and other Video Effects

Postby jackspm » 14 Jul 2020 00:31

Thanks for the quick reply. However, can you provide more info? rkit has added lines to adjust brightness, gamma, etc... I looked through the script, the only audio effect adjustment is for equalizer. Nothing for pitch adjustment. I guess I can follow the same format and add adjustment for audio pitch. If that's the case, my question is...what is the syntax for audio pitch adjustment? something like vlc.var.set(vlc.object.aout(), "pitch_scale", val)? Any info is appreciated. Thanks.

jackspm
Blank Cone
Blank Cone
Posts: 14
Joined: 10 Apr 2020 00:05

Re: HTTP Control of HUE, and other Video Effects

Postby jackspm » 18 Jul 2020 07:10

My guess is close. The command to change the pitch is vlc.var.set(vlc.object.aout(), "pitch-shift", val). Working great.

CoolJoe
New Cone
New Cone
Posts: 1
Joined: 26 Apr 2022 12:16

Re: HTTP Control of HUE, and other Video Effects

Postby CoolJoe » 27 Apr 2022 11:07

Find httprequests.luac file, remove it, and place this one instead. You have to run vlc with "--video-filter adjust" for it to work. Use it like this : /requests/status.xml?command=brightness&val=1.2

I've added those lines

Code: Select all

elseif command == "brightness" then vlc.var.set(vlc.object.vout(), "brightness", val) elseif command == "gamma" then vlc.var.set(vlc.object.vout(), "gamma", val) elseif command == "saturation" then vlc.var.set(vlc.object.vout(), "saturation", val) elseif command == "contrast" then vlc.var.set(vlc.object.vout(), "contrast", val) elseif command == "windowsize" then os.execute("xdotool search --name vlc windowsize " .. val)

Did ANYBODY succeed in doing this modification? I tried the code above, but none of the new variables "brightness", "gamma", etc. can be modified via LUA:

Code: Select all

curl "http://127.0.0.1:8080/requests/status.xml?command=gamma&val=1.5" <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Error loading /requests/status.xml</title> </head> <body> <h1>Error loading /requests/status.xml</h1><pre>...\lua\intf\modules\httprequests.lua:206: VLC lua error in file ../../extras/package/win32/../../../modules/lua/libs/variables.c line 108 (function vlclua_tovalue)</pre> <p> <a href="http://www.videolan.org/">VideoLAN</a><br/> <a href="http://www.lua.org/manual/5.1/">Lua 5.1 Reference Manual</a>

I also tried doing so over Telnet and implemented these variables in cli.lua - similar errors.
What's going wrong?

dant98
New Cone
New Cone
Posts: 1
Joined: 08 Oct 2022 16:02

Re: HTTP Control of HUE, and other Video Effects

Postby dant98 » 08 Oct 2022 16:41

@CoolJoe did you ever get this to work?
I'd like to apply video cropping via the http control.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests