3 ms·
Ffmpeg can capture a single window on Windows, weirdly I can't find an equally simple way of doing it on Linux. ffmpeg -f gdigrab -framerate 30 -i title=Calcul
by sorenjan 4y ago
Ffmpeg can capture a single window on Windows, weirdly I can't find an equally simple way of doing it on Linux.
ffmpeg -f gdigrab -framerate 30 -i title=Calculator output.mkv
https://trac.ffmpeg.org/wiki/Capture/Desktop https://trac.ffmpeg.org/wiki/Capture/Desktop
- capableweb 4y agoOn Linux I use the following shell-function, can't remember the source of it though, probably somewhere on Stack Overflow: $ which capture_window capture_window () { save_dir="$(mktemp -d)" filename="$save_dir/$(date +%Y-%m-%d_%H-%M_%S).mp4" ffmpeg -f x11grab -framerate 25 $(xwininfo | gawk 'match($0, /-geometry ([0-9]+x[0-9]+).([0-9]+).([0-9]+)/, a)\ { print "-video_size " a[1] " -i +" a[2] "," a[3] }') $filename echo "Saved as \"$filename\"" }
- JustSomeNobody 4y agoHere's a link to an article where they provide a shell script to easily do it: https://tratt.net/laurie/blog/2022/making_a_video_of_a_single_window.html https://tratt.net/laurie/blog/2022/making_a_video_of_a_singl...