ffmpeg-制作干净的WAV文件 [英] ffmpeg - Making a Clean WAV file

查看:413
本文介绍了ffmpeg-制作干净的WAV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望使用ffmpeg将一个名为Star Wars: Jedi Knight: Dark Forces II的游戏批量转换为音频文件.我遇到的问题是ffmpeg似乎正在执行某些操作,因此Jedi Knight无法播放声音文件.

I'm looking to batch convert a number of files to audio files using ffmpeg for a game called Star Wars: Jedi Knight: Dark Forces II. The problem I'm having is that ffmpeg seems to be doing something that does so that Jedi Knight can't play the sound file.

Jedi Knight接受从5khz到96khz,8位和16位,单声道和立体声的各种范围的普通PCM WAV文件.这听起来很简单.除非使用MS Sound Recorder创建WAV文件,否则Jedi Knight不能播放它.猜测是它为标头或其他内容添加了一些额外的内容.但是它可以播放由AudacityGoldWaveModPlug Tracker创建的WAV文件.

Jedi Knight accepts plain old PCM WAV files of various ranges, from 5khz to 96khz, 8 and 16 bit, mono and stereo. This sounds plain and simple. Except for that if one were to create a WAV file using MS Sound Recorder, Jedi Knight could not play it. Speculation was that it added something extra to header or something. But it can play a WAV file created by Audacity, GoldWave or ModPlug Tracker to name a few.

那为什么不ffmpeg呢?我使用了错误的编解码器或参数吗?我从游戏中获取了一个原始声音文件,并执行了以下操作:

So why not ffmpeg? Am I using the wrong codec or params? I took an original sound file from the game and performed the following:

ffmpeg -i "orig_thrmlpu2.wav" -f wav -acodec pcm_s16le -ar 22050 -ac 1 "ffmpeg_thrmlpu2.wav"

ffmpeg版本不能在游戏中玩. ffprobe表明ffmpeg版本具有一些Metadata,而original没有.我应该使用什么参数来尝试获得与原始格式相同的WAV格式?请注意,-ar-acbits不是重要部分.

The ffmpeg version does not play in the game. ffprobe shows that the ffmpeg version has some Metadata which the original doesn't have. What params should I use to try and get the same WAV format as the original? Mind you, -ar, -ac and bits aren't the important parts.

以下是供您检查的文件: http://www.edwardleuf.org/Games/JK/thrmlpu2.zip

Here are the files for you to examine: http://www.edwardleuf.org/Games/JK/thrmlpu2.zip

推荐答案

FFMpeg默认在WAV输出中添加一个LIST-INFO块.添加-bitexact会禁止它.

FFMpeg by default is adding a LIST-INFO chunk to the WAV output. Adding -bitexact suppresses it.

所以

ffmpeg -i "orig.wav" -f wav -bitexact -acodec pcm_s16le -ar 22050 -ac 1 "ffmpeg.wav"

这篇关于ffmpeg-制作干净的WAV文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆