• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

4Chan allows .webm format, world rejoices

Status
Not open for further replies.

Mr.Mike

Member
.

Maybe I'm ignorant, but I don't see the problem. Might as well put that CPU to use and run them properly. GIFs may not have been CPU intensive, but they were also played back terribly.

This is a good point too. Pretty much everyone has a lot more power than they ever really use most of the time. Might as well put it to use.
 

Cse

Banned
Loving webms. How hard is it to create an extension to allow webms to be viewed on a given website?

And what would be the easiest method of creating a webm?
 

Riki

Member
Loving webms. How hard is it to create an extension to allow webms to be viewed on a given website?

And what would be the easiest method of creating a webm?

The extensions for viewing them on here for Chrome and Firefox have already been made and posted. They're very simple scripts.
 

Reversed

Member
Add some GUI options to control stuff like autoplaying, autolooping, native or set width etc. and have click-to-play and it'd be even better.

Right clicking show these options, but I wouldn't be angry if we get a fancier option. :)

And for those who are worried about CPU resources, you can toggle the autoplay option to false in the script. There, all safe.
 

jambo

Member
WebM for NeoGAF (Chrome extension)

Making that stupid screenshot took most of the time, lol. If anyone wants to port it to Firefox or whatever the code ain't complex:

Code:
'use strict';

var videos = document.querySelectorAll('.post a'),
  link, video;

for (var i = 0; i < videos.length; i++) {
  link = videos[i].href;
  if (link.indexOf('.webm') === link.length - 5) {
    video = document.createElement('video');
    video.src = link;
    video.autoplay = true;
    video.loop = true;
    video.muted = true;
    video.width = '500';
    
    videos[i].parentNode.replaceChild(video, videos[i]);
  }
}

There might even be a better way to do it, dunno. Spent about 10 minutes on this haha.

Awesome work, thanks for this.

One thing to note for all users of the NeoGAF Live Thread extension on Chrome, it breaks the webm embed.
 

The Real Abed

Perma-Junior
Maybe I'll incorporate WebM playback into my YouTube Me script.
Do it!

BTW, is there any way to get your script to request the HTML5 version of YouTube videos? All I seem to get is Flash and I keep Flash disabled. It's the only reason I don't use YouTube Me because it requires Flash. If you have an HTML5 option and implement the ability to view .webm inline it'll be amazing.

Nice thing is .webm seems to run directly in Safari through QuickTime so I don't have to download it first and view in VLC.
 

TheSeks

Blinded by the luminous glory that is David Bowie's physical manifestation.
Right click -> Uncheck loop?

Oh nice. Now if you could stop it from auto-loading on start, that'd be great.

Waiiiit, it's still as loop default. What I mean is a toggle in the extensions like your other extensions for GAF and unchecking it to have it be a global non-loop.
 

riotous

Banned
For iOS users VLC works. Just copy the link from safari, open VLC, choose network stream and then click tr button to load it. It picks up your copied URL.
 

Cse

Banned
The extensions for viewing them on here for Chrome and Firefox have already been made and posted. They're very simple scripts.

Does the extension allow one to view webms on other websites?

If not, which part of the code is specific for a given site?
 
WebM for NeoGAF (Chrome extension)

Making that stupid screenshot took most of the time, lol. If anyone wants to port it to Firefox or whatever the code ain't complex:

Code:
'use strict';

var videos = document.querySelectorAll('.post a'),
  link, video;

for (var i = 0; i < videos.length; i++) {
  link = videos[i].href;
  if (link.indexOf('.webm') === link.length - 5) {
    video = document.createElement('video');
    video.src = link;
    video.autoplay = true;
    video.loop = true;
    video.muted = true;
    video.width = '500';
    
    videos[i].parentNode.replaceChild(video, videos[i]);
  }
}

There might even be a better way to do it, dunno. Spent about 10 minutes on this haha.
Downloaded this and went back to the front page

hSRDPHq.gif


#TeamWebm
 

Somnid

Member
Don't know if this'll work but, here's a bookmarklet for made of Andrex's code:

Edit: Nope.

Copy and paste this into a bookmark, it'll turn on webms if you push it in pretty much any browser that supports it.

Code:
javascript:(function(){var%20videos=document.querySelectorAll(".post%20a"),link,video;for(var%20i=0;i<videos.length;i++){link=videos[i].href;if(link.indexOf(".webm")===link.length-5){video=document.createElement("video");video.src=link;video.autoplay=true;video.loop=true;video.muted=true;video.width="500";videos[i].parentNode.replaceChild(video,videos[i])}}})();
 
Does the extension allow one to view webms on other websites?

If not, which part of the code is specific for a given site?

Talking specifically about the Greasemonkey version: there's a metadata entry which restricts the websites the script runs on (in this case, www.neogaf.com/*), but there's no restrictions on where the WebMs are actually hosted. It'll be pretty easy to get this script working for other forums (just change the aforementioned website address).
 

Zomba13

Member
The same GIF for comparison.
iFv9i69f9kwjE.gif


Like night and day in terms of clarity and smoothness!

In the time it took to load that gif the webm played about 4 times and looked better and smoother doing it.

Long live webm!

the greasemonkey script is gold :D
 

Dead Man

Member
Version 2 of my non-autoplaying Greasemonkey script is live. Turns out my first guess was on the money. :v

Now, all WebMs have big stinkin' play buttons on them, so you can't miss them. Also, that simplifies the playing procedure to "left click on them". Much better!

Source code should be on the site, if anyone wants a mirror I'll happily post it here.

[Edit] Everyone's already worked out the change. :v

Excellent, updating now :)
 

Isotope

Member
Version 2 of my non-autoplaying Greasemonkey script is live. Turns out my first guess was on the money. :v

Now, all WebMs have big stinkin' play buttons on them, so you can't miss them. Also, that simplifies the playing procedure to "left click on them". Much better!

Source code should be on the site, if anyone wants a mirror I'll happily post it here.

[Edit] Everyone's already worked out the change. :v

Seriously, thank you so very much for putting this in a Greasemonkey script. You and Andrex rock.
 

alr1ght

bish gets all the credit :)
Version 2 of my non-autoplaying Greasemonkey script is live. Turns out my first guess was on the money. :v

Now, all WebMs have big stinkin' play buttons on them, so you can't miss them. Also, that simplifies the playing procedure to "left click on them". Much better!

Source code should be on the site, if anyone wants a mirror I'll happily post it here.

[Edit] Everyone's already worked out the change. :v

hooray. now we just need an expand to native res and we'll be golden.
 

Cse

Banned
Talking specifically about the Greasemonkey version: there's a metadata entry which restricts the websites the script runs on (in this case, www.neogaf.com/*), but there's no restrictions on where the WebMs are actually hosted. It'll be pretty easy to get this script working for other forums (just change the aforementioned website address).

What about the Neogaf extension?

I actually installed the Neogaf webm extension, went over to 4chan, and was able to view webms without any issues.

Is it simply a matter of having the correct extension, or does the website need to permit something to allow users to post and view webms?

(apologies for the extreme ignorance on this subject)
 

Ran rp

Member
Do the .webms play back at their original resolution, even when embedded at a much lower width size. If so, would it be possible to make them playback in the embedded resolution? Dennis' 4k .webm isn't nearly as smooth as the other ones.

Edit: Nvm, it's smoother now.

Edit: Nvm nvm. Still a bit slow.
 

wilflare

Member
how do I get that Greasemonkey working on Chrome

EDIT: we need some GPU acceleration to prevent WebM from frying our CPUs
 

TheSeks

Blinded by the luminous glory that is David Bowie's physical manifestation.
You don't, you use the version Andrex originally posted. The link is upthread somewhere.

Correct. But Andy hasn't fixed it with things like the greasemonkey script. I'm curious how you open the script in Chrome.
 

Coreda

Member
Ideally (at least for me) an option to autoplay videos when under a specified file size limit would be perfect, eg:

If under [ 1MB ] autoplay.

That way the smaller videos (typically reaction gifs) could play automatically while the larger ones could be static until clicked.
 
Status
Not open for further replies.
Top Bottom