Recently found out about ouch. Found it really useful for decompressing files in the terminal as I can’t seem to remember all the flags for tar, gzip, zip, rar and all the rest one may encounter which all seem to use different syntax.
Since the end goal is to post a video to YouTube, you will have to create a video file. Personally I would probably just be lazy and upload the large file, since YouTube is going to reconvert the video anyway.
That said, to optimize the file you need to know how videos work, specifically key frames. Speaking generally, when a video gets encoded, it doesn’t add the whole image for each frame. Instead, it only does that when the current frame is a key frame, and then only stores the difference to the previous frame for every regular frame. There’s a lot of different strategies when placing keyframes, like every X seconds, when the scene changes, or both. This is usually you can change somewhere in the encoding settings of the application you’re using. You will need to use a codec/format that supports interframe compression though, so avoid AVI and MJPEG.
So the TL;DR is: Try to decrease the amount of key frames as much as possible, maybe even down to only one if possible.
I think it’s pretty niche but is a great tool for parsing / converting data into a format that is more easily digested by another program.
Think for example a report from an 80’s system that spits out many tab separated values in a different format based on some code. Then these tables are all separated by two blank lines and order of them is randomised. To top that off you need to then pipe it all to a different program that only accepts a specific format.
You could do it in Python by doing a parse, process, stringify code but if you know awk you can do all those steps at the same time with less code.
Sure, in the age of REST the Python approach is better but awk is a very powerful tool for the “I have a specific output but need a specific input” problem.
Are you sure your rendering settings are correct? It sounds like the video isn’t being encoded at all. Video encoding works by storing a frame in full quality every couple seconds or so. For the rest of the frames, only their differences from the previous full-quality frame are stored. But from what you describe, it sounds like the latter sentence isn’t happening
awk is awesome! I love it, and I do not regret learning how to use it.
That said, my workflow invariably always shifts from starting with awk to do something simply with a tiny one-liner, to then doing that with perl or python, and sometimes even creating a file to make the by-now multi-line scripts more easily readable.
I do not recommend starting with awk, if you do not know other languages already such as Python.
awk is pretty damn solid. When I was completely rewriting the gravity.sh script from Pi-hole about six years back, it was easily the fastest for parsing and uniquely sorting content from files with a couple million lines. It made things much more usable on Raspberry Pi Zero hardware, since changing to another language like Python was out of the question.
You can replace almost all aspects of oh my zsh just by using fish shell. Like straight out of the box it does most of it. I switched off of a completely customized zsh (oh my zsh didn’t do enough for me) and fish is able to do everything I did with my custom zsh setup.
linux
Oldest
This magazine is from a federated server and may be incomplete. Browse more on the original instance.