Thread: gifv BBCode
View Single Post
Old 01/26/2016   #10
Cthulhu
Default

Gabriel wrote:
Octo wrote: So why can't this be used on non imgur gifs? Is that something we have to wait for like hovercars?
Imgur automatically converts gifs to gifv which is basically a video where as gifs are more or less image files.
I'm going to take a shot at "most pedantic",

The TL;DR is that I'm too lazy to write code that can detect the kind of URL you're using; it should be reasonably easy to recognise an url from a site that is known to supply video alternatives to .gifs, but, cba. Basically right now I take the image id and insert it into relevant HTML; the IDs would be different for different sites.

gifv is not a format; it's a random alias imgur invented themselves for marketing reasons (gifs are cool with the kids, videos aren't, and they're too st00pid to know the difference). gifs are indeed image files, often animated, but their compression algorithm was optimized for line drawings (animated or not), definitely not video material. There hasn't been another successful "animated image" format (animated PNG is a thing, but that too is more optimized for (line) drawings / simple images, and was intended as a more open replacement for the .gif format).

imgur converts and / or interpolates .gifs to HTML5-compatible video formats; at the moment the most common formats are .mp4 (you should know those), a 'closed source' / licensed format, and .webm, a newish and openish video format invented by Google. IIRC Google made a big push to try and make .webm the standard, but in the end, the standardization committee ended up not deciding on a standard video format - which leaves us here.

What imgur (and gfycat, and probably others) do instead is offer several fallbacks; they convert the .gifs (or videos) to both webm and mp4 and put those as sources in the video tag (so browsers can pick which one they like best), and they even offer a Flash-based alternative video player / format for older browsers (hence the warning that it may not work for some - but, upgrade your browser).

TL;DR: Browser standardization failed so we can't have nice things.
Cthulhu is offline   Reply With Quote
Thanked by 6:
Dark and Divine (01/28/2016), Flintlock (01/30/2016), Lex (01/27/2016), Literally Who? (01/26/2016), Octo (01/26/2016), Tennyo (01/26/2016)