Giter VIP home page Giter VIP logo

mpv-youtube-chat's Introduction

mpv-youtube-chat's People

Contributors

alexwh avatar banchouboo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mpv-youtube-chat's Issues

[Feature Request] support downloaded videos? + more

  • Videos downloaded with yt-dlp have 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?
  • Insert line breaks if characters reach certain threshold so that spam messages don't take entire horizontal screen.
  • Custom font support + colors, borders config, usually people love to add emoji in chat but our usual font can't display that so we can just use Nerd Fonts for the chat so it can be displayed.

api bad request

[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

`~/.local/share` location doesn't work

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.

Crash on load-chat: `attempt to index global 'bit32' (a nil value)`

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?

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.