GFYCat

Geostigma

Pro Adventurer
AKA
gabe
So liek I'm to lazy to check if embedding a gfycat in img tags will work but on the off chance it does not could that be a functionality of this forum? :monster:
 

Tennyo

Higher Further Faster
I tried Googling it and I still don't know what it is...

Some sort of a looping image?

Isn't that what a normal gif is?
 

trash panda

---m(O.O)gle---
AKA
Howl
^^^ I'm sorry, did you just say that Google did not have the answer...?

wtf.jpg
 

Ⓐaron

Factiō Rēpūblicāna dēlenda est.
AKA
The Man, V
How does one go about adding the functionality for such a thing?
 

Ⓐaron

Factiō Rēpūblicāna dēlenda est.
AKA
The Man, V
I'll look into that within the next couple of days, thanks.
 

Cthulhu

Administrator
AKA
Yop
It's not actually a gif; it's embedded html5 video, :monster:. IDK why people consider it some different magic format tbf. Maybe the image hosters position it as an image format instead of a video because people will go 'ew no videos r heavy', or maybe 'well if its video where are the play controls and sound?????'

I do approve though; .gifs are a shit format for animations / videos, gfys / gifvs / html5 video has up to 90% better compression quality. imgur will actually default to html5 video instead of .gifs if you're just browsing it / your browser supports it.
 

Cthulhu

Administrator
AKA
Yop
Yeah; Imgur went and marketed it as an image format (.gifv), but it doesn't work like an image format (you can't use the img-tag for it); it's basically an embedded html5 video, so you'd need a bit more stuff around it. Viewing the source gives you this:

54EQgpE.png

so you've got the HTML5 video, two formats (.webm (chrome et al) and mp4, and a Flash video alternative / backup. I don't blame them TBF, the .webm version is just 3.3 MB vs almost 30 MB for the .gif version - and for a party like imgur, their main cost is in bandwidth.

The downside is that it's not easy to embed. You could use an iframe I guess, but you'd need to know the rough dimensions of the image.
 

Cthulhu

Administrator
AKA
Yop
http://www.gfycat.com/about actually lists a handy guide:

1. Add
Code:
<script>
 (function(d, t) {
    var g = d.createElement(t),
        s = d.getElementsByTagName(t)[0];
    g.src = 'http://assets.gfycat.com/js/gfyajax-0.517d.js';
    s.parentNode.insertBefore(g, s);
}(document, 'script'));
</script>
to web page (which actually injects a script into your page itself)
2. add
Code:
<img class="gfyitem" data-id="everyillchick" />
3. ?????
4. PROFIT!

Only works for gfycat though. I'll have a fiddle.
 

Cthulhu

Administrator
AKA
Yop
It's pretty nifty actually :monster:. One thing to note is that if you edit your poast instead of add a new one, it won't show up. Might also not work right with the quick reply, let me test (this thing is originally 10 MB as a .gif, 800 KB as a video)



Also should I rename or alias the bbcode to just 'gfy'?

edit: yeah doesn't work with quick post either. Refresh the page after poasting to see it.
 

Cthulhu

Administrator
AKA
Yop
I'm afraid not; it's a gfycat only thing for now. I can look into embedding imgur gifv's too. The problem there is that html5 video isn't really a standard; sure you have the <video> tag and shit, but gyfcat/imgur's implementations both have to do a thing that deals with a video format depending on browser used; shit like:

* if firefox: use H.264 or whatever it was
* else if chrome: use webm
* else: use flash video

The fail with the HTML5 video spec is that it never decided on a codec, which led to fragmentation and off course the proprietary video encoders to have a say in it. Oh, and stuff with DRM.

anyway I'll look into it. If I could be arsed, I'd adjust the img tag code to auto-detect whether an image is an imgur gif (if so, transform to .gifv and embed) or a gfycat thing.

edit: looked into it; no obvious way :/.
 

Cthulhu

Administrator
AKA
Yop
I fixed the gfycat bbcode, now works the same as the gifv tag, just adds a video tag to the page.

If it doesn't work for you, get a browser made less than five years ago :monster:

I may if requested turn off the autoplay feature for mobile users, but even for those, internet video is much, much better than the - always downloading and autoplaying - .gif format.

Don't use .gif for videos or video clips, srsly.
 

Geostigma

Pro Adventurer
AKA
gabe
I fixed the gfycat bbcode, now works the same as the gifv tag, just adds a video tag to the page.

If it doesn't work for you, get a browser made less than five years ago :monster:

I may if requested turn off the autoplay feature for mobile users, but even for those, internet video is much, much better than the - always downloading and autoplaying - .gif format.

Don't use .gif for videos or video clips, srsly.

All things considered with how easy it is to convert a gif and video to gfy on gfycat and gifv on imgur maybe it would be ok to just disable gifs on TLS?

They are outdated, much larger and offer very little in the way of quality difference to HTML5 video. There really is no upside and they bone anyone on mobile or with a data cap .
 

Cthulhu

Administrator
AKA
Yop
I wonder if that would be possible tbf, given how I don't think the software checks images hosted on 3rd party websites. And static .gif is fine, it's not trivial to determine (server-side) whether an image is animated or not.

For now, let's just do some community advisory, point out how people should be using the gifv tags instead of gifs (if they use them).
 
Top Bottom