The Lifestream Home The Lifestream Forums The Lifestream Shop Donate to The Lifestream
The Lifestream

ARCHIVED FORUMS

Hello. You are currently viewing the old vBulletin forums, which are now in readonly archive mode.
Please go to https://thelifestream.net/forums to go to the current forums.


Go Back   The Lifestream Forums > Site, Forums, Staff & Projects > Forum News & Information

Forum News & Information News and issues concerning the forums go here

Reply
 
Thread Tools
Old 01/25/2016   #1
Cthulhu
Default gifv BBCode

I herd u liek gifs. But I dislike using the animated .gif format to embed videos, it's a terrible format to use, using 100 MB for a video that could be cut down to 5 or less.

Both imgur and (before them) gfycat tried to fixx this by trying to sell the fancy html5 video tag as some kind of 'gif like format'; imgur calls it "gifv" and embeds it like that on its site; saves them heaps in bandwidth (at the cost of having to convert gifs to videos).

Do the same for those on metered internets and mobile connections; use gifv instead of gifs. Only works with gifs hosted on imgur.com. Take the ID of the video (basically everything behind the last slash, or behind the last slash and the dot / extension) and chuck it in between [gifv] tags:

[gifv]DGLfkZg[/gifv]

This is converted to:

Code:
<video poster="//i.imgur.com/DGLfkZg.jpg" preload="auto" autoplay="autoplay" muted="muted" loop="loop" webkit-playsinline="" style="max-width: 100%; height: auto;">
  <source src="//i.imgur.com/DGLfkZg.webm" type="video/webm">
  <source src="//i.imgur.com/DGLfkZg.mp4" type="video/mp4">
</video>
and looks like:



i.e. a html5 video tag with two sources, a .webm format if your browser can play that (Chrome / Firefox / Opera), or the proprietary .mp4 / h.264 format (everything). If your browser can't play it, get a newer one, you're running at least five years behind. But, do let me know if it doesn't seem to work for you.

Unlike the gfycat one, this one shouldn't deform too much, I hope, and should work with edits and shit too. But, IDK, I've never used video tags before and don't know its pitfalls.

Anyone posting a .gif video hosted at imgur via [img] tags will be banned,
Cthulhu is offline   Reply With Quote
Thanked by 13:
Channy (01/26/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Fangu (01/25/2016), Flintlock (01/25/2016), ForceStealer (01/26/2016), Joe (01/28/2016), Lex (01/25/2016), Literally Who? (01/25/2016), Octo (01/25/2016), Shademp (01/25/2016), Tennyo (01/25/2016), Tetsujin (01/26/2016)
Old 01/25/2016   #2
Tennyo
Default

There is an entire thread crying out in joy.
__________________
Tennyo is offline   Reply With Quote
Thanked by 7:
Channy (01/26/2016), Cthulhu (01/25/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Lex (01/25/2016), Literally Who? (01/25/2016), Shademp (01/26/2016)
Old 01/25/2016   #3
Literally Who?
Default

My time has come

Literally Who? is offline   Reply With Quote
Thanked by 7:
Cookie Monster (02/01/2016), Cthulhu (01/25/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Octo (01/25/2016), Shademp (01/26/2016), Tennyo (01/25/2016)
Old 01/25/2016   #4
Cthulhu
Default

Cthulhu is offline   Reply With Quote
Thanked by 10:
Cookie Monster (02/01/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Flare (01/26/2016), Ghost X (01/26/2016), Lex (01/25/2016), Literally Who? (01/25/2016), Octo (01/25/2016), Shademp (01/26/2016), Tennyo (01/25/2016)
Old 01/25/2016   #5
Octo
Default



Did I do right?

So why can't this be used on non imgur gifs? Is that something we have to wait for like hovercars?
Octo is offline   Reply With Quote
Thanked by 4:
Cthulhu (01/26/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Tennyo (01/25/2016)
Old 01/25/2016   #6
Tennyo
Default

Just wait until I'm not at work...
__________________
Tennyo is offline   Reply With Quote
Thanked by 3:
Channy (01/26/2016), Dawnbreaker (01/28/2016), Literally Who? (01/26/2016)
Old 01/25/2016   #7
Literally Who?
Default

Octo wrote:

Did I do right?

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.

So this code most likely won't be able to open non imgur gifs.
Similarly the gfycat code can only play "gifs" from gfycat for the same reason.

As Yop noted the reason is that Imgur and Gfycat are utilizing HTML5 video/webm to convert gifs into this format and just changed the extension to gifv/gfycat as a way to make it more familiar.

The upside is that gifv and gfycat are about 90% smaller files than the original gif with minimal quality loss.

edit:

I should its also super convenient to make one as well.
For instance on GFYcats site you can link a youtube video and punch in the time you want turned into a gif and your done. Perfect for forums

http://gfycat.com/
Literally Who? is offline   Reply With Quote
Thanked by 6:
Cthulhu (01/26/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Fangu (01/26/2016), Octo (01/26/2016), Tennyo (01/26/2016)
Old 01/26/2016   #8
Tennyo
Default

I once found the most magnificent Princess Bride Deal With It gif to ever exist on Imgur, but alas, I am unable to locate it.

Here's a cat tho <3

__________________
Tennyo is offline   Reply With Quote
Thanked by 7:
Channy (01/26/2016), Cthulhu (01/26/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Literally Who? (01/26/2016), Shademp (01/26/2016), Tetsujin (01/26/2016)
Old 01/26/2016   #9
ForceStealer
Default

__________________


hitoshura wrote: Don't belittle my peoples, bitch. We work hard and we do what we're told. And might possibly be Scottish.
ultima espio wrote: I'm not sure if it was a BOMB, it could have been MAKO, KING, BEST, or ORBS.
ForceStealer is offline   Reply With Quote
Thanked by 5:
Cthulhu (01/26/2016), Dark and Divine (01/28/2016), Dawnbreaker (01/28/2016), Literally Who? (01/26/2016), Shademp (01/26/2016)
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/27/2016)
Old 01/27/2016   #11
Channy
Default

So like, can someone hold my hand through this whole process because I'm for some reason either completely inept or can't find a single gifvideo that's applicable for this code.



__________________

So, why do you come here?
Same as you, I think. I've been here a lot...
You must have a lot going on your mind, I suppose.
Yeah, but I'd rather have nothing for a change. How do you do it?
Well, it comes with practice. I can think of nothing.
I do not feel the need to occupy my mind with nonsense, just to avoid thinking about what really matters.

Channy is offline   Reply With Quote
Thanked by:
Lex (01/27/2016)
Old 01/27/2016   #12
Tennyo
Default

It only works for gifs hosted on Imgur.

Put the letters and numbers at the end of the url between the brackets kind of like you do with a YouTube video.

__________________
Tennyo is offline   Reply With Quote
Thanked by 3:
Cthulhu (01/27/2016), Dark and Divine (01/28/2016), Lex (01/27/2016)
Old 01/27/2016   #13
Cthulhu
Default

Or just link us to whatever you're trying to embed, we can help figure it out.
Cthulhu is offline   Reply With Quote
Old 01/27/2016   #14
ForceStealer
Default

So my only question is, what about this is different from just [img ][/img] tagging a gif?
__________________


hitoshura wrote: Don't belittle my peoples, bitch. We work hard and we do what we're told. And might possibly be Scottish.
ultima espio wrote: I'm not sure if it was a BOMB, it could have been MAKO, KING, BEST, or ORBS.
ForceStealer is offline   Reply With Quote
Thanked by:
Flare (01/28/2016)
Old 01/28/2016   #15
Literally Who?
Default

Gifs can range from being 90% to a 100% larger file sizes. So understandably when it comes to bandwidth they can be stressful especially when you consider there might a page filled to the brim with them , such as our TLS gif thread .

Gfycats actual site actually notes the amount of bandwidth saved for instance :

http://gfycat.com/CircularBothDassie?tagname=funny

this in its original gif form was 23mb , and turning it into a gfycat made it 2mb with minimal quality loss.



tl;dr it loads faster.

edit:

hmm interestingly enough when you copy and paste the gfyca page which shows the stats , it just leads you to the embeded page without the stats =/

Well none the less if you want some examples it's as easy as going to gfycat.com and clicking any of the top uploads to see their stats/bandwidth saved.
Literally Who? is offline   Reply With Quote
Thanked by 3:
Cthulhu (01/28/2016), Dark and Divine (01/28/2016), ForceStealer (01/28/2016)
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:45 PM.



Powered by vBulletin®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.