gpt-3.5-turbo-0125· openai
Suzhen/CodeChat
hi can you correct this ffmpeg arg: ffmpeg -f x11grab -framerate 30 $(xwininfo gawk…
- User
hi can you correct this ffmpeg arg: ffmpeg -f x11grab -framerate 30 0, -geometry ([0-9]+x[0-9]+).([0-9]+).([0-9]+)/, a){ print "-video_size " a[1] " -i +" a[2] "," a[3] }') -c:v libx264rgb -preset slow -t 5 -pass 1 -an -f null /dev/null &&
ffmpeg -i /dev/null -c:v libx264rgb -preset slow -f alsa -ac 2 -i pulse -t 5 -pass 2 $(date +%Y-%m-%d_%H-%M_%S).mkv - Assistant
Sure, here is the corrected ffmpeg command:
ffmpeg -f x11grab -framerate 30 $(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] }') -c:v libx264rgb -preset slow -t 5 -pass 1 -an -f null /dev/null && \ ffmpeg -i /dev/null -c:v libx264rgb -preset slow -f alsa -ac 2 -i pulse -t 5 -pass 2 $(date +%Y-%m-%d_%H-%M_%S).mkvI have fixed the regex pattern in the
gawkcommand to correctly capture the window geometry.