Closed trymeouteh closed 2 years ago
I would be interested to find out if this would be done either directly into PeerTube, ie. using our PeerTube account to chat or via the use of a embeded IRC, XMPP or Matrix tchat/room. Does the ActivityPub allow the possibility of a live tchat ? Perhaps a simple way would be to create an unreadable hashtag (ie. #dQw4w9WgXcQ) to just create a wall of messages. This would mean being able to use other Fediverse stuff like Mastodon too.
A lot of YouTubers have got Patron discord benefits, that allows supporting viewers to comment in special discord rooms, perhaps adding support for that would be good for some streamers too ? Of course Discord is not FLOSS unfortunately.
I have the same question as Niquarl and would like to add that Twitch currently uses IRC so using it could ease Twitch bot developers into bringing their bots to PeerTube if that is desirable.
Matrix and XMPP again support bridges and transports so using them may make the chat more accessible to users of those protocols already and both have relaybot software such as Matterbridge.
@Mikaela not exactly: Twitch uses its own implementation of a chat system, and makes a compatibility layer API with the IRC spec.
I realise I might just not be cool enough as I age but I really don't know if stuff like bots and the such should be encouraged. Frankly, all those emojies, custom gifs and what not really does little but spam the chat and make it unreadable in my opinion. I understand that some might like that, just like the paying highlights like on YouTube might appeal to some, but it shouldn't be by default if it is implemented.
not exactly: Twitch uses its own implementation of a chat system, and makes a compatibility layer API with the IRC spec.
Thank you for correcting me 😄
Frankly, all those emojies, custom gifs and what not really does little but spam the chat and make it unreadable in my opinion.
I can agree on that, my main concern is that I have recently started streaming on Twitch and as Matterbridge supports it (though that IRC compatibility API layer), I can have my potential future community not tied entirely onto Twitch chat.
I hope that in the future I can transition to PeerTube bringing everyone in through Matterbridge or similar bot and thus not lose the chatters. It would also be nice if I could keep them in the case some reason caused me to either need to switch PeerTube instances or move to an entirely different platform.
Do I get the right impression that the chat system hasn't been (formally?) thought about yet and when that is done, comments here will be taken into account on whether to go with some of the named protocols or implement something entirely new?
@Mikaela nothing has been designed nor decided yet, but one thing is sure: with one developer and chat being far from the main focus of PeerTube, we will have to choose something maintainable on the long term, which is why I tagged this as a good fit for our plugin system.
Honestly I’d love to see this as a plugin for PeerTube. I’ve been testing out the live streaming functionality and it is superb, but the live chat missing atm really takes away from the possibility of me using it for any serious live streaming. Would be really neat to have that so I really don’t need Twitch for anything.
Honestly I’d love to see this as a plugin for PeerTube
I would like to see this built into Peertube, not as a plugin personally.
I would like to see this built into Peertube, not as a plugin personally.
I would like to see this built into Peertube, not as a plugin personally.
@discapacidad5 @trymeouteh Actually, plugins are a good way to test stuff. Nothing prevents a plugin from being implemented into the core source code later on. :wink:
Aside from this, I'm all in for a Live Chat plugin. I don't think I'd do it myself, but I'll be glad to give a hand to whomever does.
Can anyone point to where someone (unfamiliar with PeerTube but familiar with chat) would want to start with developing such a plugin?
If live streaming is built in and is not a plugin, wouldn't it make sense for a live chat to be built in also?
If live streaming is built in and is not a plugin, wouldn't it make sense for a live chat to be built in also?
I don't think so : I think the goal of peertube is to be good at video streaming, wether live or not. So livestream is a core feature. Instant messaging is a complex topic : some people would like to have moderation tools, emojis, bot integration, et c. Setting the livechat in the scope of a plugin would allow this project to focus on video streaming.
The livechat could be built using existing pieces of software, that are already good at messaging, like a matrix server with added moderation tools
I'll be pouring free time on that issue (but got a lot of overhead before I get anything meaningful implemented)
I agree with @rigelk on taking the plugin route and I'd like to challenge myself to see how I could get a Peertube instance to match community features that another certain streaming platform currently has.
This would include :
But I am wandering off topic for this issue. for a chat the guts say go XMPP but I really need to spend more time thinking, I'd love to be in the loop if anything gets started though so I guess I'll be watching this issue 👀
@Fighix I'm an XMPP dev and happy to help with the XMPP side, but lacking much time to dig into PeerTube specifics. My recommendation would be to embed a customizable JS client such as Converse.js.
I'd suggest to use something decentralized like Cabal or Activity-pub oriented
instead of a real tchat we could use comments, but timestamp them with the video, they are already federated, aren't they ? then we just display them differently, with something that refreshed automatically
instead of a real tchat we could use comments, but timestamp them with the video, they are already federated, aren't they ? then we just display them differently, with something that refreshed automatically
It's not the same, I watch many lives on youtube, live chat can become very very busy so that would flood comments, and people like to interact with the live streamer, it becomes irrelevant if it's displayed as a comment.
But yeah, a live chat would be awesome :)
So from what I gather here, there are several options to implement livestream chat:
My personal choice would be to use IRC as the backend, mostly due to it being lightweight enough in comparison to Matrix. Users don't even need to be authenticated by default, so we can just use the PeerTube handle as the IRC nickname and call it a day. Advanced users could even choose to use their own IRC chat room instead of the one provided by PeerTube.
My personal choice would be to use IRC as the backend, mostly due to it being lightweight enough in comparison to Matrix. Users don't even need to be authenticated by default, so we can just use the PeerTube handle as the IRC nickname and call it a day. Advanced users could even choose to use their own IRC chat room instead of the one provided by PeerTube.
If there is a way to replay the chat log from IRC when replaying the live, that would be nice (one chat room per live), and I guess that would make it easier to install bots as well.
It should be possible to have PeerTube listen to the IRC chat room, and store the messages as a timed text file internally. We could even use a subtitles file format like WebVTT
If there is a way to replay the chat log from IRC when replaying the live, that would be nice (one chat room per live), and I guess that would make it easier to install bots as well.
Modern IRC servers can store messages and return them to users in form of IRCv3 CHATHISTORY and in Oragono some less formal methods, but I think PeerTube integrated chat would need to implement not showing the old messages until matching timestamp of the stream.
I think their testnet webchat currently gives the best impression on what modern IRC is capable of.
I also support using IRC for this purpouse and since my previous comments I have started running two Oragono instances and contributed a bit to the documentation while mostly I have been reporting issues and feature requests.
Do you think there could be a way to bridge between a PeerTube and YouTube live chat? So one could stream on both platforms and have people watching on YouTube or PeerTube and partake in the discussion regardless of where they watch?
I'd discourage the use of Matrix for a chat-backend. Running a synapse server is very heavy weight and non-performant in general, it's overkill. XMPP/IRC would make a lot more sense.
Hoping this becomes a thing, chat for livestream is very important. Getting even basic support (without replay) would be huge for adopting peertube as a viable alternative to twitch/youtube/etc.
Do you think there could be a way to bridge between a PeerTube and YouTube live chat? So one could stream on both platforms and have people watching on YouTube or PeerTube and partake in the discussion regardless of where they watch?
I personally consider that this would not be a good solution (I see peertube as an alternative to leave YouTube) for many things First that YouTube has become an advertising campaign when you watch a video, the time it takes to watch an advertisement is more than the time it takes to watch a video Second YouTube lately is deleting content from Insurgent people for revolutionaries or people with different thoughts not respecting the freedom of thinking to express myself for peerturbe is a solution to all these things using YouTube with Peertube is like saying there is a link between Linux and Windows Although companies even Microsoft incorporated compatibility in Windows 10 for linux, linux users will never accept Windows pertube linked to YouTube is not a good solution in my way of seeing
platform consumers such as: peertube, mastodont, element etc. They are people who want to escape Microsoft's monopoly on Facebook and Google. That is the largest number of people who consume these platforms and it does not make me joke that wanting to flee from the monopolies I ended up mixing with the monopoly loses all sense of this platform
Si hay una manera de reproducir el registro de chat desde IRC cuando se reproduce en vivo, serÃa bueno (una sala de chat por vivo), y supongo que eso también facilitarÃa la instalación de bots.
Los servidores IRC modernos pueden almacenar mensajes y devolvérselos a los usuarios en forma de IRCv3 CHATHISTORY y en Oragono algunos métodos menos formales , pero creo que el chat integrado de PeerTube deberÃa implementar no mostrar los mensajes antiguos hasta que coincida la marca de tiempo de la transmisión.
Creo que su chat web de testnet actualmente da la mejor impresión de lo que el IRC moderno es capaz de hacer.
También apoyo el uso de IRC para este propósito y, desde mis comentarios anteriores, comencé a ejecutar dos instancias de Oragono y contribuà un poco a la documentación, mientras que principalmente he estado informando problemas y solicitudes de funciones.
This is the reason why I still think that the best way is for it to be part of peerturbe and not an extension Because the idea is that the chat show the correct minute when the person wrote it and what better than something internal with an internal language that can handle the recording and playback times of said conversation I do not see that it is so complicated because basically it is to replicate the comments that already exist in Peertube but only add certain programming so that it is shown as the video progresses
So from what I gather here, there are several options to implement livestream chat:
Embedding a chat room widget from another service, such as Converse.js for XMPP, KiwiIRC for IRC, or Element for Matrix
- Pros: users can use an existing chat room of their choice
- Cons: extra configuration required, protocols may be different between one instance and another, would most probably require end users to log in two separate accounts, one for PeerTube and one for chat, and mobile clients might have a problem implementing chat if they don't implement all possible backends
Including our own embedded implementation of XMPP/IRC/Matrix
- Pros: turnkey solution for administrators
- Cons: might increase the resource usage and dependencies, very especially if using Matrix as the backend, and would require mapping the chat users to PeerTube users somehow, which might be beyond the scope of our project
Using the existing ActivityPub comments with a special header as the chat room messages
- Pros: no need to implement any new bindings
- Cons: older PeerTube instances (and non-PeerTube clients such as Mastodon) will be littered with comments, and binding to other chat rooms such as XMPP/IRC/Matrix might be trickier
I go for the last option but instead of using the existing ActivityPub, create as a replica that is to say that the video has a double comment for the chat and the normal comment By the way, on YouTube when there is a chat in a live video it's totally apart from the normal video comment, they put a right side corner I think that what there is is to replicate the existing ActivityPub and make the adjustments so that it is displayed at the correct time and with this we cover the problem that old videos do not show a large number of Messages
Check out matrix dendrite. It eats much less resources than synapse and works really fast plus API already implemented:
Dendrite is alpha-stage and doesn't solve the database bloat issue. It's still very heavy in comparison to XMPP/IRC. I say this as someone who runs a public Matrix server, it's a huge pain. It's not something I'd recommend unless you have a specific use-case that can only be met with Matrix, specifically the combination of server-side media hosting, E2EE and federation. If you don't need all 3 there are better alternatives.
Hello, I just released an early alpha for a live chat Peertube plugin: https://github.com/JohnXLivingston/peertube-plugin-livechat
It is not fully functional yet, and there is no documentation for now. This plugin will add an iframe besides videos. You can choose to add this iframe on all lives, on all non-lives video, or for specific video UUID.
The backend for the webchat is not part of the plugin. It only load an iFrame. For my tests, I use a XMPP server (Prosody), with anonymous authent, and a muc server. Then, I have a static webpage with ConverseJS to serve the webchat.
The video UUID can be added in the iframe url like this: https://my_webchat_server/room={{VIDEO_UUID}}. In my static page, I join a public chatroom named publiclive{{VIDEO_UUID}}.
In the coming days, I will add documentation (including the XMPP and the web server configuration samples), and work on the look and feel.
@Chocobozzz , I have 2 questions.
1)
It seems that the only hook that receive the «video» object, from which I can test video.isLive
and get video.uuid
is action:video-watch.player.loaded .
But this is not working, as it is not called as long as the live is not started. Is there a way to have a hook with these informations when the user land on the watch page?
2)
I'm looking for the good spot to include my iframe. Have you an opinion?
For know, it goes here: document.querySelector('.video-info').prepend(iframe)
What do you recommand for JS code that search the correct spot? Is looking for the CSS class 'video-info' ok?
If someone wants to help me on this, you are welcome :)
@JohnXLivingston great news! I can't really advise on your UI/DOM questions, but happy to help if you have any questions on the XMPP/Prosody/Converse.js side :slightly_smiling_face:
@JohnXLivingston great news! I can't really advise on your UI/DOM questions, but happy to help if you have any questions on the XMPP/Prosody/Converse.js side slightly_smiling_face
Yes, I have! It's the first time I setup a Prosody server. There are some problems I don' figured out yet.
Here is the configuration of my MUC:
Component "room.my.domain" "muc"
admins = { "john@my.domain }
restrict_room_creation = false
muc_room_locking = false
muc_tombstones = false
muc_room_default_language = "fr"
muc_room_default_public = true
muc_room_default_persistent = false
muc_room_default_members_only = false
muc_room_default_moderated = false
muc_room_default_public_jids = false
muc_room_default_change_subject = false
muc_room_default_history_length = 20
Thinks that I would like to achieve: 1) I don't want the first user to connect to be moderator for the room 2) It would be really great if there is a way to prevent creating rooms that are not linked to Peertube video. Is there an easy way to write a module that makes a HTTP GET on https//my_peertube.tld/api/v1/... to check that the video exists?
Hi there! I've been told about this particular one issue, and thought it'd be nice to mention another unofficial solution, a proof-of-concept that I've done the last few weeks: https://framagit.org/bnjbvr/peerchat (name is a WIP). It's its own software that must deployed in addition to Peertube. It would be trivial to make a Peertube plugin, as long as the server is running. Very small project to try a few tech stacks (Rust on the server, TypeScript+Svelte on the client).
The text of the web app is only in French right now, but basically at this point, you can:
Demo's online on https://peerchat.benj.me if you're interested; feel free to use it if you'd like so!
It's my MVP vision of a peertube live chat, so it should be a useful stopgap in the short term. I'd be quite happy if others wanted to join the project, help design and contribute (if so, feel free to come discuss on the repository linked above!). Otherwise I'm happy to just drop it mostly as is, and get back to it when my heart feels like so :)
Thinks that I would like to achieve:
I don't want the first user to connect to be moderator for the room
It would be really great if there is a way to prevent creating rooms that are not linked to Peertube video. Is there an easy way to write a module that makes a HTTP GET on https//my_peertube.tld/api/v1/... to check that the video exists?
A plugin exists that's very close to this, mod_muc_http_auth. Currently it has a specific URL and response format, but I can work on making that generic enough to support PeerTube's API tomorrow (it's late here).
I think the same plugin could also probably be adapted to tweak the permissions of the first one into the chat. Will work that in too and supply you with a config snippet :slightly_smiling_face:
A plugin exists that's very close to this, mod_muc_http_auth. Currently it has a specific URL and response format, but I can work on making that generic enough to support PeerTube's API tomorrow (it's late here).
Nice! I can make a special entry point in my plugin to respond to this query. I will try this module tomorrow (I'm in France, it is the night for me).
I think the same plugin could also probably be adapted to tweak the permissions of the first one into the chat. Will work that in too and supply you with a config snippet slightly_frowning_face
That would be great!
@JohnXLivingston
But this is not working, as it is not called as long as the live is not started. Is there a way to have a hook with these informations when the user land on the watch page?
You can use the filter hook 'filter:api.video-watch.video.get.result'
like an "action" hook
What do you recommand for JS code that search the correct spot? Is looking for the CSS class 'video-info' ok?
The .video-js
class or video
html tag should be safer.
Thanks!
Here is a demo version of my peertube-plugin-livechat: https://www.yiny.org/videos/watch/399a8d13-d4cf-4ef2-b843-98530a8ccbae It is still an alpha version. If there are webdesigners that are interested to contribute, it would be really great! I need help to better include the iframe in the page, and to customise the ConverseJS chatgroup in the iframe. My repo is here: https://github.com/JohnXLivingston/peertube-plugin-livechat I had not the time to add Jabber backend installation instructions. I will do that tonight or tomorrow.
edit: I added some XMPP/ConverseJS documentation. It is work in progress, if you are not familiar with Prosody and ConverseJS, it will not be easy.
https://github.com/JohnXLivingston/peertube-plugin-livechat version 1.0.1 is out!
I changed my mind: it comes with a builtin ConverseJS page. So if you have already a XMPP server, it is almost ready to go!
You can still use another webchat system: you can also ignore the builtin ConverseJS and setup any url to be embedded in the iframe.
Enjoy!
I made a Prosody plugin that lets you seed room configuration from an API. I haven't checked if there's any existing API that would be appropriate to use or what it would take to add such an API to peertube, but it shouldn't be too difficult. It could as a start be pointed at a single static JSON file that includes some sensible defaults and appoints someone as moderator. Feel free to reach out with questions or ideas for improving the plugin.
I made a Prosody plugin that lets you seed room configuration from an API. I haven't checked if there's any existing API that would be appropriate to use or what it would take to add such an API to peertube, but it shouldn't be too difficult. It could as a start be pointed at a single static JSON file that includes some sensible defaults and appoints someone as moderator. Feel free to reach out with questions or ideas for improving the plugin.
That's really great! I will try to include this natively in my plugin.
I never used a prosody module. What is the correct way to install them on a debian? Are they packaged?
What is the correct way to install them on a debian?
The current recommendations are described here: https://prosody.im/doc/installing_modules#prosody-modules TL;DR: clone the repo. (Or grab an archive of the repo (tar.gz link near bottom-right of the page))
Are they packaged?
Short answer: No.
Longer answer:
We do have a work-in-progress luarocks repo for the plugin installer that was done as a GSoC project. The support code to let you install using prosodyctl
hasn't been released yet so this isn't as easy to use yet, but in theory one could get the plugin with luarocks
from there.
There is a Debian package, but this new module wouldn't be in there as it consists of a snapshot of a hand-picked set of plugins. You could probably convince the debian packagers to include this one.
In the future when the plugin installer GSoC project work lands in a release it will be possible to install plugins using prosodyctl
.
It's based on luarocks
@JohnXLivingston hey. do you know about owncast https://github.com/owncast/owncast? https://directory.owncast.online/ this is a twitch alternative with chat. its MIT so would it be possible to integrate its chat?
@JohnXLivingston hey. do you know about owncast https://github.com/owncast/owncast? https://directory.owncast.online/ this is a twitch alternative with chat. its MIT so would it be possible to integrate its chat?
I don't understand the point. Owncast has its own video system, so why include its chat on a peertube live? To cast simultaneously on peertube and owncast with a single chat? It depends if the chat can be included in an iframe on another domain. I don't know the answer.
@JohnXLivingston i am saying look at how owncast has implemented their chat system. If it is something we can reuse
@JohnXLivingston i am saying look at how owncast has implemented their chat system. If it is something we can reuse
I have no time for this, sorry.
Did you know that my chat plugin is now a way more mature than it was on february? There is now a simplier installation process. The only pre requesite is to install Prosody on your server, and then Peertube will auto-setup Prosody to run inside Peertube. Peertube's user will be automatically connected. Instance's moderator and admins will be owner of chatrooms (so they can moderate), and the user who created the video will be moderator. The documentation is here: https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/documentation/prosody.md
I have a new version of the plugin which is almost ready, with simpler settings screen. But it is not compatible with Peertube previous to 3.2.0. So I have to wait before releasing the new version (there are many instances that are not up to date, and the plugin v3.0.0 will be broken for these instances). The code for the new version is here: https://github.com/JohnXLivingston/peertube-plugin-livechat/tree/release/3.0.0 (documentation is not up-to-date). I made a demonstration video of the new setting screen, in french: https://videos.globenet.org/videos/watch/7e943002-d15c-4422-8d4f-af9098e3e64e
Closing this issue now we have the livechat plugin. See the blog post for more information
Would be great to have this feature out of the box, not as an plugin. The instance should have the option to disable live chat if they wish.
Buy having it built into Peertube, it will be standardised across all instances throughout the fediverse. The comment section is not a plugin and live chat for steams is just a comment section with timestamps on each comment.
Buy having it built into Peertube, it will be standardised across all instances throughout the fediverse. The comment section is not a plugin and live chat for steams is just a comment section with timestamps on each comment.
For the record, federation will be handled by the livechat plugin in 2023. I finally found the funding to work on this. See here: https://www.john-livingston.fr/foss/article/peertube-chat-plugin-2023-will-be-full-of-new-features#federation
Creating a Live chat feature for a live stream video that will be available to read during and after the the stream is over.