Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resizing embedded video with nearest-neighbour alg

When embedding a video, no matter if it's flash or by <video> tag, when it gets resized, it uses bilinear scaling, so the video looks blurry and bad.

Is there a way to resize the video container using nearest-neighbour algorithm, so it looks sharp?

Tried using this: http://jsfiddle.net/apx6c4da/

I don't know what's the correct approach to it.

like image 614
VixinG Avatar asked Oct 15 '25 11:10

VixinG


1 Answers

As of today, there's no setting that does what you ask on the video itself.

For images, there's the experimental image-rendering css attribute, but it doesn't work on video.

image-rendering: pixelated;

Here shown on a canvas element mirroring the output from a video element. The same style is applied to the video element but as you can see it does nothing.

https://jsfiddle.net/1y5bvr8o/1

like image 198
Jan Avatar answered Oct 18 '25 04:10

Jan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!