Some audio codecs are easy to recognize because they use signatures (wma, mp3, ogg) and are supported by many programs.
But sometimes it may be difficult, moreover if it's an adpcm algorithm which is not the usual ima-adpcm.
The following is an helpful script for quickbms:
Code: Select all
# adpcm_4xm
# adpcm_adx
# adpcm_afc
# adpcm_ct
# adpcm_dtk
# adpcm_ea
# adpcm_ea_maxis_xa
# adpcm_ea_r1
# adpcm_ea_r2
# adpcm_ea_r3
# adpcm_ea_xas
# adpcm_g722
# adpcm_g726
# adpcm_g726le
# adpcm_ima_amv
# adpcm_ima_apc
# adpcm_ima_dk3
# adpcm_ima_dk4
# adpcm_ima_ea_eacs
# adpcm_ima_ea_sead
# adpcm_ima_iss
# adpcm_ima_oki
# adpcm_ima_qt
# adpcm_ima_rad
# adpcm_ima_smjpeg
# adpcm_ima_wav
# adpcm_ima_ws
# adpcm_ms
# adpcm_sbpro_2
# adpcm_sbpro_3
# adpcm_sbpro_4
# adpcm_swf
# adpcm_thp
# adpcm_vima
# adpcm_xa
# adpcm_yamaha
set MAX_OUTPUT_SECONDS long 3
set INPUT string "%1"
for
get CODEC line
if CODEC & "#"
string CODEC R= "#" ""
string CODEC R= " " ""
print "ffmpeg -acodec %CODEC% -ac 2 -vn -f data -i %INPUT% -t %MAX_OUTPUT_SECONDS% %CODEC%.wav"
else
cleanexit
endif
next
Now try to launch the script with quickbms from command-line dumping its content in a bat file:
Code: Select all
quickbms script.bms script.bms > scan.bat
And then launch the bat:
Code: Select all
scan.bat myfile.adpcm
It will create a bat file that automatically launch ffmpeg to convert the input file in a 16bit pcm file.
Unfortunately it's not possible to force the number of channels with ffmpeg if the input file has an header, while instead it's possible with ffplay.
Anyway if you want to force a certain number of channels you must add the -ac option, for example "-ac 1" for mono.
Technically the script is quite interesting, basically it reads its comments and use them to create the necessary command.
*edit* added "-ac 2 -vn -f data"