banchouboo / mpv-youtube-chat Goto Github PK
View Code? Open in Web Editor NEWmpv lua script to overlay youtube chat on top of a video using yt-dlp
License: MIT License
mpv lua script to overlay youtube chat on top of a video using yt-dlp
License: MIT License
PURL
and it contains video link. So it can just look for that to download live chat, also if a video already has livechat embedded in it then use it?[mpv_youtube_chat_master] Lua error: ...portable_config/scripts/mpv-youtube-chat-master/main.lua:9: attempt to concatenate a nil value
changedthe second "home" to "userprofile" in line 9, since windows doesnt have "home"
it started working but then:
[mpv_youtube_chat_master] WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
AV: 00:00:06 / 05:23:22 (0%) A-V: 0.000 Cache: 200s/14MB
[mpv_youtube_chat_master] [youtube] EOkuS_mgr3s: Downloading android player API JSON
[mpv_youtube_chat_master] WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (1/3)...
AV: 00:00:07 / 05:23:22 (0%) A-V: 0.000 Cache: 217s/16MB
[mpv_youtube_chat_master] WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
[mpv_youtube_chat_master] [youtube] EOkuS_mgr3s: Downloading android player API JSON
[mpv_youtube_chat_master] WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (2/3)...
AV: 00:00:07 / 05:23:22 (0%) A-V: 0.000 Cache: 222s/16MB
[mpv_youtube_chat_master] WARNING: [youtube] YouTube said: ERROR - Precondition check failed.
[mpv_youtube_chat_master] [youtube] EOkuS_mgr3s: Downloading android player API JSON
[mpv_youtube_chat_master] WARNING: [youtube] HTTP Error 400: Bad Request. Retrying (3/3)...
win 7 64 bit ultimate
mpv version 2023.12.30
If XDG_DATA_HOME
isn't set, making the script fall back to ~/.local/share
, then the script never finds the files it downloads - file_exists
returns false, even though the chat file is there.
After debugging it in various ways, I think the culprit is that Lua's io.open
doesn't expand ~
in paths. Changing the fallback value of xdg_data_home
from "~/.local/share"
to os.getenv("HOME") .. "/.local/share"
fixed the issue for me.
Hello and thank you for this awesome project. However, on my system, upon attempting to load-chat
, the script crashes with the following error:
[mpv_youtube_chat]
[mpv_youtube_chat] stack traceback:
[mpv_youtube_chat] /home/<name>/.config/mpv/scripts/mpv-youtube-chat/main.lua:330: in function 'load_live_chat'
[mpv_youtube_chat] /home/<name>/.config/mpv/scripts/mpv-youtube-chat/main.lua:388: in function 'handler'
[mpv_youtube_chat] mp.defaults:380: in function 'handler'
[mpv_youtube_chat] mp.defaults:510: in function 'call_event_handlers'
[mpv_youtube_chat] mp.defaults:552: in function 'dispatch_events'
[mpv_youtube_chat] mp.defaults:503: in function <mp.defaults:502>
[mpv_youtube_chat] [C]: at 0x5623556aa5e0
[mpv_youtube_chat] [C]: at 0x5623556aaaa0
[mpv_youtube_chat] Lua error: /home/<name>/.config/mpv/scripts/mpv-youtube-chat/main.lua:242: attempt to index global 'bit32' (a nil value)
I have the following in input.conf and the error occurs when pressing ctrl+shift+c:
CTRL+Shift+c script-message load-chat
Alt+CTRL+Shift+c script-message unload-chat
mpv --version
:
mpv 0.35.1-dirty Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
built on Fri Apr 21 07:11:25 2023
FFmpeg library versions:
libavutil 58.2.100
libavcodec 60.3.100
libavformat 60.3.100
libswscale 7.1.100
libavfilter 9.3.100
libswresample 4.10.100
FFmpeg version: n6.0
Arch Linux, lua verison 5.4.6
, latest git master of mpv-youtube-chat
, other scripts installed are mpvacious
and autosubsync-mpv
.
Any ideas how to troubleshoot this problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.