collective / wildcard.media

13 stars 12 forks source link

Extend support to other video services #48

Closed arsenico13 closed 5 months ago

arsenico13 commented 6 years ago

Wildcard.media once supported only YouTube and internal videos. We started with the idea used in redturtle.video to handle different video streaming services like youtube, vimeo, etc. in a simple way.

We chose to use 'named adapters' to identify wich view to use with the video object. This solution is highly pluggable: there can be many plugins installed, one for every video service you want to use. The adapter is chose according to the video url in the video object.

See how we did it. If you like it we can update the README with examples and how-to create a plugin.

For a plugin example: https://github.com/RedTurtle/wildcardmedia.vimeo This is for Vimeo. It's still experimental. We are goin' to update it if you accept this pull request.

ps: We tried to run your tests. They fail if you don't have avconv correctly installed on the machine. If you want I can open an issue about this topic.

djay commented 6 years ago

Why not just include vimeo etc in wildcard.media itself? good idea to use adapters incase there are more obscure services but making integrators find and download lots of packages instead of just one seems like a pain.

cekk commented 6 years ago

That's exactly our usecase: we have a bunch of clients that have videos uploaded to different platforms (some of them are only italian services for public administrations), not only on youtube or vimeo. With this approach (copied from redturtle.video) it's easy to add support to whatever streaming service and keep the base package light.

Of course we can provide a "standard" set of plugins like vimeo if needed. We could add them to setup.py so users doesn't need to search them around pypi.

arsenico13 commented 6 years ago

I removed the unnecessary code pointed out by @pbauer.

About the Vimeo support: which way should I go?

cekk commented 6 years ago

Any news about this pr? We need to start using videos with these features and i need to know if wildcard.media can handle multiple services or not (i don't want to go on production with a never-merging-branch).

@tkimnguyen talking with @obct537 at the conference, seems that wildcard doesn't use this product anymore. Does it needs some maintainers? @pbauer @djay do you use it?

obct537 commented 6 years ago

@cekk Going to look into this today. From a casual glance, it seems to me this should all be fine, but I'm going to dig into it a little deeper. Turns out we do still use it, but in a fairly diminished capacity.

cekk commented 6 years ago

hi @obct537 ..it's me..again ;)

Any news about this pr? We really need to go in production with a pluggable video solution.

If you don't want this kind of changes in wildcard.media, let me know without problems..i can revamp our product, or create a new one.

tkimnguyen commented 6 years ago

@cekk @arsenico13 thx we are discussing this internally today

tkimnguyen commented 6 years ago

@obct537 and I are inclined to merge (again thank you for this work) but since we don't have CI set up (can you help set it up?) can you add relevant tests as well please?

cekk commented 6 years ago

Sure, i'll make a branch with travis config!

cekk commented 6 years ago

@tkimnguyen but i can't enable the project on travis because i don't have enough permissions: https://travis-ci.org/collective/wildcard.media

tkimnguyen commented 6 years ago

@cekk I activated it - anything else I need to do there?

tkimnguyen commented 5 months ago

thx @cekk ! and hello :)