Running it with FFmpeg-style arguments, modified version of FFmpeg's source code that does exactly what you want will be generated.
By chatting or signing in you agree to the Terms and chat-message logging (revocable in History).