I want my python program to extract the audio tracks from various video files without changing the audio codec. For this I call the following command:
ffmpeg -i "input" -vn -acodec copy "output.???"
However this only works, if the file extension of the output file is known. Is there a way to find out the corresponding file extension?