How to save streaming videos in Android by saving to SDcard?
I need to stream videos from an URL and then i want to save the video to SDcard.
Asked by: Marcus517 | Posted: 25-01-2022
Answer 1
For video streaming take a look at the following example/projects:
Audio and Video on Android- Official Documentation
Vidtry an Open Source Project by Mark Murphy
Video Streaming Example by Davanum(this might be out of date)
Saving to SDcard: I am not very sure, but once you have the video stream(abstracted as InputStream) in your code you should be able to save it on SD card using normal File I/O operations.
Answered by: Wilson663 | Posted: 26-02-2022Answer 2
Be careful when you prepare your videos for streaming. The documentation on the MediaPlayer class says it is accepting video streaming over HTTP only if the following 2 conditions are true:
- The 'moov' atom has to be before the 'mdat' atom.
- The clip has to be reasonably interleaved.
While the first condition is quite straightforward, about the 2nd one I couldn't find a definitive answer on what does it mean for a clip to be "reasonably interleaved".
Answered by: Dainton664 | Posted: 26-02-2022Similar questions
audio streaming - Android RTSP coding problem
I have Googled my butt off trying to find where if there is a surefire way to make rtsp work. I have a radio station that I listen to that streams via rtsp. Of course by default Android doesn't want to play it. If I pop the URL into yourmuze.fm and create a station there it lets me stream it to my phone. After checking how it works I come to find that it streams to the phone via rtsp! So obviously there is something a...
Android streaming from icecast server get track information
I have a stream from an icecast server downloading, and I can grab the information in the headers by doing the following:
URLConnection cn = new URL(mediaUrl).openConnection();
cn.connect();
int pos=1;
String x;
String y;
while (cn.getHeaderField(pos) != null)
{
x=cn.getHeaderFieldKey(pos);
y = cn.getHeaderField(x);
Log.e(":::::",""+x+" : "+y);
p...
java - Where to get streaming (live) video and audio from camera example app for Android?
Where to get streaming (live) video and audio from camera example for Android?
Suppose I want to create some live video streaming service app so I'll have some cool server at the back end. And I know how to do that part. Suppose I have some stand alone app for PCs now I want to go on to mobile devices. So I want to see some sample app grabing audio and video streams from Phone, Synchronizing them, encoding somehow,...
audio streaming - Android RTSP coding problem
I have Googled my butt off trying to find where if there is a surefire way to make rtsp work. I have a radio station that I listen to that streams via rtsp. Of course by default Android doesn't want to play it. If I pop the URL into yourmuze.fm and create a station there it lets me stream it to my phone. After checking how it works I come to find that it streams to the phone via rtsp! So obviously there is something a...
Android streaming from icecast server get track information
I have a stream from an icecast server downloading, and I can grab the information in the headers by doing the following:
URLConnection cn = new URL(mediaUrl).openConnection();
cn.connect();
int pos=1;
String x;
String y;
while (cn.getHeaderField(pos) != null)
{
x=cn.getHeaderFieldKey(pos);
y = cn.getHeaderField(x);
Log.e(":::::",""+x+" : "+y);
p...
java - Android: Streaming audio over TCP Sockets
For my app, I need to record audio from MIC on an Android phone, and send it over TCP to the other android phone, where it needs to be played.
I am using AudioRecord and AudioTrack class. This works great with a file - write audio to the file using DataOutputStream, and read from it using DataInputStream.
However, if I obtain the same stream from a socket ...
Video Streaming in Android using Lighttpd
I 'm developing a video streaming android application on HTC Tattoo. I 've Lighttpd server at my server side which i use to stream videos to a web site.
On Android , Do I need to enable any module in Lighttpd server?
Thanks
android - Streaming video using non standard protocols
My company makes DVRs that specialize in streaming live and recorded video. The video is encoded using standard MPEG-4 codecs so the codecs in Android should have no trouble with them. However, the video is recorded using non-standard file formats and is streamed using our proprietary protocol (among other things we embed additional data such as watermarks with each frame of video). Is there any way I can take my stream...
streaming - Does anyone have an example of how to stream the camera to a server on android?
I find plenty of examples of downstreaming a video from a server to an android, but I actually want to stream live images from my droid to a server.
Video streaming using RTSP: Android
I'm trying to install a Wowza server on my Linux machine to enable the RTSP streaming for my Android application.
On Android client side what sort of changes do I need to make in my application? I'm using Videoview to simply play a video file stored locally.
Now I want to get the video content get streamed through the server that I've installed. If necessary I can move to any other streaming server as rig...
video - Audio only while streaming a mp4 file to Android Device
I 've set Wowza streaming server to stream mp4 videos to Android phones. Android phone can play the RTSP stream successfully but here It only plays audio of the file not the video.
Android RTSP streaming failing
I 've Set up wowza streaming server in my ubuntu box for RTSP streaming video files. The video gets stream perfectly when I 've Totem video player at client side. The same url or video is failing to work on android device and the application that tries to access that rtsp url breaks with Mediaplayer error (1,-1).
Still can't find your answer? Check out these communities...
Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android