Pomagranate - The Open Source Video Sharing App


The open-source video sharing platform

Demo: https://pomagranate.glitch.me/watch?v=CX8pJq8pm
While trying to merge some changes I accidentally overwrote the dmeo database

What is Pomagranate?

These days video is dominated by closed-source platforms like YouTube, Vimeo, and Twitch. Pomagranate is a open-source video sharing app using peer-to-peer technology and multiple servers.

How do you store the videos and not run out of money. What is peer to peer?

We distribute the load by distributing chunks of data between servers. In a newer update Pomagranate will take advantage of clients connected to it to make things even more stable.

Won’t glitch prevent you from creating too much projects?

That’s why we need the help of the community. You can help out by hosting your own Pomagranate instance on glitch or heroku today. The more instances the better. However we ask that you please keep these instances updated because there will be some important updates coming soon.

What are the limitations of this approach

There are two limitations with this approach. First, a video may not always be available, second a video is unable to play if it reaches a point where a chunk cannot be found in the network.

Can you explain how it works a bit more

When someone asks for a video a request is sent to a Vine Server(also open-source) to find the chunks. The only information the Pomagranate server knows about a video is the hashes of it’s chunks. The Vine Server then relays messages like “Hey everyone, anyone got this chunk insert hash here” and the servers go on a race to send the chunks over. Nothing happens if a server sends over a chunk and loses the race to be the first one to send a chunk.

You said this was open-source

Yep here’s the the source for the video server and the source for the Vine server

Your spelling is wrong Pomagranate is spelled Pomegranate

That’s intentional so people don’t get confused whether they are talking about the fruit or the app

It doesn’t work?

Sorry about that, I might be testing new features and they can break things.


nice one, works how intended


This is really good.

1 Like

If I can I would love to help!

1 Like

You can, I’ll see if I can share the glitch project with you. I’m thinking off adding support for music and pictures also.
Also here’s an annoying thing. When the system detects there’s too much files from the preset config variable it will stop saving chunks and you will have to rely entirely on having clients with the chunks being online. However if we start more instances of it we can solve this problem temporarily.
Also videos uploaded to a Pomagranate instance can only be accessed on that instance.

We have a secondary Pomagranate server at https://pomagranate-server-2.glitch.me/
Also another demo video hosted on Pomogranate: https://pomagranate-server-2.glitch.me/watch?v=36eoMi0xO
Inspiration for this came from PeerTube example: https://peertube.cpy.re/videos/watch/e2651856-4809-408a-99d4-b85b01fefb09


Cool! Any way I can help?

1 Like
  1. When I get some more work done you can help be remixing one of them to share the load
  2. Clean up my code a bit and add comments for anyone also helping out. I’ve started a bit on organizing require statements a bit.
  3. Think of new ways to distribute chunks of video.
  4. Once the system is fully complete you are welcome to add something like a comments system, likes and dislikes, etc…
    Update(with WebTorrent): https://github.com/javaarchive/Pomagranate/releases/tag/V1.1.1

An idea : WebRTC streaming

1 Like

Would disqus work for comments?

1 Like

That would be a good idea.

I’m trying to figure out webrtc but there’s a lot of vocabulary in it

you could remix one and link it up?

Yeah, they link up as long as they connected to the same Vine server


Annocument: Developement of this project will most likely resume next monday. I am currently finsihing another project and will add new features to this one when I’m done. Also for those of you running a Pomagranate instance, please note that the chunk size will be changed to 3mb next week because browsers have a storage quota limit of 5mb and each chunk needs to be encoded into a string which makes it take 4/3 more space.

can i help please with html/css

If you want to help with html/css, you can submit pull requests to the github repo so we can see what changes you have added.

I’ve now got a plan of what to do next. To increase the amount of peers I’m going to add a module where users can watch youtube in addition to p2p videos, and seed/download videos.
P.S. Indexeddb has no storage limit except on firefox I think, so I’ll chuck the video chunks in there.
Also all video chunks are now a size of 1mb

1 Like

How do I watch videos? I’m on https://pomagranate.glitch.me/ and have no access to the demo video or any other videos.


Right now there is not list of videos, but you can always upload a video.