Giter VIP home page Giter VIP logo

Comments (5)

BanchouBoo avatar BanchouBoo commented on September 24, 2024

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.

BhaturaGuy avatar BhaturaGuy commented on September 24, 2024

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
image

Maybe this can be used as a reference https://pypi.org/project/softchat/

from mpv-youtube-chat.

BanchouBoo avatar BanchouBoo commented on September 24, 2024

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.

mrfragger avatar mrfragger commented on September 24, 2024

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.
Screenshot 2024-01-20 at 1 10 09 PM

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'

Screenshot 2024-01-20 at 1 12 12 PM

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.

mrfragger avatar mrfragger commented on September 24, 2024

emojis

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 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.