A Demo with a Few Tips on Simple Video Manipulation

Getting/Making the Components

(somewhat raw, this presentation, hopefully newbies might find it useful, not for advanced users)

The base files for the video, which you can read about in the other page, which here I will explain how to make, can be some gotten/one other is best if it is made by yourself (later about that), by, best, following instructions towards the posts relatively recent at the time of this writing, and which are currently the latest posts of that topic of mine on Gentoo Forums, of that topic which deals with building a fine (I'd almost say: home-brew) Gentoo for countering surveillance/intrusions on your own turf --your turf being: your machine and your ways on the Internet.

That story, about Air-Gapped Gentoo, is at this address:
Air-Gapped Gentoo Install, Tentative
and how to get the video and accompanying traffic capture, is explained in the two, at the time of publishing this, latest posts of that story.

However, for reasons of phpBB (used for forums generally, not being always friendly to posting scripts --such as it sometimes adds spaces and makes the backslashes at end of lines, with them added spaces, non-functional-- or being there in question some other non-related fault, I'll reproduce the script to use in this tutorial, and also you can separately download it (the best way).

For talk about it, I think you could ask me about it on Gentoo Forums, on any issues you may have. It's easy to register and participate. I do give my readers my email addresses, it is miro (dot) rovis (at) croatiafidelis (dot) hr as well as miroslav (dot) rovis1 (at) zg (dot) ht (dot) hr, but I'm censored by the regime currently in power in Croatia. You can try, allowing circa ten days --even if they do let it through-- for my reply --and only if they do let my reply through. Correct! People send/get something successfully, and typically think all is well forever. I wish!

No warranties of any kind. Anything you try, you assume the responsability for any consequences that might ensue. Read all this page and possibly other necessary info, if pointed to, before use.

So, that said, and that done, if this is your second read of all of this, gentle reader, you probably could now go and download:

wget http://www.CroatiaFidelis.hr/gnu/.hm/.dump_140516_193521_naibd6++.pcap

Rename it:

mv -iv .dump_140516_193521_naibd6++.pcap dump_140516_193521_naibd6++.pcap

Make a directory, exampli gratia:

mkdir ukrainian.d/

Ukraine is the home of a Nation which is related to my Croatian Nation, so I like to use that name. But you can choose any name.

Copy the file you downloaded into that dir.

cp -iav dump_140516_193521_naibd6++.pcap ukrainian.d/

Enter into that dir.

cd ukrainian.d/

Make this little script. Just paste this content into a file recov.sh.
(recov for recover [those "corrupted?" no!, hidden] data)
(best is to download the script as well, and verify it with GnuPG).


cat dump_140516_193521_naibd6++.pcap \
    | split -d -b4295443 - dump_140516_193521_naibd6++.pcap
read FAKE
cat dump_140516_193521_naibd6++.pcap01 \
    | split -d -b2045043 - dump_140516_193521_naibd6++.pcap01
read FAKE
mv -iv dump_140516_193521_naibd6++.pcap0100 \
read FAKE
cat dump_140516_193521_naibd6++.pcap0101 \
    | split -d -b49822 - dump_140516_193521_naibd6++.pcap0101
read FAKE
mv -iv dump_140516_193521_naibd6++.pcap010100 \
read FAKE
cat dump_140516_193521_naibd6++.pcap00 dump_140516_193521_naibd6++.pcap010101 \
    > dump_140516_193521_naibd6.pcap

So select and copy that code, and paste it like so:

cat > recov.sh
[ here paste that code ]
[ and issue Ctrl-D ]

Or you can simply download that script:

wget http://www.CroatiaFidelis.hr/foss/cap/cap-140516_SchI/recov.sh

Anyhow you got the script, do:

chmod 755 recov.sh

Just, before you run it, being surely in the ukrainian.d directory, if you're not advanced, check as the script is running what it does.

For that reason there are the lines `read FAKE' that do nothing but wait for your input of Enter to continue executing, or Ctrl-C to get out of it, if it creates a mess for you.

So get ready to follow what the script does from another terminal.

And then run it:


Of what that gets you, you only need two files, the *.gg ones.
So you can:

mkdir DEL
mv -iv * DEL/


mv -iv DEL/*.gg .

And now you should have:

ukrainian@mybox /some/where/ukrainian.d $ ls -oh --time-style=iso
total 2056
drwxr-xr-x 2 ukrainian 4.0k 04-16 21:56 DEL
-rw-r--r-- 1 ukrainian  48k 04-16 21:48 dump_140516_164150_naibd6_Schmoog_intrusion.gg
-rw-r--r-- 1 ukrainian 2.0M 04-16 21:48 Screen_140516_164150_naibd6_Schmoog_intrusion.gg
ukrainian@mybox /some/where/ukrainian.d $ 

It would still be no use having those files for you. For the Wisdom of the Worlds Even Unknown, not even for Schmoog would it be of any use! Unless they really engaged, but more than you think!

I leave a few thoughts out from this presentation, about encryption, for you to read at there in bottom of that post, I won't copy those thoughts here. Our concerned is some simple video editing in this page.

Those two files are encrypted symetrically with gpg. Here's the password:


So what you need to do is:

gpg -d dump_140516_164150_naibd6_Schmoog_intrusion.gg > \


gpg -d Screen_140516_164150_naibd6_Schmoog_intrusion.gg > \

And while you're completing your preparations, download also the SUMS and the SUMS.sig.

wget http://www.CroatiaFidelis.hr/foss/cap/cap-140516_SchI/SUMS
wget http://www.CroatiaFidelis.hr/foss/cap/cap-140516_SchI/SUMS.sig

That video, along with the network capture dump during the same online period of time, have been taken SHA256 sums of, right after the online time was over.

And now, if you tried, and didn't make it, here's the option for you to download them without those instructions above, in case you find them too difficult for you to follow.

wget \
wget \

The sums were taken, and posted, again, at the day and time very soon, within minutes, after 2014-05-16 16:41:50, and, within minutes, posted on that page of the topic.

So they can be with very high degree of probability accepted as screencast and packet capture truly taken at that time, and neither the video nor the dump being, nor any part thereof, from any other time, nor them, or any part therof, being manipulated in any way after that time. Those sums have been consistently shown on that page of the trustworthy Gentoo Forums ever since then, and will likely continue to be so, till, hopefully, some time, well.. `some' is used in a very broad meaning here, before Judgement Day.

NOTICE: While you are also offered a way to try a few tricks of video manipulation without much ado of your own, it is strongly recommended for the steep-learning-curve-in-free-FOSS-Linux-computing newbie lovers and any new FOSS enthusiasts, to try out the script provided above, and extract the original video hidden in the other encrypted content, as explained above.

A Few Simple Video Manipulation Tricks in Action

First create, an empty directory where you have all the necessary permissions as user, which if you call SchI, see below, you will know what that dir contains, and cd into it. It is where you will be, and where I was for my writing of this, shown to you with `ukrainian@uabox SchI $'.

`ua' is just the 2-letter code for Ukraine, my brotherly nation which Mother Russia is trying to dismember... You surely have your own different machine name.

Next copy the files you got in previous step to that directory. You could move them there, but why not have a backup?

I have some conversions and video manipulations to do, so let's make the filename sufficiently telling (for me, while working it), but less long:

ukrainian@uabox SchI $ mv -iv Screen_140516_164150_naibd6_Schmoog_intrusion.mkv \

`Schm' stands for Schmoog (a term of endearment for Google), and `I' is for Intrusion.

I want to make an HTML5 compliant video. but that conversion is last to do. x264-encoded videos are much faster to convert and manipulate, and lots of conversions and manipulation is ahead of me.

I also just (not `just' anymore, but more closer to two days ago: I've been writing this presentation for some two days; this notice is at my likely nearing of my completing of it)...

[I also, not just, but two days ago] made a video with opening in Wireshark the network capture dump and manually rolling screenful by screenful from start to end while previously having fired this command:

ukrainian@uabox SchI $ ffmpeg -f x11grab -s 1366x768 -r 25 -i :0.0 -c:v libx264 \
    -preset ultrafast Screen_$(date +%y%m%d_%H%M)_`hostname`.mkv

The `-s 1366x768' is because my monitor on this box is 1366x768 (and if you're screencasting on your own machine you should replace that with whatever your monitor's display is) and `-r 25' is the old common standard in the Old World, the 25 fps, such as for PAL, still used a lot.

That is a general command, and I put the $(date +%y%m%d_%H%M) in it to not overwrite my older attemps if I had made any.

This got me the screencast:


In this case the date doesn't matter (for keeping), because I only need it for what I got much earlier, on 2014-05-16 16h.


Many small video-editing entities, such as even small TV stations video editing either staff or their programs, do not know how to do this.

Precision cutting with FFmpeg can be obtained by reconverting, the video(s) to cut, with:

for i in $(<ls-1_Mkv) ; do ffmpeg -i $i.mkv -g 10 ${i}_g10.mkv ; done

where `ls-1_Mkv', in this case of mine, consisted of the list of only one filename without the `.mkv' extension, and the group of pictures (GOP) option, the `-g 10', produces a video that can usually be cut to as precisely as: around 0.2 second precision (LATER REMARK: in my latest video manipulations, `-g 5' gets me around 0.1 second precision).

Once I so converted it, I replaced the old with it:

mv -iv Screen_150404_1948_gbn_g10.mkv Screen_150404_1948_gbn.mkv


The cutting itself is done with mkvmerge (if you're reproducing my next step, you can only do it, as I explained, on your own screencast of your day, so the following is not applicable verbatim):

mkvmerge -o Screen_150404_1948_gbn_.mkv --split timecodes:0:57.0,1:04.40 \

Note that most of the commands further down from here, not all, but most (unless you go for the really lazy option of downloading my own Screen_140516_SchmI_dump.mkv in which case it applies for all commands; but that is not recommended, unless you are very new to FOSS Linux and all of this is too hard for you to grasp otherwise), [most of the commands] will be applicable for your copy-pasting them and trying them out literally, just this second video you need to, or should, prepare it yourself.

So after cutting the today's screencast for the needed Wireshark rolling down, I renamed it to Screen_140516_SchmI_dump.mkv with:

mv -vi Screen_150404_1948_gbn_-002.mkv Screen_140516_SchmI_dump.mkv

But that screencast is not yet the actual video as will be used for later manipulaton. That one contains the screencast of my entire 1366x768 screen, all that happened in that short period of time on it, but I only need my rolling down of the Wireshark with that old packet capture opened in it. In my case, my cropping of it went:

ffmpeg -i Screen_140516_SchmI_dump.mkv -vf crop=782:766:568:0 \

(the infix `R' is for simply `real', nothing esotheric; some naming/renaming habits are simply needed)

I made lots of trials-and-errors to settle for those numbers. Once I was happy with every pixel that's needed, being there, and also any unnecessary pixels, not being there, in the final crop, I renamed it to:

mv -iv Screen_140516_SchmI_dumpR.mkv Screen_140516_SchmI_dump.mkv

(Pls. see below the properties of that video, as `midentify' shows them; if you're practising video manipulation using commands from this page, your video needs to have same properties, such as sizes and frames per seconds, for you to follow this demonstration with your own video, or you will need to modify the commands.)

The Zero Ground for (Lots of) Trials

So we reached the starting stage for a series of conversions. In these two days that I've been writing this I started over from here a number of times...

And so we have the two videos, and will do the conversions/manipulations on them.

And those are available publically (unless my bad provider and my bad regime don't censor me and my presence online more, or anew, or in some novel and crippling fashion, either my presence online, or even in broader manner me in person), in the fashion explained above, and you have probably downloaded the one one or made your own other one by now.

A good video conversion/manipulation comprises always knowing the properties of the videos you are working, in quite some details, or, at least in, as sometimes suffices, just the necessary details.

I searched a little where I got my `/usr/bin/midentify' from.

And I found it:

uabox ~ # equery b /usr/bin/midentify 
 * Searching for /usr/bin/midentify ... 
media-video/mplayer-1.2_pre20150214 (/usr/bin/midentify)
uabox ~ # 

(`equery b' is short for `equery belongs', and equery, for non-Gentooers who are reading this, searches and lists packages in Gentoo)

The `midentify' script is part of mplayer.

If you can't get midentify in your own distro, try:

ffmpeg -i 

and study and compare the results.

So, the two videos that we will manipulate next, are the two below:

ukrainian@uabox SchI $ midentify Screen_140516_SchmI.mkv 
ukrainian@uabox SchI $

which is the one you have probably downloaded by now, and

ukrainian@uabox SchI $ midentify Screen_140516_SchmI_dump.mkv 
ukrainian@uabox SchI $ 

a screencast which I explained above how to make (or which you can, if you stumbled in your tries, also download, as well; it's in the same `lazy' directory as the base files were offered for download above, download also the SUMS-lazy and the SUMS-lazy.sig fro those).

Open up, and somehow download fomr:


Again, if you are making your own second video, to follow this demonstration more easily, you need to keep it to those properties above (or you need to modify the commands below).

The Actions

Notice the `ID_VIDEO_FPS=10.000' property of Screen_140516_SchmI.mkv ? That's because I took them on one of my old not very powerful machines, running Debian at the time (the Debian that of late has committed foss-icide, the (suicidal) killing of it's own previous true FOSS nature, the Free-Open-Source-Software nature, of that which Debian was previously, and they have fossicided themselves by adopting systemd which is fake FOSS; fake because it has all the true --read effective-- attributes of a (morally) dirty big-business product --a big business that hijacks the free ground for its murky purposes is morally despicable-- and [systemd has attributes] none true, no true attributes, of the idealist, honest and proud Free Open Source Community; us who believe in FOSS are all moving to Devuan, see www.devuan.org).

Because of its 10 fps property, that Screen_140516_SchmI.mkv video needs to be converted to 25 fps.

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI.mkv -g 10 -r 25 \

(see below for `-g N')

Some calculations now. We want to make a video with the screencast on the left, and the manual roll of the dumpcap in Wireshark on the right.

That's 1024 plus 782 (the respective widths) equals 1806 pixel of total width to be. The closest standard to use is apparently the 1920x1080, and it's best that the information take up the whole width, so, probably best is to rescale both the videos:

1024x768 to 1088x816
782x766 to 832x816

1088 + 832 equals 1920; that was the basis for my choosing of those numbers.

Do the math, the proportions match fairly well the previous ones (some dimensions exactly, others differ to some subpixel extent or so, which is acceptable, because FFmpeg will apply approximations to get optimal values).

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25.mkv -g 10 \
    -vf scale=1088:816 Screen_140516_SchmI25_S.mkv

The `_S' infix is for scaled.

I'll be doing a bit of video manipulation. I will need the original size video inside this larger one conversion of the same. You'll see why. It's much easier to show it than it is to explain it without showing it.

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_S.mkv -g 10 -vf \
    "movie=Screen_140516_SchmI25.mkv, scale=1072:804 [smaller],[in][smaller] \
    overlay=0:(H-h)/2 [out]" -c:v libx264 Screen_140516_SchmI25_Sboth.mkv

See the `(H-h)/2' in the video filter arguments for the overlay? What that does is centers the video to be overlayed, it centers it vertically over the base video. Likewise if you needed to center it horizontally you would use `(W-w)/2' and not `0' like I used above.

The [smaller] I named so as that video filter (-vf) overlays the smaller video (Screen_140516_SchmI25.mkv) onto the bigger, the scaled one (Screen_140516_SchmI25_S.mkv). But the name could have been any ASCII string.

So that (almost) did it. And with the next command you'll se why I need it like that.

But before you see the why, let me explain the `(almost)'. It only almost did it. Unless it's a bug in FFmpeg (which I have no time now to investigate, and vanishes in near future), if you play that video with:

ukrainian@uabox SchI $ mplayer -speed 0.1 -fs Screen_140516_SchmI25_Sboth.mkv

you might see what I see, and that is, the smaller (the original) video gets overlayed onto the bigger (the scaled) video with a little delay.

I could `cheat' a little now. You'll see why I won't `cheat' yet a little later. But let me explain why I thought that I would need to `cheat' a little here, as well as what I mean by `cheating'.

The original network packet capture file and the original video are there for comparison and for viewing the exact events. This video is a presentation of a little bit of Internet abuse just as it often happens, and should not be happening, because it is against the law, and it is against any morality and honesty. However that this may be a small sample of such abuses, this is a presentation of those. And as presentation, it needs to hit the eye of even those who are more slow at understanding of these things, and hit it with some vengeance against those abuses.

If you played the Screen_140516_SchmI25_Sboth.mkv in the above indicated way (with `-speed 0.1), it played 10 times more slowly than its real speed, which means it played by a rate of 25 frames not per 1 seconds but per 10 seconds. And you could have seen that the first small number of frames belong to only the bigger video, and that you start seeing the smaller video only maybe from frame 6 or 7.

I could have `cheated' here, to correct those maybe 6 frames, so that the smaller video appears right from the first frame. But I'll do it later, and you'll see why.

I said I was going to make one video out of the two I kind of started this part of this presentation with. And that it would be 1920x1080, the old screencast being on the left, the manual roll of the dumpcap on the right.

Well then I need to pad the old screencast (if I start with it, which I will; I could have started with the other as well, that could also have been possible route to take), [pad it] to the size of 1920x1080.

I could simply do it just by leaving huge black bands around the area the original video occupies. But that is so ugly and also wasteful in video conversions and manipulation, the black bands, which correcpond to empty information in video.

I could have simply done:

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_Sboth.mkv -g 10 \
    -vf pad=1920:1080:0:132,setsar=1 Screen_140516_SchmI25_SbothWithBlack.mkv

Do try so yourself, and see what I mean!

But this might (only might, it isn't always) be better:

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_Sboth.mkv -g 10 -vf \
    pad=1920:1080:0:132,setsar=1,delogo=1074:0:900:1084,delogo=0:0:1920:136,delogo=0:944:1920:136 \

The `delogo=' option for video filter is often used for delogo-ing purposes (kind of erasing, making a logo the video is marked with disappear as best it can be disappeared), but I actually figured out this use on my own, and I like it.

Or maybe this one:

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_Sboth.mkv -vf \
    pad=1920:1080:0:132,setsar=1,delogo=974:0:900:1184,delogo=0:0:1920:236,delogo=0:844:1920:236 \

I'll settle for the latter, not the former, and the next commnd shows you why.

I didn't know I would settle for this one, and now that I do, for me, the previous commands have, I think, one redundant command, but innocuosly so.

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_SbothWithDelogo.mkv -g 10 -vf \
    "movie=Screen_140516_SchmI25_S.mkv, scale=1076:806 [smaller],[in][smaller] \
    overlay=0:138 [out]" -c:v libx264 Screen_140516_SchmI25_SbothWithDelogoR.mkv

I am content with the result so far:

mv -iv Screen_140516_SchmI25_SbothWithDelogoR.mkv \

I also hope this can get fine results for you.

And I now play it ten times more slowly than its speed:

ukrainian@uabox SchI $ mplayer -speed 0.1 -fs Screen_140516_SchmI25_SbothWithDelogo.mkv

In this video all is in place but those same first frames. The video would otherwise be ready to take the manual dumpcap roll video overlay onto itself.

So the `cheating' I need to do here, for those some 6 frames at the start that don't show the overlayed video.

First thing is to split the video, and get the starting quater of a second that I need to modify (`cheat' on).

ukrainian@uabox SchI $ mkvmerge -o Screen_140516_SchmI25_SbothWithDelogo_.mkv \
    --split timecodes:0:0.25 Screen_140516_SchmI25_SbothWithDelogo.mkv
ukrainian@uabox SchI $ mkdir Screen_140516_SchmI25_SbothWithDelogo_-001.d

The `-f image2' option with take the screenshots of it.

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_SbothWithDelogo_-001.mkv -f image2 \

This is only listing the PNG's taken:

ukrainian@uabox SchI $ for i in $(ls -1 Screen_140516_SchmI25_SbothWithDelogo_-001.d/) ; \
    do ls -l Screen_140516_SchmI25_SbothWithDelogo_-001.d/$i ; \
    done ;
ukrainian@uabox SchI $

and along the way making sure no typo in the loop to use second next (and which is based on that one loop).

This one shot we want for the entire 0.25 s of the start of the video. It only holds the command used (no I don't support pulseaudio, I want only pure ALSA on my machines, but back then I wasn't able to rid myself of the pulseaudio, not in Debian, in that period, a year ago now):

ukrainian@uabox SchI $ display \
ukrainian@uabox SchI $ for i in $(ls -1 Screen_140516_SchmI25_SbothWithDelogo_-001.d/) ; \
    do cp -iav \
    Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-06.png \
    Screen_140516_SchmI25_SbothWithDelogo_-001.d/$i ; \
    done ;

Bear with me, advanced users. A newbie could stumble here, so the output is in the order of the presentation:

ukrainian@uabox SchI $ for i in $(ls -1 Screen_140516_SchmI25_SbothWithDelogo_-001.d/) ; 
    do cp -iav \
    Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-06.png \
        Screen_140516_SchmI25_SbothWithDelogo_-001.d/$i ;
    done ;
cp: overwrite
    ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-01.png’? y

cp: overwrite
    ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-02.png’? y

cp: overwrite
    ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-03.png’? y

cp: overwrite
    ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-04.png’? y

cp: overwrite
    ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-05.png’? y

cp: ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-06.png’ 
and ‘Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-06.png’
are the same file

And this gets you all the six files the same.

ukrainian@uabox SchI $ ffmpeg -i \
    Screen_140516_SchmI25_SbothWithDelogo_-001.d/Screen_140516_SchmI25_SbothWithDelogo-%2d.png \
    -g 10 Screen_140516_SchmI25_SbothWithDelogo_-001r.mkv

The Screen_140516_SchmI25_SbothWithDelogo_-001r.mkv video is so short that human eye can, it can, but only very hardly so, discern its content. But I don't like imperfections in my videos if I can fix them.

A plain mkvmerge wasn't of much help here. The `mkvmerge -o RESULT.mkv FIRST.mkv + SECOND.mkv' didn't really work. But FFmpeg's own `-filter_complex' does it.

ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI25_SbothWithDelogo_-001r.mkv \
    -i Screen_140516_SchmI25_SbothWithDelogo_-002.mkv -filter_complex \
    '[0:0] [1:0] concat=n=2:v=1 [v]' \
    -map '[v]' -c:v libx264 -g 10 \

Better, ain't it?

However, I wasn't able to cut it as I needed. So:

ukrainian@uabox SchI $ ffmpeg -i \
    Screen_140516_SchmI25_SbothWithDelogo_concat.mkv -map 0:v -c:v libx264 \
    -g 5 Screen_140516_SchmI25_SbothWithDelogo_concatR.mkv

and that (notice the `-g 5') seems to have done it.

mv -iv Screen_140516_SchmI25_SbothWithDelogo_concatR.mkv \

The next thing to do, is, on the Screen_140516_SchmI25_SbothWithDelogo_concat.mkv video, cut it to exactly from where the network capture starts to where it ends (and only the `-g 5' made for cutting down to such precision).

ukrainian@uabox SchI $ mkvmerge -o \
    Screen_140516_SchmI25_SbothWithDelogo_concat_.mkv --split \
    timecodes:0:3.2,0:46.2 Screen_140516_SchmI25_SbothWithDelogo_concat.mkv


ukrainian@uabox SchI $ midentify \
    Screen_140516_SchmI25_SbothWithDelogo_concat_-002.mkv | grep LENG
ukrainian@uabox SchI $

is shorter than

ukrainian@uabox SchI $ midentify \
    Screen_140516_SchmI_dump.mkv | grep LENG
ukrainian@uabox SchI $

The Screen_140516_SchmI_dump.mkv, however, as it is at this still starting stage, not only that it isn't splittable to measure (the technical word is `seekable' I think; anyway to be able to `seek' in it --for keyframes--, a video only splits where it has complete information for the previous part to end, and for the new part to begin, is what we need to get), but also does not scale to how I want it.


ukrainian@uabox SchI $ ffmpeg -i Screen_140516_SchmI_dump.mkv -g 5 -vf scale=832:816 \

And I'll surely try first exactly 42.96 first.

ukrainian@uabox SchI $ mkvmerge -o Screen_140516_SchmI_dump_S_.mkv \
    --split timecodes:0:42.96 \
ukrainian@uabox SchI $ midentify Screen_140516_SchmI_dump_S_-001.mkv | grep LENG
ukrainian@uabox SchI $

Not bad but, I think the overlay video *must* be equal to or a little shorter, and never greater, than the video it is to overlay onto.

ukrainian@uabox SchI $ mkvmerge -o Screen_140516_SchmI_dump_S_.mkv \
    --split timecodes:0:42.85 \
ukrainian@uabox SchI $ midentify Screen_140516_SchmI_dump_S_-001.mkv | grep LENG
ukrainian@uabox SchI $

That should work.

ukrainian@uabox SchI $ ffmpeg -i \
    Screen_140516_SchmI25_SbothWithDelogo_concat_-002.mkv -g 10 -vf \
    "movie=Screen_140516_SchmI_dump_S_-001.mkv [smaller],[in][smaller] \
    overlay=1080:(H-h)/2 [out]" -c:v libx264 \

And now, I'll use the `-filter_complex' again, to concatenate the three parts of the final video to be.

ukrainian@uabox SchI $ ffmpeg -i \
    Screen_140516_SchmI25_SbothWithDelogo_concat_-001.mkv \
    -i Screen_140516_SchmI25_SbothWithDelogo_concat_-002WithDump.mkv \
    -i Screen_140516_SchmI25_SbothWithDelogo_concat_-003.mkv \
    -g 5 -filter_complex \
    '[0:0] [1:0] [2:0] concat=n=3:v=1 [v]' -map '[v]' -c:v libx264 \
ukrainian@uabox SchI $

The video is done, in h264. Now I want to convert it to vp8, as I want it to open by itself when it's internet address is entered into the address bar of those few browsers that are nearly all, I'm talking about the big browser projects, and also some of medium size projects, tools in the `bulk collection' (the recent rename of the `mass surveillance')...

I hope the HTML5 tech reaches sooner rather than later the good real FOSS browsers like Dillo, Links (links -g, the graphical)... and that we, who are passionate about FOSS, won't have to use the big dirty ones.

Dirty yes. Firefox (renamed Iceweasel in Debian, probably will remain so in Devuan too), that Firefox ought to be called SchmoogleFox, because, in its default, and that's what the majority of users have configured in their machines, it Firefox has Google sitting in itself, as you can clearly see.

Because Google married Firefox. Firefox is not ours anymore, dear brothers in *nix. Do prove me wrong if you can. Do claim it back if you can! But for real! Don't talk me GUI, please! And even scripting of the accessible surface that is open to scripting configuration does not free us from Moz harvesting on us! No time to indulge yet, just... Do prove me wrong, but with solid arguments!

No, Firefox is not FOSS, Firefox which I am able to build and configure is fake, very bulky fake, in the sense of collecting, harvesting...

The video will remain like this for now, or for longer.

If this were a more artistic video, or anyway not this trivial, I wouldn't upload it anywhere without watermarking it, without marking it with a licence, such as with a Creative Commons 4.0 Attribution Share-Alike licence button, and my NGO's logo. But I'm really due elsewhere, no time right now.

This may be the kind of script that I'll be using for converting h264 to vp8:

for i in $(cat ls-1_Scr) ; do \
    if [ ! -e "$i.webm" ] ; \
    then nice -n19 ffmpeg -i $i.mkv -map 0:v -b:v 425k \
    -c:v libvpx -qmin 0 -qmax 35 -crf 5 ${i}.webm ; fi ; done ;

In this case it's only one video, so I'll just echo it to the list (without the `.mkv' extension):

ukrainian@uabox SchI $ echo \
    Screen_140516_SchmI25_SbothWithDelogo_concatWithDump > ls-1_Scr

(Scr in the name of the list is for Screen[cast], of course).

And that got me...

well, it got me what anyone can see, as it is publically posted, unless (but I wrote on that `unless...' above)...

And I added the audio... Gotta go... Much other work. Cheers!

But, oh, yes, this is unfinished, as a whole, but the explanations on the simple video manipulations in question are finished. This can be used, with care, and with your own assumed responsability. You can try it all out! But I don't guarrantie to you nothing whatsover in that regard! See also NOE 3 below.

Please report any issues you might have. Try my email addresses, but if they don't work, since my regime hates me here, try and contact me, publically, please, on Gentoo Forums. It's easy, some of the members there may have too little patience with newbies, but Gentoo Forums are generally one of the best places in FOSS (and if only Daniel Robbins who invented Gentoo, but left because of his own fault, came back). But...

...But please be patient awaiting for my reply! I work really slowly. Thoroughly, well yes I guess so, but really slowly. Late adopter and old, nearing 60.


NOTE 1; What you see above was the way I did screencasting and packet-capturing of my online bouts back then, before I had come up with with:


(Pls. if you use the uncenz-1st from there, remove the `-g 10' option if it's still there, see Note 2; below)

[with the uncenz] (primitive) program, which I have been using since a few weeks ago or longer.

I would first start screen-capturing, then packet-capturing, then --this was/is last when going online-- physically connect to the Internet, and after I did the online things (or as in this case: suffered an little stupid attack by the Octopus of the Internet), I --this was/is first when disconnecting-- physically unplug the patch cable from the socket, then kill the dumpcapping, and only then quit screencapturing.

NOTE 2; Pls. do notice that without `-g N' (I'm actually first time using the N=5, the `-g 5' seriously. I really, when I needed a well-splittable or cuttable video, always used `-g 10', I can tell you I'm not sure I always, but only sometimes, see any difference yet, but figuring out things in video manipulation is not always easy and often takes numerous tries; remember how the GOP stoty --the group of pictures story-- many a smaller TV station programs are not aware of, not in the way their video-editing personnel use those programs)...

So pls. do notice that without `-g N' this kind of precision would not be possible, no way! But don't just believe me! Go ahead and try these commands without that option and see if you can precision cut them!

But, with the `-g N' option, the video is larger than it would be with the FFmpeg's default (whichever the default be; surely something sensible, those are fine wizards, the FFmpeg people), because the smaller group of pictures means (much) greater number of keyframes, and that may even occasionally mean a huge expenditure, and the video may be sometimes even very much larger, and almost always is noticeably larger then with the usual relatively small number of keyframes.

NOTE 3: While FFmpeg can perfectly be used in Windoze, and yes I mean Billy's ones, of Billy the robber of the world (ethically so, yes!) turned eugenic philantropist... While FFmpeg works in Windoze, the commands to use are for the Unix family (FOSS Linux and related) of OSes (and, at the time of publishing this, have been tested by me only, and on my FOSS Linux Gentoo only).