Using Discourse to create a video library to embed videos in posts?

AI-generated summary

Using Discourse to Create a Video Library

Ian_Walker is exploring the possibility of using OneBox to create a video library within Discourse, allowing users to upload and embed videos in forum threads. pfaffman notes that while it is technically possible, file size limitations and the lack of proper streaming features may present challenges.

pfaffman suggests using an external file-sharing service to overcome these limitations. bartv agrees, highlighting the need for multi-bitrate support and proper streaming features.

Ian_Walker asks how to use OneBox to upload videos, and pfaffman responds that simply uploading the videos should work. However, Richie reports that uploaded videos appear as attachments with download links rather than embedded players, and that editing the post to remove the attachment link is required to display the video player.

codinghorror disputes this, stating that the feature works as intended and providing an example from try.discourse.org. The issue may be specific to the installation rather than a general problem with Discourse.

Hello.

Is it possible to use OneBox to create some sort of video library where we can upload video files that can later be embedded in forum threads? I’m just seeing if this can be achieved internally through using Discourse instead of just embedding videos from YouTube instead.

Many thanks.
Ian

Yes, it should work fine, but… The problem is file size. You can increase the default somewhat, but there are constraints that limit to only a few minutes of video. You’ll really need some external file sharing service.

Also note that Discourse will offer simple file-based video playback, not proper streaming with features like multi-bitrate support etc. Depending on your needs, it might not give the best user experience.

Hello.

Thanks for replying. How would I use OneBox to upload all of these video for use then in Discourse?

Thanks.

Just upload them and they work. Check on try.discourse.org if you don’t have your own site.

Interesting, when I upload videos they appear as an attachment with a download link, rather than an embedded video player.

If I edit the post afterwards and dismantle the attachment download link, leaving just the URL to the .mp4 video then an embedded player magically appears.

Am I doing something wrong?

Hmm. That’s not what I remember, but it was over a year ago when I tried it.

Perhaps you need a theme component to handle it now?

No, it works fine, as you can see here. This implies there’s a problem with the install on their end.

Unless you can repro a problem on try, but I’m not seeing one. Here’s a screenshot of me sending a PM to myself with that sample video clip on try.discourse.org

Raw post source is

https://discourse-cdn.freetls.fastly.net/try/uploads/default/original/1X/17735b4721faa7d59e1fd8a2300135a3f04c9ea6.mp4