Comments (5)
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?
If you try to load a live chat without manually passing in a file name (script-message load-chat
) and it's from a local video file, it will look for a live chat with the same name as the video in the same directory as the video (e.g. file.mp4
will look for file.live_chat.json
), so you can just download the live chat with the video when you download via yt-dlp
.
Insert line breaks if characters reach certain threshold so that spam messages don't take entire horizontal screen.
I do have a limit for line length but it's flexible so it only breaks at word boundaries, I guess this would be a problem if a message was really long and had no spaces, I'll think about how to approach it
Custom font support + colors, borders config
Done, update to the latest commit. Also changed color
format option to author-color
. Wasn't able to get emoji to work when changing the font though, let me know if you get that working.
from mpv-youtube-chat.
Wasn't able to get emoji to work when changing the font though, let me know if you get that working.
Nerd fonts directly doesn't support emoji but there is a long way to patching fonts with Noto Color Emoji font to support them.
A second method is to use Noto Color Emoji as the default font for emoji, since live_chat.json
does have text
, emoji
, emojiId
it should be somehow possible to use different font for them? text
can be configurable by the user and emoji
font would be Noto Color Emoji.
But for some reason I still can't see the emojis in mpv even after setting font=Noto Color Emoji
Though any font manager shows it should support emoji
Maybe this can be used as a reference https://pypi.org/project/softchat/
from mpv-youtube-chat.
I definitely could make a seperate font setting for emoji pretty easily, but I'm not sure to what extent mpv supports emoji. It seems libass doesn't support colored emoji (libass/libass#381), supposedly monochrome emoji fonts should work, haven't tested myself yet. If you test one, let me know the results, if monochrome emoji fonts work then I'll add a setting for emoji font as well.
from mpv-youtube-chat.
I tried tons of workarounds. EmojiOne, Nerd Font patched ones, Google's Noto Emoji (25% are monochrome) and all don't work and display the boxes for colored emoji. Yes monochrome emoji show just fine on most any font.
Only font that doesn't show boxes is Twitter Color Emoji "Regular B&W outline emoji are included for backwards/fallback compatibility."
https://github.com/13rac1/twemoji-color-font/releases
opts['font'] = 'Twitter Color Emoji'
In the end though it might just be better to use a better font though for readibility and just ignore the boxes.
not worth to ("emojiId": ").*?(",) / $1$2
replace them each time either.
from mpv-youtube-chat.
Now using mpv 0.38 and it sure seems to be getting almost all emojis. Maybe it just has so many B&W for the colored ones. I tried nerd font..that was a no go. Also tried Noto Emoji again and the spacing between letters was way off. Only downside to using this Twitter Color Emoji is it's 14MB.
from mpv-youtube-chat.
Related Issues (6)
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 mpv-youtube-chat.