Forum: prevent mp4 auto-scale

@Keith Feedback about the forum: do you think there’s a way to prevent mp4 embeds from filling the width of the post, and just stick to their original size if they’re lower than the post width?

E.g. I’d like this mp4 video

To be displayed like its gif equivalent, and not stretched:

Looking at the HTML source, it converts the mp4 link to a <video width="100%" height="100%"> tag; if I remove the width/height parameters, the video displays as expected.


As a side note, I highly encourage everyone to use mp4 over gif:

  • it’s way smaller (for this example, mp4 = 141 KB, gif = 3200 KB)
  • accurately handles 60 fps
  • full color
  • drawback is that it doesn’t autoplay and loop by default (by I know it’s possible in the HTML also)

The ideal solution being that the forum convert all submitted gifs to mp4 internally, to save on bandwidth and disk space usage!

5 Likes

Hmmm… interesting. I’ll definitely add this to the list! I’ll also throw this request over to the OG discourse devs, as they might be interested, or at least might point me in the right direction.

We’re starting work with a new engineer to help us with some more low level work. One of the big discussions that I’d like to have with him is disk space management. We’re possibly looking at a future where we don’t allow user uploads, requiring hot linking from imgur, etc, simply to keep our storage costs as low as possible.

FWIW they had a discussion about auto gif conversion over at discourse: Should Discourse convert GIFs to mp4 video files? - #17 by sam - feature - Discourse Meta but it looks like it’s been forgotten.

Imgur sounds like a good host candidate because they’re already doing that gif > mp4 conversion (cf. their gifv extension)

1 Like

Hi JeanMoreno,

thx, thats realy interesting! Would make the life easier to show something fast in a good quality!

:slight_smile: