Page 1 of 1
HTTP Control of HUE, and other Video Effects
Posted: 10 Jul 2018 22:27
by 46hype
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
Re: HTTP Control of HUE, and other Video Effects
Posted: 11 Jul 2018 09:55
by Jean-Baptiste Kempf
Not yet.
Re: HTTP Control of HUE, and other Video Effects
Posted: 17 Feb 2019 20:18
by rkit
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)
Re: HTTP Control of HUE, and other Video Effects
Posted: 12 Jul 2020 22:07
by jackspm
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.
Re: HTTP Control of HUE, and other Video Effects
Posted: 13 Jul 2020 14:32
by Jean-Baptiste Kempf
Yes, in the same way.
Re: HTTP Control of HUE, and other Video Effects
Posted: 14 Jul 2020 00:31
by jackspm
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.
Re: HTTP Control of HUE, and other Video Effects
Posted: 18 Jul 2020 07:10
by jackspm
My guess is close. The command to change the pitch is vlc.var.set(vlc.object.aout(), "pitch-shift", val). Working great.
Re: HTTP Control of HUE, and other Video Effects
Posted: 27 Apr 2022 11:07
by CoolJoe
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?
Re: HTTP Control of HUE, and other Video Effects
Posted: 08 Oct 2022 16:41
by dant98
@CoolJoe did you ever get this to work?
I'd like to apply video cropping via the http control.