Live data from Hacker News

Twitter's GIF hack

blog.embed.ly

41–50 of 160 posts

Re: Twitter's GIF hack

#41
post #33

I'm curious if anyone is noticed the flickering Loading icon when the .mp4 version loops? It only shows up for 50 ms, but seems kind of annoying. Or maybe it's just my machine? Here's a cap: http://imgur.com/2R84ImD

Yeah, I see it too. Very annoying.

Re: Twitter's GIF hack

#42
post #10

This is on a fully-patched RHEL6 workstation: http://i.imgur.com/NleqJTD.png Another example of "use bleeding-edge tech or go fuck yourself" from the modern web.

Strangely I get that same message on my win7 machine running current chrome as well as my lubuntu machine running chromium. On both when I click the "click to view on original site" link it works fine.

Re: Twitter's GIF hack

#44
post #12

This is not true: "A GIF is literally a sequence of independent images squeezed into the same file. An mp4 video can take advantage of all kinds of fancy compression techniques like keyframes and forward-predictive frames." That's not why the mp4 is smaller. A GIF is not [just] independent images, you can have each frame reuse pixels from previous frames. The mp4 is smaller because lossy jpeg compression is used on e…

GIF can have individual pixels that are preserved frame to frame, but an MP4 can do much more. A GIF is lossy because you lose color information.

Re: Twitter's GIF hack

#45
post #33

I'm curious if anyone is noticed the flickering Loading icon when the .mp4 version loops? It only shows up for 50 ms, but seems kind of annoying. Or maybe it's just my machine? Here's a cap: http://imgur.com/2R84ImD

I noticed it once, and then I kept watching and couldn't see it again so I thought I was just imagining it.

Re: Twitter's GIF hack

#46
post #23

Earlier quoted context omitted.

You choose not to use the appropriate software to experience what is being offered. This is akin to riding a decrepit horse on a racetrack while whining about how everyone else that is riding a healthy horse is going faster and having a better experience than you. Just upgrade.

Your analogy is stupid and your comments are not helpful. I'm not modifying 3,600 workstations because some web programmer decided to mangle user-uploaded content without doing fundamental work to ensure graceful degradation.

But that's your choice, as was Twitter's choice to make a modification compatible with the majority of its users.

Re: Twitter's GIF hack

#47
post #12

This is not true: "A GIF is literally a sequence of independent images squeezed into the same file. An mp4 video can take advantage of all kinds of fancy compression techniques like keyframes and forward-predictive frames." That's not why the mp4 is smaller. A GIF is not [just] independent images, you can have each frame reuse pixels from previous frames. The mp4 is smaller because lossy jpeg compression is used on e…

Sorry but H264 does not use JPEG for its keyframes, although it's not very different. There are a lot of differences between GIF and H264, like H264 specifies that you can use multiple reference frames, which is not the case with Animated GIF. Also H264 has motion compensation, which does not exist with GIF.

GIF basically rewrites completely a part of the picture, while the remaining part is reused. And if you consider that a rewrite of a small part of the frame to reuse the remaining part from the previous frame is just displaying a new gif on top of a part of the old one, the you can consider that it is a sequence of independent images. Maybe they don't all have the same size and are not meant to be displayed at the same position, but they are independent in the sense that you don't need a previous or future frame to display one frame.

And I wouldn't refer to GIF as lossless, except maybe if your original animation used only 256 simultaneous colors per frame. You lose information by down-sampling your colors.

Re: Twitter's GIF hack

#48
post #12

This is not true: "A GIF is literally a sequence of independent images squeezed into the same file. An mp4 video can take advantage of all kinds of fancy compression techniques like keyframes and forward-predictive frames." That's not why the mp4 is smaller. A GIF is not [just] independent images, you can have each frame reuse pixels from previous frames. The mp4 is smaller because lossy jpeg compression is used on e…

Not quite true yourself :).

GIFs store deltas, true, but they are still raster images.

H.264 on the other hand contains specific techniques for compressing sequential frames, including things like recording only pixel motion for some frames. You can see it in those "corrupt movies" gifs (which on twitter would be mp4s... talk about irony) where you take a clip and remove some keyframes from it - then transformations are applied on the wrong blocks and you get really weird things like someone's head splitting open and stuff flowing into each other.

Additionally keyframes in movies are usually compressed with even more loss than standard jpegs. In most cases only the Y channel is recorded at full resolution and the two colour channels - U and V - are recorded at half.

There is also motion-jpeg which really is literally a sequence of jpeg images.

Re: Twitter's GIF hack

#49
post #34
post #26

Earlier quoted context omitted.

WebM works fine on this machine. mp4 does not. This is why there was a bit of scuffle, as you may recall, about video formats on the web.

Are you saying that WebM, a file format introduced in 2010, is less bleeding-edge than H.264 MP4, a file format introduced in 2003? What definition of "bleeding-edge" are we using here?

The introduction date of the format doesn't seem very relevant, since what we are talking about is native inline browser support.

Re: Twitter's GIF hack

#50
post #24

So. Who was first. 4chan or twitter? How long has twitter been doing this? Just out of curiousity. (Yes I know 4chan doesn't convert but there was some talk that 4chan might be a major player in pushing webm forward. Is it even webm or x264? On mobile. Can't check right now.)

gfycat.com and others have been doing this for a while.
Post reply on HN