Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

does this library work with opus files? #57

Open
kannanth opened this issue Apr 1, 2015 · 10 comments
Open

does this library work with opus files? #57

kannanth opened this issue Apr 1, 2015 · 10 comments

Comments

@kannanth
Copy link

kannanth commented Apr 1, 2015

I have an opus file (with extension .opus) that I'm trying to play using Origami in my iOS 8 app. I was debugging through and found out that it only supports files with the following extensions.
{
3g2 = CoreAudioDecoder;
3gp = CoreAudioDecoder;
aac = CoreAudioDecoder;
ac3 = CoreAudioDecoder;
adts = CoreAudioDecoder;
aif = CoreAudioDecoder;
aifc = CoreAudioDecoder;
aiff = CoreAudioDecoder;
amr = CoreAudioDecoder;
au = CoreAudioDecoder;
caf = CoreAudioDecoder;
cue = CueSheetDecoder;
m4a = CoreAudioDecoder;
m4b = CoreAudioDecoder;
m4r = CoreAudioDecoder;
mp1 = CoreAudioDecoder;
mp2 = CoreAudioDecoder;
mp3 = CoreAudioDecoder;
mp4 = CoreAudioDecoder;
mpa = CoreAudioDecoder;
mpeg = CoreAudioDecoder;
snd = CoreAudioDecoder;
wav = CoreAudioDecoder;
}

I'm getting a "Error:Couldn't open source". To be more specific, the file is opus encoded within an ogg container.

Any thoughts as to I how I should proceed?

Thanks

@kannanth
Copy link
Author

kannanth commented Apr 1, 2015

Just wanted wanted to add,
I see that the there is a plugin folder with opus decoder, but I did not get it when I setup the project using cocoapods - to which I'm a newbie (absolute first project). I used a podfile with following.

platform :ios, '8.0'
use_frameworks!

target 'MyOpusPlayer' do
pod 'OrigamiEngine', '~> 1.0.14'
end

@ap4y
Copy link
Owner

ap4y commented Apr 1, 2015

There is a separate subspec for an opus support.

@kannanth
Copy link
Author

kannanth commented Apr 1, 2015

Thanks, I have managed to get it to comiple and play the opus file. But the playback is very slow and choppy. When I playback the file in FireFox (renaming the extension to ogg), it plays fine.

Here's the link to the file. Its a very small file.
https://dl.dropboxusercontent.com/u/46046195/myfile.opus

Any thoughts?

@ap4y
Copy link
Owner

ap4y commented Apr 1, 2015

Cool, will try to check it over the weekend.

@kannanth
Copy link
Author

kannanth commented Apr 1, 2015

Thanks - appreciate it. Looking forward for some pointers.

On Wed, Apr 1, 2015 at 3:41 PM, Arthur Evstifeev [email protected]
wrote:

Cool, will try to check it over the weekend.


Reply to this email directly or view it on GitHub
#57 (comment).

Best Regards
Kannan Thiagarajan

ap4y pushed a commit that referenced this issue Apr 5, 2015
Previously used sampling rate of original stream, according to the docs
should be always 48khz.

updates #57
@ap4y
Copy link
Owner

ap4y commented Apr 5, 2015

Updated on master, was a error in opus decoder (incorrect sampling rate was used).

@kannanth
Copy link
Author

kannanth commented Apr 5, 2015

Thank you
I will check it out soon

Best regards

On Saturday, April 4, 2015, Arthur Evstifeev [email protected]
wrote:

Updated on master, was a error in opus decoder (incorrect sampling rate
was used).


Reply to this email directly or view it on GitHub
#57 (comment).

Best Regards
Kannan Thiagarajan

@kannanth
Copy link
Author

kannanth commented Apr 5, 2015

Works like a charm. Thank you.

Just a quick follow-up question. After the url finishes playing, the
engineExpectsNextUrl gets called (as expected), but returning nil from
this does not seem to have an effect, this method gets called repeatedly.
Is this the expected behaviour?

Best Regards
Kannan

On Sat, Apr 4, 2015 at 7:19 PM, Kannan Thiagarajan [email protected]
wrote:

Thank you
I will check it out soon

Best regards

On Saturday, April 4, 2015, Arthur Evstifeev [email protected]
wrote:

Updated on master, was a error in opus decoder (incorrect sampling rate
was used).


Reply to this email directly or view it on GitHub
#57 (comment).

Best Regards
Kannan Thiagarajan

Best Regards
Kannan Thiagarajan

@ap4y
Copy link
Owner

ap4y commented Apr 6, 2015

there is an issue about this bug: #52, but I haven't looked into it yet.

@janandre
Copy link

Got opus working with these tips! GREAT.
But somehow your fix commit did not make it to the version you get via cocoa pods. Had to apply your fix again.

Would be great to see you updating this project :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants