mercredi 11 février 2015

How to generate pcm audio file by setting 20 bit depth?

No option using ffmpeg


I am using ffmpeg to generate audio data. I am using following command



ffmpeg.exe -i in.wav -ar 44100 -acodec pcm_s16le -ac 1 out.wav


but there is no option to convert to 20 bit depth pcm audio. (something like pcm_s20le).


I want to perform some operations on apple codec (e.g. encoding pcm audio data to alac).


On ALAC source: http://ift.tt/19apTWT , it has been mentioned like this;



Apple Lossless supports the following features 1. Bit depths 16, 20, 24 and 32 bits.



Media Foundation on windows throwing exception for 20 bit depth


I tried sample encoding and transcoding application mentioned on MSDN http://ift.tt/1yjKYTr


with following configuration but it failed



spTypeOut->SetUINT32(MF_MT_AUDIO_BITS_PER_SAMPLE, 20);


NOTE: but i put 16 instead of 20; it created smoothly.


Is there any way to generate such 20 bit PCM audio? What is so special about 20 bit depth that it is not being considered on ffmpeg and media foundation but on apple codec?


Aucun commentaire:

Enregistrer un commentaire