How to play xiph.org audio codecs in iPhone/iOS? - ios

I have music encoded in Vorbis format and also starded encoding some of my albums to the new Opus format. Is there a way I can copy and play them to my iPhone ? xiph.org wiki page states about vorbis support, that in the free software side, it's "work in progress", while it cites a radio stream and a video application that have Vorbis support, but what about audio support ?
To summarize the requirements:
Vorbis support
Opus support
some way to copy or make the album available
free software would be a plus, since proprietary software could be slow to adopt Opus and I could even add support for additional codecs myself by writing patches
[Edit: essential media player features required]
Playlist support, etc.
Flawless playback must be a strong guideline (for example, some players have audio decoding glitches every 5 minutes played)
http://wiki.xiph.org/Vorbis_Software_Players#iPhone

Capriccio music player for IOS supports FLAC, APE, WV, MPC, WAV, M4A, MP3, OGG, AIFF, CAF, MID, OPUS
I've used it on all my IOS devices (including iPad 2/3/Air and iPhone 4 & 6) with FLAC encoded music and never experienced audio glitches.

Open source licensing on iOS is a difficult matter. VLC for iOS plays Opus and Vorbis. But as a music player it's quite useless.

Since iOS 11 it supports native Opus streams, however you still need to encapsulate them in CAF format. For apps (and even in Safari) you might try to pass that CAF stuff with the audio/aac mimetype and should work.
Try with the afconvert available in macOS with something like this:
afconvert input.wav -f caff -d opus -b 32000 output.caf
There is a test site to try CAF in your Safari browser.
Source: https://hetzel.net/2017-06-12/ios-11-opus-support-in-podcast-feeds/

Related

Workaround playing a video .mov file in iOS app? Also related to Adobe Flash Animations

After researching lots on StackOverflow and Class References, iOS MPMoviePlayerController cannot play .mov video files. AVPlayer can play .mov files but there are no controls.
I want my app to play .mov files, because Adobe Flash Animation provides .mov as the cleanest and native looking video. If I convert the same video to mp4 (supported formats) there is loss in quality, even when I turn the video rate to 100 MB/s and highest quality video.
Quite ironic, QuickTime is Apple's intellectual property and its products do not support .mov video files.
How do I get around this issue?
MPMoviePlayerController (and iOS in general) does support .mov files. See Apple's class documentation, section "Supported Formats". But only a limited number of video codecs are supported.
Deceptively, the Quicktime ".mov" format is not a video codec, but rather audio/video container format that can contain video and audio (and some other things) in any number of compression codecs (h.264, mpeg2, ProRes, MJPEG, AAC, mp3, etc.)
Your files don't work because they include video compressed with a codec which iOS does not support (maybe PhotoJPEG if they are Flash animations?). You can check the format of your videos by opening them in Quicktime Player on Mac OS X and clicking "Show Movie Inspector" in the Window menu.
It is not possible to add support for additional codecs to the native iOS video playback system (MPMoviePlayerController and friends). This leaves two options;
Recompress your files to make them compatible
Use a different video playback framework.
You say you have already tried recompressing the files, but this is still the best option.
I encourage you to try recompressing the files with Handbrake. The h.264 codec is capable of excellent results (see BluRay movies, the iTunes Movie store, etc.)
If you really must play back your animations in their current format, you'll need to use another video playback framework. I suggest you look at libVLC and VLCKit from the excellent VideoLan project (I'm having problems accessing the VLCKit project pages, but a fork is available here). Be aware, non-native video playback will very likely not be hardware accelerated and so will eat your users' batteries.
One last thing, if your videos are short and silent… might animated GIF be an option?

Flash AS3 AIR on iOS not streaming HLS AAC

This is already a nightmare for me..
I have to get this AAC working for a project and there is no other way and no alternatives..
I'm using this library https://github.com/mangui/flashls and successfully stream ACC and MP3 with M3U8.
Now I have to get it working in iOS and in iOS, there is only the MP3 stream working. AAC seems to work, as the buffer is loading etc, but there is no audio.
The AIR has H.264/AAC Playback Support for iOS since AIR 2.
Source: http://www.adobe.com/devnet/articles/flashplayer-air-feature-list.html
And there are some NetStream members that are not supported, that might be the cause why audio is not playing in iOS.
Source: "Support for H.264 encoded video in AIR for iOS" http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html
Also the guy who wrote FlashHLS responded that he does not find any problem with the log files here: https://github.com/mangui/flashls/issues/150
NOTE: I'm streaming only audio and I only need audio. Would be great if there is a audio only library that does not use stageVideo.
Here is all my testing app code:
https://www.dropbox.com/s/y1t9jkv7tg1lgvy/iOS%20test%20ACC.zip?dl=0
The AAC stream: http://media.err.ee/viker/mp4:2104941.m4a/playlist.m3u8
Thank you!!

data reference (dref) atom support in iOS

quiktime file format has suport for dref atom. Where actual video data can reside in separate file on webserver.
to test the feature I created a file with dref atom. http://vihosting.net/sample_iTunes_reference.mov
This file plays nicely on quicktime player, but iPhone/iPad gives error, i am not sure if this is issue with generated file or device support.
If iOS (iphone,ipad) suports dref atom.
If not is there any official document from apple which stats this explicitly.
AVFoundation (media framework used in iPhone/iPad) supports limited number of video codecs. The sample file you provided is encoded with a rare codec 3ivx D4 4.5.1 (some applications even cannot recognise it), which is not supported in iOS.
Encode video using either h264 or mpeg4 codecs and use .mov or m4v container for iOS.

Flash/AIR Stage Video on iOS - Is It Possible? How is the performance?

Does any of you can point me to some resource about video performance of AIR (3.2) on iOS devices.
I am interested into:
is StageVideo available
is video streaming allowed/enabled
is the performance ok with high definition videos?
is .flv playback allowed? (how about on android: flash is there already)
Only H264 has hardware decoding on iOS.
This means comparable video performance with native player only for H264
and slugish (at best) decoding for Sorenson and VP6 (even with low resolutions).
"AIR 3 for iOS uses the StageVideo object for H.264 video with hardware decoding, with limited supported for NetStream functionality. AIR 3 for iOS also supports On2 and Sorenson codecs through the StageVideo object. This support does not use hardware decoding, and it does not limit NetStream functionality."
flash.media.StageVideo
FLV and MP4 are encapsulation formats.
FLV can contain VP6+MP3 or H264+AAC (or any of them taken alone).
MP4 can contain H264+AAC.
The docs don't say anything about FLV not beeing supported on iOS.
However, on iOS, if FLV/H264 won't play, you won't be able to remux it to MP4 on the fly because of the following restriction (otherwise you would lose hardware decoding):
"Note: This method is not supported for H.264 video in AIR 3.0 for iOS."
flash.net.NetStream::appendBytes()
Nothing is said about Sorenson or VP6 not beeing suported for on the fly remuxing (thus they should be).
You shouldn't need appendBytes anyways, unless you plan on doing some very advanced stuff, like switching bitrates on the fly without any interruption during play.
Live streaming requires something similar of what appendBytes does. Since H264 hardware decoding is required and does not have a software mode, you won't get H264 for live streams.
"It turns out that real-time streaming of an H264 video does not render on iOS devices in Adobe Air. Other video codecs will work (H263), but not for H264. You'll consume the feed, but will only hear audio. I confirmed this after talking with members of the Adobe Air development team."
From Adobe Forums
How well H264 decoding performs on different Apple ARM CPUs really depends a lot on video encode settings (B-frames or keyframes, bitrates, etc.) and wether you have dynamic content, static content, fast switching scenes, resolution, color palletes, etc.
Conclusion:
Use FLV or MP4 (whichever suits you best), with H264+AAC inside.
Experiment with encode settings, or lots of videos of which you are targeting (if any).
Determine which is the lowest (oldest) iOS device you want to target, and test on that.
I don't know how the performance stacks up, but the Actionscript docs for NetStream have some information about using NetStream/Video to play video on AIR on iOS devices:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#play%28%29
StageVideo is supported for H.264 video on iOS with AIR 3:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/StageVideo.html
The takeaway is that StageVideo and limited streaming capabilities are supported on iOS devices as long as your video uses the streaming formats that iOS requires.

How to play mp4 in iOS Flex application

I'm developing a Flex application to iOS devices and I can't find a way to play mp4 video inside it...
I know it works with navigate to URL command but it's open browser and then the vieo player, which is not what I'm intending...
Thanks
If you work with audio and video streaming, one of the worst limitation of AIR 2.6 for iOS is that it is not possible to stream video encoded in H.264 (and audio in AAC) inside your AIR application. AIR 2.6 for iOS supports NetConnection and NetStream but can decode only Spark, VP6, MP3, NellyMoser and Speex formats. So no H.264 and no AAC.
I've tried play .flv video fine in flex app on iOS.

Resources