NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

[Feature] Live chat support

Open Orion983 opened this issue 4 years ago • 13 comments

Checklist

  • [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo.
  • [x] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md.
  • [x] This issue contains only one feature request. I will open one issue for every feature I want to request.

Describe the feature you want

What I want is to be able to see live chat on NewPipe (with a way to turn it off in settings of course).

Is your feature request related to a problem? Please describe it

This streamer for example that I watch reads out stuff in the chat sometimes, but how could I see the chat myself? That is what this idea came from.

Additional context

Two mock ups actually made from a VOD IMG_20201214_160350 IMG_20201214_161726 Maybe, you could change super chat donation colours too? And maybe change the screen side it is on?

How will you/everyone benefit from this feature?

People could read the live chat on NewPipe.

Orion983 avatar Dec 14 '20 16:12 Orion983

"Thank you name for the Super chat!" she says. To which I say, "What did name say?"

Orion983 avatar Dec 14 '20 16:12 Orion983

The service is deployed to this path youtube.com/live_chat and displayed in the DOM container with the ID of ytd-live-chat-frame, I'm pretty sure Live Chat requires the Google unified authentication, and donation (Super Chat) are not enabled for all countries. Hmm.. perhaps some workaround with youtube-nocookie.com might be able to display a read-only version of chat?..

I was thinking read-only anyway

Orion983 avatar Dec 19 '20 09:12 Orion983

I think displaying the read-only chat is a great idea. I'm not so sure about the comments overlaying the video, but having them below the video would be great. I think this chat UI would look good: screen-1

ggdorman avatar Dec 20 '20 18:12 ggdorman

I think displaying the read-only chat is a great idea. I'm not so sure about the comments overlaying the video, but having them below the video would be great. I think this chat UI would look good: screen-1

Or it could be optional to display over the video. I would prefer it to show over the video but I get why sone people woudn't

Orion983 avatar Dec 21 '20 08:12 Orion983

Chat is needed in the newpipe program

ah1102 avatar Jan 15 '21 15:01 ah1102

I don't think this is going anywhere. It's not had any activity. Should I close it?

Orion983 avatar Jun 03 '21 09:06 Orion983

There is no time limit. Any developer who wants this feature as well could look at this issue and decide to open a PR. If you close it, that possibility may get reduced by a lot, since people usually don't browse closed issues.

opusforlife2 avatar Jun 03 '21 15:06 opusforlife2

Ah ok

On Thu, 3 Jun 2021, 16:39 opusforlife2, @.***> wrote:

There is no time limit. Any developer who wants this feature as well could look at this issue and decide to open a PR. If you close it, that possibility may get reduced by a lot, since people usually don't browse closed issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TeamNewPipe/NewPipe/issues/5171#issuecomment-853966267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5XXOGJH7XYPD5EBYN7NGLTQ6O4ZANCNFSM4U27NXOQ .

Orion983 avatar Jun 03 '21 20:06 Orion983

I couldn't find a working parser for the live chat written in java while searching the internet so far.

But I found the python module pytchat. This relies only on sending http requests. So no web scraping or youtube api calling.

An example from the docs to get the live chat content as json:

import pytchat
import time

chat = pytchat.create(video_id="bw-zCrtCFs0")
while chat.is_alive():
    print(chat.get().json())
    time.sleep(5)
    
    # Each chat item can also be output in JSON format.
    for c in chat.get().items:
        print(c.json())

to see the http requests -> add the logging module as an import and define the logging level

import logging
logging.basicConfig(level=logging.DEBUG)

So if anyone has the know-how to create a PoC in java based on this that would be great.

I'd love to do this myself but unfortunately I don't have the needed knowledge of java.

iNtEgraIR2021 avatar Sep 02 '21 13:09 iNtEgraIR2021

It's been four years since the creation of this Feature Request.

The ability to read Live Chat is a much needed feature. On behalf of people who like to watch streams, I would ask you to add such an option.

Is there any progress on this topic since 2020?

Defog7277 avatar Apr 28 '24 00:04 Defog7277

Not that I know of.

opusforlife2 avatar Apr 28 '24 21:04 opusforlife2

Embedding https://www.youtube.com/live_chat?is_popout=1&v=video_id_here with some changes to visibility of elements could be an (highly inefficient) alternative, or could be worked around by using browser with that url + split screen

swiftgeek avatar May 28 '24 02:05 swiftgeek

PipePipe (fork of NewPipe) does support youtube live chat through bullet comments (danmaku subtitling).

joeky888 avatar May 29 '24 01:05 joeky888