Mp4 Embeds stretch past native resolution & other embed questions


(Keith) #1

I’d love to get some thoughts from all of you on this message from a user on my forum:

"Is there 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!"


I’m debating disabling uploads in general, and forcing people to only share links from trusted sources similar to reddit’s approach. Do you guys have any philosophies on this?


(Keith) #2

Also, here’s a discussion around the same issues that seems to have trickled out:
https://meta.discourse.org/t/should-discourse-convert-gifs-to-mp4-video-files/?source_topic_id=72451

[Corrected to remove a stupid question]


(Joshua Rosenfeld) #3

@zogstrip is not a bot, he’s one of the Discourse engineers :smile:. Looking at the edit history (click the pencil in the top right corner of your post), he simply added a sentence above each of your videos to give them context.


(Keith) #4

Yea, i confused myself a bit as I was googling’ zogstrip’s tool’s that he’s developed. Thanks for the clarification!