f-log

just another web log

02 Jun 2019:
deep dive into oioiiooixiii
After a lot of Googling for the previous ffmpeg references I came across this 16x9 video grid created in FFmpeg.
Then I found some other interesting stuff on that site and spent too many hours pouring through ever single post for the last 4 years.
this is just some of the amazing stuff I found;


windows xp image viewer rotations with automated save
https://oioiiooixiii.blogspot.com/2014/08/the-effects-of-rotating-images-in.html

mplayer entropy
https://oioiiooixiii.blogspot.com/2014/09/mplayer-loop-entropy.html
https://oioiiooixiii.blogspot.com/2015/03/how-to-progressive-chroma-glitching.html
https://oioiiooixiii.blogspot.com/2015/05/comparing-mplayer-glitching-of.html

ffmpeg-chromatic-aberration - complexity and power
https://oioiiooixiii.blogspot.com/2015/07/ffmpeg-chromatic-aberration.html

ffmpeg recursive capture snake
https://oioiiooixiii.blogspot.com/2016/05/ffmpeg-recursive-video-capture.html
and chroma
https://oioiiooixiii.blogspot.com/2017/09/ffmpeg-rainbow-trail-chromakey-effect.html

ffmpeg recursive stacking
https://oioiiooixiii.blogspot.com/2016/08/ffmpeg-recursive-effects-of-stacking.html

ffmpeg video stabilisation
https://oioiiooixiii.blogspot.com/2016/09/ffmpeg-video-stabilisation-using.html

ffmpeg crazy
https://oioiiooixiii.blogspot.com/2016/09/ffmpeg-create-video-composite-of.html

ImageMagick plus sed
https://oioiiooixiii.blogspot.com/2017/03/bash-glitch-images-using-sed.html

ffmpeg-predator-1987-movie-adaptive camo
https://oioiiooixiii.blogspot.com/2017/06/ffmpeg-predator-1987-movie-adaptive.html

ffmpeg-144-16x9-grid-of-random-limmy
https://oioiiooixiii.blogspot.com/2017/08/ffmpeg-144-16x9-grid-of-random-limmy.html

ffmpeg based video editor
https://oioiiooixiii.blogspot.com/2017/08/ffmpeg-simple-video-editor-with-zenity.html

ffmpeg temporal slice stacking
https://oioiiooixiii.blogspot.com/2017/11/ffmpeg-temporal-slice-stacking-effect.html

ImageMagick reversible obfuscation
https://oioiiooixiii.blogspot.com/2018/02/imagemagick-reversible-image-masking.html

CRT affect in ffmpeg
https://oioiiooixiii.blogspot.com/2019/04/ffmpeg-crt-screen-effect.html

bash voices
https://oioiiooixiii.blogspot.com/2018/08/bash-create-cacophony-of-voices-with.html
01 Jun 2019:
fighting ffmpeg for a grid layout that does not suck
OK, so who ever wrote the FFmpeg documentation for xscale must have been high or having a laugh.

That last input string
xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
created this pattern from my nine videos;
285
413
769

to get the more sensible;
123
456
789
pattern use
xstack=inputs=9:layout=0_0|w0_0|w0+w1_0|0_h0|w0_h0|w0+w1_h0|0_h0+h1|w0_h0+h1|w0+w1_h0+h1

strangely
xstack=inputs=9:layout=0_0|w1_0|w1+w2_0|0_h1|w1_h1|w1+w2_h1|0_h1+h2|w1_h1+h2|w1+w2_h1+h2
did not work, even though all the videos are the same size.
and
xstack=inputs=9:layout=0_0|1_0|2_0|0_1|1_1|2_1|0_2|1_2|2_2
really did not work, though at the outset it seemed the most logical. It created the grid at single pixel offsets with the last video covering all the rest, bar a two pixel line on the top and left.
01 Jun 2019:
ffmpeg video 3x3 grid with scaling
More FFmpeg, this time creating a 3x3 grid of nine videos, scaling each by 3 before combining them.

Once again this was a lot of trial an error, and more error, until it worked.
ffmpeg \
-i video1.mp4 \
-i video2.mp4 \
-i video3.mp4 \
-i video4.mp4 \
-i video5.mp4 \
-i video6.mp4 \
-i video7.mp4 \
-i video8.mp4 \
-i video9.mp4 \
-filter_complex "[0:v]scale=w=iw/3:h=ih/3[v0]; \
[1:v]scale=w=iw/3:h=ih/3[v1]; \
[2:v]scale=w=iw/3:h=ih/3[v2]; \
[3:v]scale=w=iw/3:h=ih/3[v3]; \
[4:v]scale=w=iw/3:h=ih/3[v4]; \
[5:v]scale=w=iw/3:h=ih/3[v5]; \
[6:v]scale=w=iw/3:h=ih/3[v6]; \
[7:v]scale=w=iw/3:h=ih/3[v7]; \
[8:v]scale=w=iw/3:h=ih/3[v8]; \
[v0][v1][v2][v3][v4][v5][v6][v7][v8]\
xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2" \
grid.mp4


Specify each of your input videos.

Create a Complex Filter and map each video to itself scaled down by a 3rd to [vn]. Where n is the input reference.

Then feed all those new mapped inputs into the xstack filter which creates the output. Using the layout from the Documentation. I have no idea what all that means.

Do not try and map the xstack filter to a new stream and then use the -map option to get it at the end, does not work!
loading results, please wait loading animateloading animateloading animate
[More tags]
rss feed

email

root

flog archives


Disclaimer: This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk In fact I'm not responsible for anything ever, so there!