[opus] Regarding Opus Codec Input output file.
viswanath.puttagunta at linaro.org
Mon Apr 13 09:37:18 PDT 2015
I see 2 potential issues with what you are doing.
1. ./opus_demo -e voip 48000 2 16 music_orig.wav testcase30.opus
in above command, "16" for bits/sec seems too low. I'm no audio
expert, but just cant convince myself you can get any reasonable audio
data with 16 bits/sec. FYI, I was able to encode and decode with 16
bits/sec, but when I played the decode file with "aplay", couldn't
I used 96000 bits/sec with command
./opus_demo -e voip 48000 2 96000 music_orig.wav testcase30.opus
Then decoded with same command you gave
./opus_demo -d 48000 2 testcase30.opus testcase31.wav
And played using command (on my ubuntu 14.04 linux box)
aplay -t raw -c 2 -r 48000 -f S16_LE testcase31.wav
and was able to hear the audio clearly
2. The file that gets generated with "./opus_demo -d 48000 2
(testcase31.wav) is just a raw data file.. It does not have wav header.
For example, if you do
$ file music_orig.wav
music_orig.wav: RIFF (little-endian) data, WAVE audio,
Microsoft PCM, 16 bit, stereo 48000 Hz
But, for testcase31.wav, you get
$ file testcase31.wav
So, if your audio quality app is looking for Wav header, it
will not find it... You will need to add this header to your data file
to make it a real "wav" file.
On 13 April 2015 at 07:29, Sakharam Thorat <sakharam.thorat at outlook.com> wrote:
> Hi All,
> Need Help !
> I am interested testing opus codec encoding decoding qaulity. for this have
> complied opus code codec from souce. After compiling i got opus_demo app.
> for Encoding i followed below steps:
> 1) Reference file used music_orig.wav
> Number of samples : 4358219 (90.8 s) 2015-04-13 10:40:07 UTC
> Sampling frequency: 48000 Hz
> Number of channels: 2 (16-bit integer)
> File name: music_orig.wav
> Header length: 44
> Sampling frequency: 48000
> No. samples: 4358219
> No. channels: 2
> Data type: integer16
> File byte order: little-endian
> Host byte order: little-endian
> 2) I encode this file using following command
> ./opus_demo -e voip 48000 2 16 music_orig.wav testcase30.opus
> 3) Then Decoded testcase30.opus using following command
> ./opus_demo -d 48000 2 testcase30.opus testcase31.wav
> 4) My quality monitoring app not able to identify file type of
> "testcase31.wav" , gives following error.
> AFfindType - Unknown audio file type
> AFopnRead: Error opening input audio file "testcase31.wav"
> Can some body please take look and verify that i have followed correct steps
> while encoding and decoding , else let know correct steps.
> If any body have quality testing related resouce , test cases, sample files,
> web links please share.
> Best Regards,
> Sakharam Thorat.
> opus mailing list
> opus at xiph.org
More information about the opus