Comments (10)
glualint is a validator for a specific variant of lua used in the half-life mod 'gmod'
@dfaker ah, that makes sense. Shame on me for not noticing that. Thanks for the heads-up.
from vr-reversal.
If you have placed the lua script in your scripts directory then it'll be auto loaded, no need to also pass the --script
or --script-opts
parameters, simply press 'v' to switch on the vr-reversal mode.
from vr-reversal.
yes I kept the lua file and conf file in scripts folder and I run it wiith mpv filename.mp4
now. Still getting this error
Can't load unknown script: /home/wick/.config/mpv/scripts/360plugin.conf
[360plugin]
[360plugin] stack traceback:
[360plugin] [C]: ?
[360plugin] [C]: ?
[360plugin] Lua error: [string "/home/wick/.config/mpv/scripts/360plugin.lua"]:563: '=' expected near 'continue'
(+) Video --vid=1 (*) (h264 1440x720 59.940fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1440x720 yuv420p
AV: 00:00:11 / 00:44:37 (0%) A-V: 0.000 Dropped: 7 Cache: 265s/150MB
from vr-reversal.
I don't use the script opts but I think the conf file just goes in a the /home/wick/.config/mpv/script-opts
folder or omit it entirely.
Otherwise line 563 in 360plugin.lua looks perfectly fine to me, and doesn't contain an =
in the repo are we certain it's a fresh accurate copy?
from vr-reversal.
@openwick what version of mpv are you running?
I have not looked into it further, but perhaps something changed in the expected lua syntax.
from vr-reversal.
@glubsy I am user 0.34 here is the full info
mpv 0.34.0 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
FFmpeg library versions:
libavutil 56.70.100
libavcodec 58.134.100
libavformat 58.76.100
libswscale 5.9.100
libavfilter 7.110.100
libswresample 3.9.100
FFmpeg version: 4.4.1
still the script is not working
from vr-reversal.
It really seems like the lua parser has had some kind of patch applied to it.
What operating system is this? Can you post the lua version installed (type lua -v
)?
You could try changing these lines to this, and it might work:
line 563 and line 584: change goto continue
to continue
,
line 570 and line 587: delete the line with ::continue::
.
Even then it might not really work and you'll get another error. This online checker initially gave me error Line 563: unexpected continue expecting indexation or function call
, but after I removed the goto statements and kept only "continue", oddly enough the errors disappeared.
In lua 5.4 here on Arch Linux, by toying around with this simple test I got syntax error near 'end'
at line 6:
i = 0
while i < 20 do
i = i + 1
if i % 2 == 0 then
continue
end
end
Whereas the usual goto
+ ::label::
version works just fine.
I'm not sure how lua is implemented in mpv, but it seems they are using the lua headers from the operating system. So either you are running a patched version of lua, or mpv has some kind of patch going on. Not sure yet.
from vr-reversal.
HI @glubsy sorry for the late reply.
I am running lua version 5.4.3 on Fedora 35 as the output of lua -v
is this
Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio
I changed the lines as you mentioned but I am getting the same error. Still getting the same error
[360plugin] Lua error: [string "/home/wick/.config/mpv/scripts/360plugin.lua"]:564: '=' expected near 'end'
Just for reference here are those for loops from 560 to 590 with changes as you mentioned. I also moved the continue
one tab inside just to see if it works but it didn't :(
local restore_props = function()
for k, v in pairs(saved_props) do
if v == "NIL" then
continue
end
if k == "hwdec" then
-- Can also be displayed in osd console with "show-text ${hwdec-current}"
mp.osd_message(string.format("Restoring hardware acceleration: %s", v), 1.5)
end
mp.set_property(k, v)
end
for k, _ in pairs(saved_props) do
saved_props[k] = "NIL"
end
end
local restore_keybinds = function()
-- There is no need to re-apply the previous key-bindings if they have been
-- forcibly rebound by our script. They are still there after removal.
for k,v in pairs(bindings) do
if k == binding_by_name("toggle_vr360") then
print("Keeping key bind to toggle vr360: " .. k)
continue
end
mp.remove_key_binding(v["name"])
end
end
from vr-reversal.
Even then it might not really work and you'll get another error. This online checker initially gave me error
Line 563: unexpected continue expecting indexation or function call
, but after I removed the goto statements and kept only "continue", oddly enough the errors disappeared.
continue
isn't a keyword in standard lua, glualint is a validator for a specific variant of lua used in the half-life mod 'gmod' which rather unluckily does include a continue
keyword but even their own docs advise against using it https://wiki.facepunch.com/gmod/Specific_Operators .
Your original goto label method seems to be the best way in standard lua.
from vr-reversal.
Could not reproduce, all indications are an issue with the lua interpreter in the users mpv build.
from vr-reversal.
Related Issues (20)
- License? HOT 2
- [Feature request] 3D SBS/TAB output HOT 9
- Please remove forced toggle keybinding and maybe change the default toggle keybinding HOT 1
- reset_rot not found HOT 1
- Lua error on macOS: '=' expected near 'continue' HOT 4
- Strech the width on SBS video but keep same height HOT 4
- reset_rot still missing in latest mpv release HOT 1
- would you consider replacing the example.gif with a link?
- [lavfi] AVOption 'reset_rot' not found. [user_filter_wrapper] Creating filter 'v360' failed. HOT 1
- Configure for 2d360 video
- Videos play at a really low resolution.
- Use touch control for looking around on Android HOT 2
- Change default video settings on launch? HOT 2
- Lua error: 360plugin.lua:539: bad argument #16 to 'format'
- mac os 360 rot_reset error HOT 3
- Unusably slow because Hardware Acceleration is turned off automatically HOT 10
- What is sv360, in_stereo, out_stereo etc.? HOT 1
- v360 filter update extremely slow when video is paused HOT 2
- New versions of ffmpeg have altered their api to interpret rotations sent via sendcmd as relative by default HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vr-reversal.