Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAQ: 【音频文件转换工具】的命令行调用方式 #100

Open
lj-job opened this issue Mar 13, 2023 · 0 comments
Open

FAQ: 【音频文件转换工具】的命令行调用方式 #100

lj-job opened this issue Mar 13, 2023 · 0 comments

Comments

@lj-job
Copy link
Collaborator

lj-job commented Mar 13, 2023

命令行用法

支持界面中支持的格式转换,命令格式如下:

A 格式

media_trans.exe -format a -samplerate 8k -input example.mp3 -output myfile.a

-samplerate 采样率,支持的范围见界面

-input 输入文件

-output 输出文件

E 格式

media_trans.exe -format e -samplerate 8k -input example.mp3 -output myfile.a

-samplerate 采样率,支持的范围见界面

-input 输入文件

-output 输出文件

F1A 格式

media_trans.exe -format f1a -samplerate 8k -bitrate 5k -input example.mp3 -output myfile.f1a -loop -engthr 10 -loopprev -improvesfcr

-samplerate 采样率,支持的范围见界面

-bitrate 码率,支持的范围见界面

-input 输入文件

-output 输出文件

-loop 是否无限循环,如果不需要则去掉此选项

-engthr 能量转换阈值,需要指定-loop参数才可以设置此参数,支持的范围见界面

-improvesfcr 提供小文件压缩比,如果不需要则去掉此选项

F1C 格式

media_trans.exe -format f1c -samplerate 8k -bitrate 5k -input example.mp3 -output myfile.f1a -loop -engthr 10 -loopprev

-samplerate 采样率,支持的范围见界面

-bitrate 码率,支持的范围见界面

-input 输入文件

-output 输出文件

-loop 是否无限循环,如果不需要则去掉此选项

-engthr 能量转换阈值,需要指定-loop参数才可以设置此参数,支持的范围见界面

F1X 格式

media_trans.exe -format f1x -samplerate 8k -bitrate 8k -input file1.mp3 file2.mp3 -output out.f1x -head-cut-frame 2 -tail-cut-frame 1 -audio-unit-head-len 4

-samplerate 采样率,支持的范围见界面

-bitrate 码率,支持的范围见界面

-input 输入文件

-output 输出文件

-head-cut-frame 头部去除帧数

-tail-cut-frame 尾部去除帧数

-audio-unit-head-len 音频头字节数

UMP3 格式

media_trans.exe -format ump3 -samplerate 8k -bitrate 8k -input example.mp3 -output myfile.ump3 -powerthr 65536

-samplerate 采样率,支持的范围见界面

-bitrate 码率,支持的范围见界面

-input 输入文件

-output 输出文件

-powerthr 能量阈值,如果不需要能量阈值,则去掉 -powerthr 选项

批量处理

media_trans.exe -batch cmds.txt

  • 其中 cmds.txt 是一个 UTF8(无BOM)编码的文件,每一行是一个转换参数,即

    -format a -samplerate 8k -input example.mp3 -output myfile.a

    -format f1a -samplerate 8k -bitrate 5k -input example.mp3 -output myfile.f1a

    这样的内容。

则程序会批量处理这些命令。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant