ffmpeg: avoid scanf in keyboard command parsing