FFmpeg by Ciro Santilli 37 Updated 2025-07-16
FFmpeg is the assembler of audio and video.
As a result, Ciro Santilli who likes "lower level stuff", has had many many hours if image manipulation fun with this software, see e.g.:
As older Ciro grows, the more he notices that FFmpeg can do basically any lower level audio video task. It is just an amazing piece of software, the immediate go-to for any low level operation.
FFmpeg was created by Fabrice Bellard, which Ciro deeply respects.
Resize a video: superuser.com/questions/624563/how-to-resize-a-video-to-make-it-smaller-with-ffmpeg:
ffmpeg -i input.avi -filter:v scale=720:-1 -c:a copy output.mkv
Unlike every other convention under the sun, the height in scale is the first number.
FFmpeg filter graph by Ciro Santilli 37 Updated 2025-07-16
Filter graphs are a thing of great beauty. What an amazingly obscure domain-specific language, but which can produce striking results with very little!!!
ffplay -autoexit -nodisp -f lavfi -i '
sine=frequency=500[a];
sine=frequency=1000[b];
[a][b]amerge, atrim=end=2
'
which creates a graph:
                              +--------+
[sine=frequency=500]--->[a]-->|        |
                              | amerge |-->[atrim]-->[output]
[sine=frequency=1000]-->[b]-->|        |
                              +--------+
and plays 500 Hz on the left channel and 1000 Hz on the right channel for 2 seconds.
So we see the following syntax patterns:
  • sine, amerge and atrim are filters
  • sine=frequency=500: the first = says "araguments follow"
    • frequency=500 sets the frequency argument of the sine filter
    • for multiple arguments the syntax is to separate arguments with colons e.g. sine=frequency=500:duration=2
  • ;: separates statements
  • [a], [b]: sets the name of an edge
  • ,: creates unnamed edge between filters that have one input and one output
A list of all filters can be obtained ith:
ffmpeg -filters
and parameters for a single filter can be obtained with:
ffmpeg --help filter=sine
Related question: stackoverflow.com/questions/69251087/in-ffmpeg-command-line-how-to-show-all-filter-settings-and-their-parameters-bef
TODO dump graph to ASCII art? trac.ffmpeg.org/wiki/FilteringGuide#Visualizingfilters mentions a -dumpgraph option, but haven't managed to use it yet.
Bibliography:
ffplay by Ciro Santilli 37 Updated 2025-07-16
Awesome tool to view quick stuff quickly without generating files. Unfortunately it doesn't support all options that the ffmpeg CLI supports, e.g. ffplay multiple input files. One day, one day.
For synthesized streams like sine we can do it e.g.
ffplay -autoexit -nodisp -f lavfi -i '
sine=frequency=500[a];
sine=frequency=1000[b];
[a][b]amerge, atrim=end=2
'
but it does not seem to accept multiple -i for some reason. So is there a way to open a file from some filter? E.g.:
ffplay -i tmp.wav -i tmp.mkv -filter_complex "[0:a]atrim=end=2[a];[1:v]trim=end=2[v]" -map '[a]' -map '[v]'
fails with:
Argument 'tmp.mkv' provided as input filename, but 'tmp.wav' was already specified.
ImageMagick by Ciro Santilli 37 Updated 2025-07-16
Crop 20 pixels from the bottom of the image:
convert image.png -gravity East -chop 20x0 result.png
Closurism by Ciro Santilli 37 Updated 2025-07-16
Closurism is a term invented by Ciro Santilli to refer to content moderation policies that lock threads in online forums, preventing people from adding new comments from that point onward.
This is similar to deletionism but a bit less worse, as the pre-existing content is maintained. But new relevant content that comes up cannot be added in the future, so it is still bad.
The outcome of closurism is that new forum posts must then be made about up-to-date aspects of the topic. But then those may fail to reach the same PageRank, so most people never get the new information, or create new posts leading to useless duplication of work.
And of course, 4chan just takes that to a whole new level, usually closing on the same day, and then getting deleted within a week. Why would anyone contribute non-illegal content to that king of system?!
Ridiculous, so when new information comes out, we just duplicate all the old comments on a new thread again?
Remember, Ciro Santilli is the Necromancer God.
Bookdown by Ciro Santilli 37 Updated 2025-07-16
Written in R, but also relies on pandoc, so quite bad dependency wise.
Cross files references to IDs: yes. But no check by default for duplicates when doing automatic ID from title. Just automatically disambiguates with -1, -2 suffixes, and links take the last one available.
Source page splitting: splits at h2 by default. If configurable, likely always af fixed level?
Has some nice image generation from inline code from standard R plotting functions.
Hello world on Ubuntu 23.04 after installing R:
sudo R -e 'install.packages("bookdown")'
git clone https://github.com/rstudio/bookdown-demo
cd bookdown-demo
Rscript -e 'bookdown::render_book("index.Rmd")'
xdg-open _book/index.html
The build CLI comes from: stackoverflow.com/questions/50888871/how-to-use-rscript-command-line-tool-to-build-a-book-in-bookdown
The installatoin Rscript -e 'bookdown::render_book("index.Rmd")' takes several minutes, it compiles a bunch of stuff from source apparently. but it did work.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 2.
    You can publish local OurBigBook lightweight markup files to either https://OurBigBook.com or as a static website
    .
    Figure 3.
    Visual Studio Code extension installation
    .
    Figure 4.
    Visual Studio Code extension tree navigation
    .
    Figure 5.
    Web editor
    . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
    Video 4.
    OurBigBook Visual Studio Code extension editing and navigation demo
    . Source.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact