Handling uploaded videos


(Tom Bartlett) #1

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?


#2

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.

As per the comment made by @zogstrip here:

https://vimeo.com/232458407

Becomes


(Tom Bartlett) #3

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.