How to buffer audio in Blackberry? - blackberry

I need to learn how to buffer audio stream from a remote server in Blackberry.
There is a sample buffered playback app with Blackberry api but can you tell what url may I use to test the application?

You can use any audio file (i.e. mp3) served up by a webserver. So either copy an mp3 file onto your own webserver or find a link to an mp3 file out on the internet.

Related

Save and Play DRM secured audio file in ios

I am developing music iOS app in which I am fetching audio file from server in bytes format and save in device in mp3 format. So when I am going to play audio file it is working fine. In some cases Audio file is DRM secured on server. I have one password but don't know how to use it.
My question is how to save and play DRM secured file?

iOS Playing Video from memorystream

My iOS app downloading encrypted mp4 file from server to my document folder.
I'll decrypt mp4 to my Memory and play video from memory.
For security, my app should not make decrypted mp4 file to doc folder.
How can I play Video from memorystream?
I'm trying with FFMpeg..or is there any other solutions?
Can I customize avio_open2() and avformat_open_input()?
Please help me....
Set AVFormatContext->pb to a self-created AVIOContext that wraps your memory stream. Most important are the read_packet() and seek() function callbacks, which your application should implement to do actual packet reading and seeking for the (mp4) demuxer. You can also look at earlier questions along the same path.

IOS Live streaming

Problem:
I need to download mp4 video from media server and simultaneously feed the localhost httpserver (GCDWebServer) to enable video streaming.
What have i tried so far:
I am able to download a video file from media server and then provide the localhost url for streaming the video.
But this takes a lot of time in downloading. So i wanted to know if there is a way i can segment the video on the fly and keep updating the m3u8 file as and when my next segment is ready.
Ok, Why downloading? Basically i need to deal with a custom encrypted video file. So i need to download, then decrypt the stream and then feed to my local httpserver.
I hope i'm clear in the requirements.

Stream only audio track from mp4 file

I have a remote MP4 file that has video and sound. I want to only stream the audio track of the mp4 file. I don't need the video and want to decrease the internet usage in my app. I have no idea where to start with this, Google doesn't seem to help. Is this impossible? Any ideas?
You can't... If you want audio only, you need to split video / audio on the server or put a stream software (like vlc, ffmpeg or mplayer) who can re-encode file in realtime (so you can drop video for new stream)
It's better, for me, to process all files on server and extract audio track...

How to play .m3u8 or .ts file in iOS?

I have create one iOS application in xCode 4.5.1.
The main purpose of this applciation is the playing .m3u8 video file.
I have add one .m3u8 file with all segment(.ts) in our local resource bundle.
So, how to play this file in iPhone locally using MPMoviePlayerController or UIWebView?
And, Can we modify or not this file after the download from the server?
If possible then how to do it?
pls tell me, any one known...
You will only be able to play the HLS content if it's being served over HTTP. So you should run a simple http server in one thread, and then pass the local URL to MPMoviePlayerController. The URL will look like http://localhost:8080/file.m3u8 and the video player will read the stream from the http server you have running in another thread.
Here is a question about running a webserver on iOS that might help you along: iPhone HTTP Server
You can host the .m3u8 file on local server e.g GCDWebServer. Just create its instance and pass the path of .m3u8 file in that server. Then use the server generated local host path and pass it to your player It will automatically fetch the key and .ts file as per the content written in .m3u8 file.

Resources