displaybta.blogg.se

Pcm to wav ffmpeg
Pcm to wav ffmpeg












pcm to wav ffmpeg pcm to wav ffmpeg

Note: This is related to SDL2 specifically, so I believe it fits gamedev, I don't think posting to an audio related SA would garner as much intimate knowledge on the subject.ĭoes anyone have any insight on how I can get SDL2 to play my 24bit WAV, possibly by converting them to 32bit and getting them to play in SDL2ĮDIT #2: Forget the last Edit (I removed). Here is the definition for the constant we're using: note that the number given is not 0xfffe Note this error message comes from Where it seems to be comparing to Swap16LE? and notices it's not pcm_16 and dies. Here are the valid SDL2 audio formats: we're looking at AUDIO_S32LSB specifically, and yes I am using SDL2 2.0.X If I try to use pcm_s32be I get: pcm_s32be codec not supported in WAVE format so I have to use little endian with Float, signed or unsigned.įFmpeg converts it correctly, but SDL2 won't play the 32bit audio, it gives: Unknown WAVE data format: 0xfffe Since SDL2 only supports 16bit (signed, unsigned, float) and 32bit, I figured I'd convert up to 32bit if that's possible, using this:įfmpeg -i input.wav -filter:a asetrate="48k" -ac 2 -c:a pcm_s32le output.wav These files are 24bit, so we lose some audio converting them to 16bit I'd assume. Mplayer plays them at 16bit, and I can convert them to pcm_s16le with ffmpeg very easily, and they do play in SDL2 fine. Selected audio codec: afm: pcm (Uncompressed PCM) 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.I have WAV files of this format: Opening audio decoder: Uncompressed PCM audio decoderĪUDIO: 48000 Hz, 2 ch, s24le, 2304.0 kbit/100.00% (ratio: 288000->288000) ffprobe shows that the ffmpeg version has some Metadata which the original doesn't have. The ffmpeg version does not play in the game.

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














Pcm to wav ffmpeg