Saving buffer data of AVPlayer The Next CEO of Stack OverflowHow to stream a video with AVURLAsset and save to disk the cached dataCaching with AVPlayer and AVAssetExportSessionAVPlayer stalling on large video files using resource loader delegatePlaying a video from live stream while also saving the stream to disk on iOSAccess the data of AVPlayer when playing video from HTTP Live StreamingPassing Data between View ControllersTake screenshots in the iOS simulatorAVPlayer show cached dataAVPlayer streaming progressAccess the data of AVPlayer when playing video from HTTP Live StreamingAVPlayer buffering percentageHow to prevent AVPlayer pausing audio while buffering?AVPlayer : How to handle network interruptionsAVPlayer with EqualizerPlay audio url in avplayer with buffering progress - Swift
How can I open an app using Terminal?
Is HostGator storing my password in plaintext?
Only print output after finding pattern
Why is there a PLL in CPU?
Why do remote companies require working in the US?
Why is Miller's case titled R (Miller)?
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
What's the point of interval inversion?
A pseudo-riley?
If the heap is initialized for security, then why is the stack uninitialized?
Explicit solution of a Hamiltonian system
Horror movie/show or scene where a horse creature opens its mouth really wide and devours a man in a stables
How do I solve this limit?
Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?
Anatomically Correct Mesopelagic Aves
What does "Its cash flow is deeply negative" mean?
Why do professional authors make "consistency" mistakes? And how to avoid them?
Why here is plural "We went to the movies last night."
Why does standard notation not preserve intervals (visually)
Why did we only see the N-1 starfighters in one film?
Why didn't Khan get resurrected in the Genesis Explosion?
What is meant by a M next to a roman numeral?
Can a single photon have an energy density?
Return of the Riley Riddles in Reverse
Saving buffer data of AVPlayer
The Next CEO of Stack OverflowHow to stream a video with AVURLAsset and save to disk the cached dataCaching with AVPlayer and AVAssetExportSessionAVPlayer stalling on large video files using resource loader delegatePlaying a video from live stream while also saving the stream to disk on iOSAccess the data of AVPlayer when playing video from HTTP Live StreamingPassing Data between View ControllersTake screenshots in the iOS simulatorAVPlayer show cached dataAVPlayer streaming progressAccess the data of AVPlayer when playing video from HTTP Live StreamingAVPlayer buffering percentageHow to prevent AVPlayer pausing audio while buffering?AVPlayer : How to handle network interruptionsAVPlayer with EqualizerPlay audio url in avplayer with buffering progress - Swift
I am playing audio from my server using AVPlayer in my application. Now i want that when it completely buffer the audio then i can save that data in the application to play it later. So any guide or help that how can i access buffer data and save it for later use
iphone ios cocoa-touch avplayer
add a comment |
I am playing audio from my server using AVPlayer in my application. Now i want that when it completely buffer the audio then i can save that data in the application to play it later. So any guide or help that how can i access buffer data and save it for later use
iphone ios cocoa-touch avplayer
I know this is an old question. However, you can find the answer here: stackoverflow.com/questions/37611488/…
– Gabriel.Massana
Jun 3 '16 at 10:08
add a comment |
I am playing audio from my server using AVPlayer in my application. Now i want that when it completely buffer the audio then i can save that data in the application to play it later. So any guide or help that how can i access buffer data and save it for later use
iphone ios cocoa-touch avplayer
I am playing audio from my server using AVPlayer in my application. Now i want that when it completely buffer the audio then i can save that data in the application to play it later. So any guide or help that how can i access buffer data and save it for later use
iphone ios cocoa-touch avplayer
iphone ios cocoa-touch avplayer
asked Aug 20 '13 at 5:58
Iqbal KhanIqbal Khan
2,51563776
2,51563776
I know this is an old question. However, you can find the answer here: stackoverflow.com/questions/37611488/…
– Gabriel.Massana
Jun 3 '16 at 10:08
add a comment |
I know this is an old question. However, you can find the answer here: stackoverflow.com/questions/37611488/…
– Gabriel.Massana
Jun 3 '16 at 10:08
I know this is an old question. However, you can find the answer here: stackoverflow.com/questions/37611488/…
– Gabriel.Massana
Jun 3 '16 at 10:08
I know this is an old question. However, you can find the answer here: stackoverflow.com/questions/37611488/…
– Gabriel.Massana
Jun 3 '16 at 10:08
add a comment |
5 Answers
5
active
oldest
votes
I think your issue would be similar to downloading audio or music files from the server and then playing them in your app. Anyways if you want to save the audio in your app , wouldn't it be better to download it and then play it ? Anyways please check these links
How to download audio files from a server into my iPhone application?
Download music file from server and save in my app
Hope they help.
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
add a comment |
You could supply a resourceLoader delegate to take over control of the resource loading process from AVPlayer and then supply it the data as and when it requests and becomes available. The resource loader is a property on AVURLAsset. I've documented a full solution on my blog but the main idea is to switch the protocol of your URL to something custom so AVURLAsset's resource loader requires your application's assistance in loading that URL. Then when you get the AVAssetResourceLoaderDelegate callbacks, start downloading the file and try to respond to the pending requests received from those delegate callbacks as and when you have data. This will allow progressive loading/playback of the content without having to run a full blown HTTP server in your app or resorting to other complicated solutions.
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
1
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
2
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
|
show 2 more comments
Easy to do...using the same url for your audio stream use NSURLConnection to get the data and save using NSFilehandler...just done it myself whilst streaming audio and saving at the same time to mp3...let me know if you need code sample...
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
add a comment |
The team at Calm has open-sourced our implementation to this. It's available as a CocoaPod. It's called PersistentStreamPlayer.
It acts as a resourceLoader. The big benefit over other implementations is that it does not require the binary data to be in memory at any point, so it supports larger files.
Features include:
- streaming of audio file, starting playback as soon as first data is available
- also saves streamed data to a file URL as soon as the buffer completes
exposes timeBuffered, helpful for displaying buffer progress bars in the UI - handles re-starting the audio file after the buffer stream stalls (e.g. slow network)
- simple play, pause and destroy methods (destroy clears all memory resources)
- does not keep audio file data in memory, so that it supports large files that don't fit in RAM
You can find it here: https://github.com/calmcom/PersistentStreamPlayer
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
add a comment |
You can't access the buffer of the AVPlayer. Some hints: You can put previews (short versions of audios) of your audio files on your server, so that Your users could listen the previews before they download the full audio files, or you may search for custom open source audio stream players, maybe those will allow you to access the stream buffer. Good Luck!
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f18327920%2fsaving-buffer-data-of-avplayer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think your issue would be similar to downloading audio or music files from the server and then playing them in your app. Anyways if you want to save the audio in your app , wouldn't it be better to download it and then play it ? Anyways please check these links
How to download audio files from a server into my iPhone application?
Download music file from server and save in my app
Hope they help.
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
add a comment |
I think your issue would be similar to downloading audio or music files from the server and then playing them in your app. Anyways if you want to save the audio in your app , wouldn't it be better to download it and then play it ? Anyways please check these links
How to download audio files from a server into my iPhone application?
Download music file from server and save in my app
Hope they help.
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
add a comment |
I think your issue would be similar to downloading audio or music files from the server and then playing them in your app. Anyways if you want to save the audio in your app , wouldn't it be better to download it and then play it ? Anyways please check these links
How to download audio files from a server into my iPhone application?
Download music file from server and save in my app
Hope they help.
I think your issue would be similar to downloading audio or music files from the server and then playing them in your app. Anyways if you want to save the audio in your app , wouldn't it be better to download it and then play it ? Anyways please check these links
How to download audio files from a server into my iPhone application?
Download music file from server and save in my app
Hope they help.
edited May 23 '17 at 11:54
Community♦
11
11
answered Aug 20 '13 at 6:31
IronManGillIronManGill
7,13722349
7,13722349
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
add a comment |
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
actually i want to play audio before it completely downloads, i want it to play as it download some part of audio file
– Iqbal Khan
Aug 20 '13 at 6:38
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
I have receive continue data from udp please suggest how can play continue like streaming
– DURGESH Chaurasiya
Jun 5 '17 at 11:57
add a comment |
You could supply a resourceLoader delegate to take over control of the resource loading process from AVPlayer and then supply it the data as and when it requests and becomes available. The resource loader is a property on AVURLAsset. I've documented a full solution on my blog but the main idea is to switch the protocol of your URL to something custom so AVURLAsset's resource loader requires your application's assistance in loading that URL. Then when you get the AVAssetResourceLoaderDelegate callbacks, start downloading the file and try to respond to the pending requests received from those delegate callbacks as and when you have data. This will allow progressive loading/playback of the content without having to run a full blown HTTP server in your app or resorting to other complicated solutions.
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
1
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
2
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
|
show 2 more comments
You could supply a resourceLoader delegate to take over control of the resource loading process from AVPlayer and then supply it the data as and when it requests and becomes available. The resource loader is a property on AVURLAsset. I've documented a full solution on my blog but the main idea is to switch the protocol of your URL to something custom so AVURLAsset's resource loader requires your application's assistance in loading that URL. Then when you get the AVAssetResourceLoaderDelegate callbacks, start downloading the file and try to respond to the pending requests received from those delegate callbacks as and when you have data. This will allow progressive loading/playback of the content without having to run a full blown HTTP server in your app or resorting to other complicated solutions.
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
1
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
2
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
|
show 2 more comments
You could supply a resourceLoader delegate to take over control of the resource loading process from AVPlayer and then supply it the data as and when it requests and becomes available. The resource loader is a property on AVURLAsset. I've documented a full solution on my blog but the main idea is to switch the protocol of your URL to something custom so AVURLAsset's resource loader requires your application's assistance in loading that URL. Then when you get the AVAssetResourceLoaderDelegate callbacks, start downloading the file and try to respond to the pending requests received from those delegate callbacks as and when you have data. This will allow progressive loading/playback of the content without having to run a full blown HTTP server in your app or resorting to other complicated solutions.
You could supply a resourceLoader delegate to take over control of the resource loading process from AVPlayer and then supply it the data as and when it requests and becomes available. The resource loader is a property on AVURLAsset. I've documented a full solution on my blog but the main idea is to switch the protocol of your URL to something custom so AVURLAsset's resource loader requires your application's assistance in loading that URL. Then when you get the AVAssetResourceLoaderDelegate callbacks, start downloading the file and try to respond to the pending requests received from those delegate callbacks as and when you have data. This will allow progressive loading/playback of the content without having to run a full blown HTTP server in your app or resorting to other complicated solutions.
edited Mar 21 at 16:31
kelin
5,85653874
5,85653874
answered May 20 '14 at 8:46
AnuragAnurag
119k30199250
119k30199250
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
1
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
2
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
|
show 2 more comments
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
1
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
2
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
Great answer! I was about to go down the route of setting up a local http server that would somewhat act as a proxy, but this solution seems way more elegant. Will definitely give it a try.
– quentinadam
Aug 28 '14 at 22:51
1
1
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
The code on your blog works like a charm!
– quentinadam
Aug 29 '14 at 10:12
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Do you know which changes I have to make to get this working for video files? For some reason the player status changes to failure. I basically just inserted a video file instead of mp3 and added an avplayerlayer. The download starts and everything looks fine, but then the player's status changes from 0 (unknown) to 2 (failure)
– Nils Ziehn
Sep 9 '14 at 10:21
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
Nice! Have you run into the problem described here? We've got the same issue: stackoverflow.com/questions/29683567/…
– Hudson
Apr 17 '15 at 15:11
2
2
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
the code works great for audio, but not for video :(
– joey
Mar 29 '16 at 0:37
|
show 2 more comments
Easy to do...using the same url for your audio stream use NSURLConnection to get the data and save using NSFilehandler...just done it myself whilst streaming audio and saving at the same time to mp3...let me know if you need code sample...
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
add a comment |
Easy to do...using the same url for your audio stream use NSURLConnection to get the data and save using NSFilehandler...just done it myself whilst streaming audio and saving at the same time to mp3...let me know if you need code sample...
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
add a comment |
Easy to do...using the same url for your audio stream use NSURLConnection to get the data and save using NSFilehandler...just done it myself whilst streaming audio and saving at the same time to mp3...let me know if you need code sample...
Easy to do...using the same url for your audio stream use NSURLConnection to get the data and save using NSFilehandler...just done it myself whilst streaming audio and saving at the same time to mp3...let me know if you need code sample...
answered Sep 10 '13 at 22:17
Alex McPhersonAlex McPherson
1,93231934
1,93231934
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
add a comment |
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
yes,sure you can share the code for others, i had done that same thing that you just explain in the Answer and its working good.
– Iqbal Khan
Sep 11 '13 at 6:01
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we please see a code sample of this? Maybe a gist on Github?
– user3344977
Apr 10 '15 at 6:32
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
Can we get this sample code pls?
– inorganik
Aug 21 '15 at 17:19
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
aren't you downloading the data twice by doing that? I wouldn't recommend
– defense2000x
Dec 5 '16 at 1:36
add a comment |
The team at Calm has open-sourced our implementation to this. It's available as a CocoaPod. It's called PersistentStreamPlayer.
It acts as a resourceLoader. The big benefit over other implementations is that it does not require the binary data to be in memory at any point, so it supports larger files.
Features include:
- streaming of audio file, starting playback as soon as first data is available
- also saves streamed data to a file URL as soon as the buffer completes
exposes timeBuffered, helpful for displaying buffer progress bars in the UI - handles re-starting the audio file after the buffer stream stalls (e.g. slow network)
- simple play, pause and destroy methods (destroy clears all memory resources)
- does not keep audio file data in memory, so that it supports large files that don't fit in RAM
You can find it here: https://github.com/calmcom/PersistentStreamPlayer
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
add a comment |
The team at Calm has open-sourced our implementation to this. It's available as a CocoaPod. It's called PersistentStreamPlayer.
It acts as a resourceLoader. The big benefit over other implementations is that it does not require the binary data to be in memory at any point, so it supports larger files.
Features include:
- streaming of audio file, starting playback as soon as first data is available
- also saves streamed data to a file URL as soon as the buffer completes
exposes timeBuffered, helpful for displaying buffer progress bars in the UI - handles re-starting the audio file after the buffer stream stalls (e.g. slow network)
- simple play, pause and destroy methods (destroy clears all memory resources)
- does not keep audio file data in memory, so that it supports large files that don't fit in RAM
You can find it here: https://github.com/calmcom/PersistentStreamPlayer
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
add a comment |
The team at Calm has open-sourced our implementation to this. It's available as a CocoaPod. It's called PersistentStreamPlayer.
It acts as a resourceLoader. The big benefit over other implementations is that it does not require the binary data to be in memory at any point, so it supports larger files.
Features include:
- streaming of audio file, starting playback as soon as first data is available
- also saves streamed data to a file URL as soon as the buffer completes
exposes timeBuffered, helpful for displaying buffer progress bars in the UI - handles re-starting the audio file after the buffer stream stalls (e.g. slow network)
- simple play, pause and destroy methods (destroy clears all memory resources)
- does not keep audio file data in memory, so that it supports large files that don't fit in RAM
You can find it here: https://github.com/calmcom/PersistentStreamPlayer
The team at Calm has open-sourced our implementation to this. It's available as a CocoaPod. It's called PersistentStreamPlayer.
It acts as a resourceLoader. The big benefit over other implementations is that it does not require the binary data to be in memory at any point, so it supports larger files.
Features include:
- streaming of audio file, starting playback as soon as first data is available
- also saves streamed data to a file URL as soon as the buffer completes
exposes timeBuffered, helpful for displaying buffer progress bars in the UI - handles re-starting the audio file after the buffer stream stalls (e.g. slow network)
- simple play, pause and destroy methods (destroy clears all memory resources)
- does not keep audio file data in memory, so that it supports large files that don't fit in RAM
You can find it here: https://github.com/calmcom/PersistentStreamPlayer
answered Oct 7 '16 at 22:00
Tyler SheafferTyler Sheaffer
1,0611815
1,0611815
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
add a comment |
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
it mentions "Stream audio over http, and persist the data to a local file while buffering" does it work for video aswell ?
– Bonnie
Oct 25 '17 at 19:44
add a comment |
You can't access the buffer of the AVPlayer. Some hints: You can put previews (short versions of audios) of your audio files on your server, so that Your users could listen the previews before they download the full audio files, or you may search for custom open source audio stream players, maybe those will allow you to access the stream buffer. Good Luck!
add a comment |
You can't access the buffer of the AVPlayer. Some hints: You can put previews (short versions of audios) of your audio files on your server, so that Your users could listen the previews before they download the full audio files, or you may search for custom open source audio stream players, maybe those will allow you to access the stream buffer. Good Luck!
add a comment |
You can't access the buffer of the AVPlayer. Some hints: You can put previews (short versions of audios) of your audio files on your server, so that Your users could listen the previews before they download the full audio files, or you may search for custom open source audio stream players, maybe those will allow you to access the stream buffer. Good Luck!
You can't access the buffer of the AVPlayer. Some hints: You can put previews (short versions of audios) of your audio files on your server, so that Your users could listen the previews before they download the full audio files, or you may search for custom open source audio stream players, maybe those will allow you to access the stream buffer. Good Luck!
answered Aug 20 '13 at 6:59
Fahri AzimovFahri Azimov
8,19411729
8,19411729
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f18327920%2fsaving-buffer-data-of-avplayer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I know this is an old question. However, you can find the answer here: stackoverflow.com/questions/37611488/…
– Gabriel.Massana
Jun 3 '16 at 10:08