OrigamiEngine icon indicating copy to clipboard operation
OrigamiEngine copied to clipboard

does this library work with opus files?

Open kannanth opened this issue 10 years ago • 10 comments

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 avatar Apr 01 '15 11:04 kannanth

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

kannanth avatar Apr 01 '15 12:04 kannanth

There is a separate subspec for an opus support.

ap4y avatar Apr 01 '15 20:04 ap4y

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?

kannanth avatar Apr 01 '15 20:04 kannanth

Cool, will try to check it over the weekend.

ap4y avatar Apr 01 '15 20:04 ap4y

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 https://github.com/ap4y/OrigamiEngine/issues/57#issuecomment-88625535.

Best Regards Kannan Thiagarajan

kannanth avatar Apr 01 '15 20:04 kannanth

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

ap4y avatar Apr 05 '15 00:04 ap4y

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 https://github.com/ap4y/OrigamiEngine/issues/57#issuecomment-89692516.

Best Regards Kannan Thiagarajan

kannanth avatar Apr 05 '15 00:04 kannanth

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 https://github.com/ap4y/OrigamiEngine/issues/57#issuecomment-89692516.

Best Regards Kannan Thiagarajan

Best Regards Kannan Thiagarajan

kannanth avatar Apr 05 '15 12:04 kannanth

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

ap4y avatar Apr 06 '15 04:04 ap4y

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 :)

janandre avatar Oct 21 '16 11:10 janandre