[ kaitensushi ] [ news ] [ archive ] [ wildcard ] [ lounge / arcade / kawaii / kitchen / tunes / culture / silicon ] [ yakuza ] [ hell / lewd ] [ ? / tweet / irc / tip jar ] [ lain / lewd / uboa ] [ x ]

/silicon/ - technology

from the trenches
Name
Email
Subject
Comment
File
:
Embed
Password (For file deletion.)

• Files Supported: webm, swf, flv, mkv, torrent, 7z, zip, pdf, epub, & mobi.
• Embeds Supported: youtube, vimeo, dailymotion, metacafe, & vocaroo.
• Max. post size is 10MB / 4 files.


Remember to keep it cozy!


File: 1439428360088.png (199.49 KB, 1235x650, 19:10, us-r=xy:g=xy:b=xy.png) ImgOps Google iqdb

 No.45

Just your average A/V encoding enthusiast's thread.

Talk about codecs, containers, colorspaces and what you've been up to.

I've been playing around with ffmpeg's 'geq' filter from libavfilter. It essentially allows you to set the colour and alpha channels of each pixel depending on an equation you specify.

The command:

$ ffmpeg -i input.png -c:v png -filter geq='r=X*Y:g=X*Y:b=X*Y' output.png

produces the output on the left for any picture (but obviously the dimensions affect it).

 No.46

File: 1439429967658-0.png (183.23 KB, 1235x650, 19:10, us-r=tan(X Y) 15:g=tan(y) ….png) ImgOps Google iqdb

File: 1439429967659-1.png (183.65 KB, 1235x650, 19:10, us-r=tan(X Y) 50:g=tan(y) ….png) ImgOps Google iqdb

File: 1439429967659-2.png (187.89 KB, 1235x650, 19:10, us-r=tan(X Y):g=tan(y):b=t….png) ImgOps Google iqdb

Now I think this is cooler.

ffmpeg -i input.png -c:v png -filter geq='r=tan(X+Y)+15:g=tan(Y)+15:b=tan(X)+15' output.png

What's really great about this one is if you vary the '15' in the above command, you get a different frequency of red, green and blue lines.

Now for some maths:
The redness of every pixel is decided by the function r = tan (X + Y) + 15, where X and Y are the coordinates of the pixel in question. tan θ is an asymptotic function that rises and rises to approach infinity when θ gets near 90, then 270, then 450, and so on. So, the strong red lines are when X + Y equal those values of θ.

 No.181

Well. Be sure to know that there's at least one person interested in what you post here.

 No.182

>>181
Ditto.

 No.187

File: 1450447756753-0.jpg (122.39 KB, 1280x720, 16:9, nora.jpg) ImgOps Exif Google iqdb

File: 1450447756753-1.jpg (114 KB, 1280x720, 16:9, , Y 10).jpg) ImgOps Exif Google iqdb

File: 1450447756753-2.jpg (254.49 KB, 1280x720, 16:9, , Y).jpg) ImgOps Exif Google iqdb

>>181
>>182
Why, thank you!

In that case:

It is very easy to make the cool 3-D glasses effect with ffmpeg:
simply reset the red colour value of each pixel to that of a different pixel with geq.
$ ffmpeg -i INPUT.jpg -c:v mjpeg -filter geq='r=r(X - 10\, Y)' OUTPUT.jpg

Change around the formula in bold to yield different results.

Here are a few I made earlier, with the formulae in the file name.



Delete Post [ ]
[Return] [Go to top]
[ kaitensushi ] [ news ] [ archive ] [ wildcard ] [ lounge / arcade / kawaii / kitchen / tunes / culture / silicon ] [ yakuza ] [ hell / lewd ] [ ? / tweet / irc / tip jar ] [ lain / lewd / uboa ] [ x ]