Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Mar 21, 2018 4:58 pm

All times are UTC

Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Aug 07, 2014 5:02 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7794
Sometimes you may have a file containing raw compressed audio.

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:
# 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 INPUT string "%1"
    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"

Now try to launch the script with quickbms from command-line dumping its content in a bat file:
quickbms script.bms script.bms > scan.bat

And then launch the bat:
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"

PostPosted: Wed Dec 24, 2014 10:25 am 

Joined: Fri Oct 24, 2014 3:13 pm
Posts: 71
Hi aluigi my good friend, very good tutorial and script, thanks for sharing

PostPosted: Tue Jul 21, 2015 9:29 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7794
Just an update.
I guess that the current version of ffmpeg no longer works with that command-line and even adding other options doesn't change the situation.
I'm really disappointed by ffmpeg that is impossible to configure.

PostPosted: Sun Sep 11, 2016 11:28 pm 
User avatar

Joined: Tue Feb 02, 2016 2:35 am
Posts: 1017
"Output file #0 does not contain any stream"
What should I do if ffmpeg doesn't support audio files that doesn't have any headers?


PostPosted: Thu Sep 15, 2016 7:26 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7794
The "-f data" option forces ffmpeg to work on raw data.
I guess that error is caused by a codec that requires some specific headers (even in raw mode?) or specific options to set some parameters.

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited