Wiki without notability requirements by
Ciro Santilli 35 Updated 2025-04-18 +Created 1970-01-01
Proponent of evergreen notes.
He's also curious about quantum computing: quantum.country/ like Ciro Santilli. Some crazy overlaps we get.
Filter graphs are a thing of great beauty. What an amazingly obscure domain-specific language, but which can produce striking results with very little!!!
A quick example from stackoverflow.com/questions/59551013/how-to-generate-stereo-sine-wave-using-ffmpeg-with-different-frequencies-for-eac/77730492#77730492 illustrates some of the fundamentals:
ffplay -autoexit -nodisp -f lavfi -i '
sine=frequency=500[a];
sine=frequency=1000[b];
[a][b]amerge, atrim=end=2
'
+--------+
[sine=frequency=500]--->[a]-->| |
| amerge |-->[atrim]-->[output]
[sine=frequency=1000]-->[b]-->| |
+--------+
So we see the following syntax patterns:
sine
,amerge
andatrim
are filterssine=frequency=500
: the first=
says "araguments follow";
: 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:and parameters for a single filter can be obtained with:Related question: stackoverflow.com/questions/69251087/in-ffmpeg-command-line-how-to-show-all-filter-settings-and-their-parameters-bef
ffmpeg -filters
ffmpeg --help filter=sine
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:
- ffmpeg.org/ffmpeg-filters.html official documentation
- trac.ffmpeg.org/wiki/FilteringGuide some handy tips from the FFMpeg Wiki
Simple sines and variants:
- unix.stackexchange.com/questions/82112/stereo-tone-generator-for-linux/536860#536860
- stackoverflow.com/questions/5109038/linux-sine-wave-audio-generator/57610684#57610684
- superuser.com/questions/724391/how-to-generate-a-sine-wave-with-ffmpeg
- stackoverflow.com/questions/59551013/how-to-generate-stereo-sine-wave-using-ffmpeg-with-different-frequencies-for-eac/77730492#77730492
Video with a solid color:
- 2 second white video:Also add some audio:
ffplay -autoexit -f lavfi -i 'color=white:640x480:d=3,format=rgb24,trim=end=2'
TODO how to ffplay the video + audio directly?ffmpeg -lavfi "color=white:640x480:d=3,format=rgb24,trim=end=2[v];sine=f=1000:d=2[a]" -map '[a]' -map '[v]' out.mkv
-map
does not seem to work unfortunately. - 2 second white followed by 2 second black video:
ffplay -autoexit -f lavfi -i 'color=white:640x480:d=3,format=rgb24,trim=end=2[a];color=black:640x480:d=3,format=rgb24,trim=end=2[b];[a][b]concat=n=2:v=1:a=0'
- bibliography:
Check which you you have:Tested on Ubuntu 23.10 I see:which means I have GNOME Display Manager.
systemctl status display-manager.service
● gdm.service - GNOME Display Manager
Loaded: loaded (/lib/systemd/system/gdm.service; static)
Active: active (running) since Sun 2023-12-24 10:34:50 GMT; 23min ago
Process: 1827 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
Main PID: 1850 (gdm3)
Tasks: 4 (limit: 71817)
Memory: 6.8M
CPU: 119ms
CGroup: /system.slice/gdm.service
└─1850 /usr/sbin/gdm3
General-purpose computing on graphics processing units by
Ciro Santilli 35 Updated 2025-04-18 +Created 1970-01-01
This is one of those idealistic W3C specifications with super messy implementations all over.
There are unlisted articles, also show them or only show them.