Recording avplayer playing live streaming byte data...in iOS - ios

I want to save avplayer playing byte data save on document directory.(like recording) but i don't want record side voice only song music.
AVAudioRecorder is take speaker voice so, thats why i want to save player live streaming data.
So, Please give any suggestion and source code which apply in my code.

Related

How can I forbid AVPlayer switching to audio only tracks in HLS stream

The main source of my worries comes from the m3u8 manifests I use to play video in my app.
They contain variants with audio & video and some containing only audio.
The problem occurs when I load this type of manifest in avplayercontroller/avplayer while having a bad network or low bandwidth.
In every case avplayer witch to the tracks with no video to clear some bandwidth, resulting in no image appearing on the player.
I would like to know if there is a way to force avplayer or avplayercontroller to only focus on the manifest tracks containing audio and video and forbid audio only tracks to be selected, loaded, and played.
Thank you in advance to any tips or pointers you can give me on this subject.

Using AVPlayer to make audio tinny (adjust playback EQ).

I would like to be able to have music playback that can allow me to make the audio tinny. Like an Equalizer, i would like to alter the Channel EQ of the audio using a slider to choose whether the audio is full and rich, or light and tinny during playback of the audio file. Is this implementation possible?
Thanks,

Which way is more simple to capture Audio by mic, meanwhile play the audio? like audio amplifier

I have roughly researched audio APIs for iOS. There are several layer APIs to perform audio capture and play.
My app needs a simple function like audio amplifier (needs delay around 0.2 Seconds). I don't need save record to file. I am not sure which way is more simple to implement it. Core Audio? Or AVfoundation?
How do I record audio on iPhone with AVAudioRecorder? I am not sure does this link working with my case or not.
While playing a sound does not stop recording Avcapture This link is playing other audio when recording. It is not suit my case.
For buffered near-simultaneous audio record and playback, you will need to use either the Audio Queue API or Audio Units such as RemoteIO. Audio Units will allow a lower latency.

iOS: Mute right channel volume

I'm trying to mute the right channel for all audio apart from an audio stream that I control.
I am using a number of libraries playing audio including OpenEars for Text-to-speech and I would like all of them to only play out the left headphone speaker while I play something else out the right speaker.
I know how to play out just the right speaker creating an Audio Units stream however I am not creating the audio streams for the other libraries. Is there a way to change the default audio channel? Or is it possible to create an effort or mixer that is applied to all audio going out that mutes the right channel?
Any help/hints would be much appreciated.
If you don't need low latency audio, wich AudioUnit provides, you can try using AudioQueues to play your audio instead, AudioQueues has the highest degree of control over audio in iOS (it supports synchronization, channel control, volume gain, buffer, etc.). Here's some links to Apple's documentation :-)
Audio Queue Services Programming Guide Introduction: http://bit.ly/10ikt4G
About Audio Queues: http://bit.ly/YfnVI8
Playing audio with AudioQueue: http://bit.ly/10ikAgT

iOS Capture Video from Camera and Mixing with audio file in real time

I am trying to capture video from iPhone camera and save the movie mixed with an audio file.
I can capture the video with the audio (from mic) with no problems. What I want to do is capture the video but instead of mic audio, use a music track (a .caf file).
I am capturing the video with AVAssetWriter. I've tried to set up an AVAssetReader to read the audio file, but I couldn't make it work with the AVAssetWriter (maybe because the decoding of audio happens real fast).
Also, I don't want to save the movie without audio and mix it afterwards with an AVAssetExportSession. It would be to slow for my purpose.
Any Ideas ? Thanks in advance.
Capture the video using AVAssetWriter, Capture audio lets say with AvAudioRecorder , then mix audio and video using AVExportSession , lots of posts on this topic.
If you do it after (with AVAssetExportSession) , you will problem with the sync. and short delay (time...) between the video and the audio...didn't find better solution

Resources