I want to extract the original unaltered audio from a video file using FFmpeg. I'd like to use it in a batch file to process a whole directory of various video files (MP4, FLV, MOV) where the original audio might be in different formats. If I try the following command without specifying an extension for the audio filename, then I get an error:
ffmpeg -i test.mp4 -acodec copy extractedaudio
FFmpeg version UNKNOWN, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --disable-shared --enable-memalign-hack --enable-gpl --cpu=i686
--enable-libmp3lame --enable-libfaac --enable-libamr-nb --enable-libamr-wb
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.23. 0 / 52.23. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Apr 4 2009 11:36:42, gcc: 4.2.1-sjlj (mingw32-2)
Seems stream 1 codec frame rate differs from container frame rate: 59.94 (2997/5
0) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Duration: 00:03:05.61, start: 0.000000, bitrate: 2128 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
Stream #0.1(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 29.97 t
br, 29.97 tbn, 59.94 tbc
Unable to find a suitable output format for 'extractedaudio'
If I specify an extension (like extractedaudio.aac), then it works (although it says it is encoding, so I'm not sure if it is re-encoding it or not), but then since I want to use it in a batch file to process an entire directory of files, I'm not going to know the extension ahead of time.