twbartlett is looking for a way to handle video uploads in Discourse, as the platform is not designed for video hosting. The proposed solution involves using a 3rd-party transcoder or direct upload to Vimeo or similar services. mikechristopher suggests using Onebox to handle Vimeo files.
The initial approach involves:
User uploads video file
Post events/hooks transfer the file to a video encoding service (e.g., Vimeo, Coconut)
API/Webhooks respond to external video ready event
Re-writing/rebaking the original post with a URL to the externally hosted, encoded video
twbartlett explains that this approach is necessary to meet client requirements.
However, codinghorror notes that Discourse is not meant for video sharing and that such a solution would significantly increase server resources.
sam suggests using existing video providers like Brightcove, YouTube, and Vimeo, and storing videos on these platforms to use Onebox.
Additionally, ti0 mentions a plugin that allows users to upload videos to Vimeo and YouTube.
The community is still seeking a solution, and dadudster inquires about the implementation of the proposed solution.
We have a client who would like to upload video - but this could be any video and would need transcoding.
Discourse is clearly not a video hosting platform - so we were thinking about trying to involved a 3rd party transcoder, or possibly some sort of direct upload to Vimeo or similar after the user uploads the file.
Does this sound like a reasonable approach and any ideas on how this might be achieved?
I assume that a customised Onebox view may help somewhere?
Onebox already handles Vimeo files - I don’t know if vimeo allows files to be uploaded remotely via some other means but if they uploaded directly to Vimeo and then linked to it - it would work ok.
Thanks for this, I think our requirement was mainly to allow users to directly upload a video into discourse - which I understand is an edge-case at best.
We will attempt something a bit like this;
User uploads video file
Use post events / hooks to transfer the file to a video encoding service (vimeo, coconut or something)
Use API / Webhooks to respond to external video ready event
Re-write / Rebake the original post with a URL to the externally hosted, encoded video (e.g. vimeo.com/12345) which OneBox can handle nicely for us.
At least, that’s the theory. It’s a long way around, but it will fit the client’s requirements nicely.
@twbartlett: Did you guys ever end up implementing the solution you posted here and if so would you be willing to share what you did? I’m looking for a similar solution on my forum.
Discourse isn’t meant to be a video sharing solution – and there are dozens of very mature and free existing video sharing sites which are video sharing solutions. So the rather complex engineering described above (which would also massively increase your CPU and RAM requirements on the server, by an order of magnitude or more) is unlikely to happen for the forseeable future.
@dadudster@twbartlett@mikechristopher maybe a bit late, though I felt it’s worth mentioning - yesterday I released a plugin that let’s Discourse users upload videos to Vimeo and YouTube: