Moritz Barsnick <[email protected]> schrieb am Do., 4. Jan. 2018 um 00:09 Uhr:
> Have you tried the MS-ADPCM output of sox? I haven't gotten around to > checking what it does, and have a hard time unterstanding the meaning > of block size in the ADPCM context, and interpreting ffprobe's output. > > How could I test with Xaudio2, assuming I have access to Windows? > I have had a test with SoX now. It also doesn't work. I have put together all the needed files for a test based on the directx sdk basic sound sample ( https://github.com/walbourn/directx-sdk-samples/tree/master/XAudio2). You can find all the needed files here: https://www.dropbox.com/sh/7h0pzevzyon1499/AABkY1k7PQ7kjIGKMm6MTZlca?dl=0 The Wavs folder contains an original wave file and the versions converted with ffmpeg, sox and AdpcmEncode (a tool provided by microsoft). These are the used commands: AdpcmEncode original.wav adpcmencode.wav ffmpeg -y -i original.wav -c:a adpcm_ms ffmpeg.wav I think the blocksize is also relevant for the file length. The ffmpeg encoded file is longer than the original one. I expect that a shorter block size would change this (while having a worse compression). My understanding is that adpcmencode.exe uses a blocksize that leads to the best compromise between duration error and compression. file | audacity | ffprobe original.wav | 0.789s | 0.79s adpcmencode.wav | 0.789s | 0.86s ffmpeg.wav | 0.831s | 0.83s sox.wav | 0.831s | 0.79s I don't know why ffprobe gets a different length for adpcmencode.wav then it really is. XAudio2BasicSound.exe ist the compiled version of the contained code (compiled with visual studio 2017 community). It will first play original.wav, then adpcmencode.wav and finally ffmpeg.wav. The last one failes with hresult 0x88960001 when calling pXaudio2->CreateSourceVoice. Hope I got the email formatting correct this time. Martin _______________________________________________ > ffmpeg-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
