Hello, it looks like that audio encoded by aptX (non-hd) codec can be stored in RIFF wave container. Look into old Microsoft Multimedia document named "New Multimedia Data Types and Data Techniques" from April 15, 1994.
http://web.archive.org/web/20120917060438/http://download.microsoft.com/download/9/8/6/9863C72A-A3AA-4DDB-B1BA-CA8D17EFD2D4/RIFFNEW.pdf It was available on Microsoft website, but now is only in webarchive. At page 45 is described WAVE format header with allocated id for aptX. #define WAVE_FORMAT_APTX (0x0025) Description of compression on that page really matches aptX (non-hd) codec which is already supported by ffmpeg. So... could you add support for storing aptX encoded audio to RIFF wave container? Currently ffmpeg can store aptX only into "raw" container, so there is no information about frequency or channels. And above document describe that frequency and number of channels can be stored in RIFF wave also for aptX payload. Below is copy of page 45 from that PDF document: ======================================================================== Audio Processing Technology Wave Type Added: 06/22/93 Author: Calypso Software Limited Fact Chunk This chunk is required for all WAVE formats other than WAVE_FORMAT_PCM. It stores file dependent information about the contents of the WAVE data. It currently specifies the length of the data in samples. WAVE Format Header #define WAVE_FORMAT_APTX (0x0025) wFormatTag This must be set to WAVE_FORMAT_APTX. nChannels Number of channels in the wave, always 1 for mono, 2 for stereo. nSamplesPerSec Frequency of the sample rate of the wave file. (8000, 11025, 22050, 44100, 48000) nAvgBytesPerSec Average data rate..= nChannels * nSamplesPerSec/2. (16bit audio) Playback software can estimate the buffer size using the <nAvgBytesPerSec> value. nBlockAlign Should be set to 2 (bytes) for mono data or 4 (bytes) for stereo. For mono data 4 sixteen bit samples will be compressed into 1 sixteen bit word For stereo data 4 sizteen bit left channel samples will be compressed into the first 16bit word and 4 sixteen bit right channel samples will be cmpressed into the next 16 bit word. Playback software needs to process a multiple of <nBlockAlign> bytes of data at a time, so that the value of <nBlockAlign> can be used for buffer alignment. wBitsPerSample This is the number of bits per sample. Not used; set to four. cbSize The size in bytes of the extra information in the extended WAVE 'fmt' header. This should be 0.(zero) The definition of the data contained in the APTX format is considered proprietary information of Audio Processing Technology Limited. They can be contacted at: Audio Processing Technology Limited Edgewater Road Belfast, Northern Ireland, BT3 9QJ Tel 44 232 371110 Fax 44 232 371137 This format is proprietary audio format using 4:1 compression i.c. 16 bits of audio are compressed to 4 bits. It is only encoded/decoded by dedicated hardware from MM_APT Multimedia Data Standards Update April 15, 1994 Page 45 of 73 ======================================================================== -- Pali Rohár pali.ro...@gmail.com
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel