How to control remote rtsp server using playbin - android

I'm working with gstreamer and I can play RTSP stream using below code:
data->pipeline = gst_parse_launch("playbin", &error);
//avi.sdp is a video file that in server
g_object_set(data->pipeline, "uri", "rtsp://192.168.1.1/avi.sdp", NULL);
When stream playing , i can pause it,
gst_element_set_state (data->pipeline, GST_STATE_PAUSED);
then when I set playing again, it restart playing!
gst_element_set_state (data->pipeline, GST_STATE_PLAYING);
is playbin support rtsp stream play & pause? if not, how can I implement this?

Related

Get Current Hls Stream Duration ExoPlayer

I use ExoPlayer library for my Hls live broadcast.
I have started a live stream with wirecast. Broadcast is in the second hour. But when test the stream with my android application, it always starts at 0. How to I get real duration on server with Exoplayer?

How to stream SHOUTcast radio streams on Chromecast receiver

We have a Android radio app which plays various live radio streams. It works pretty well with Google Chromecast as log the stream is a "normal" mp3 stream. The playback on Chromecast Styled Media Receiver is NOT working with SHOUTcast streams i.e http://46.105.118.14:13500.
After mRemoteMediaPlayer.load(...) I see in my Android LogCat a result statuscode = 1.
In Chrome debug console I see the following Load metadata error:
[673.080s] [cast.receiver.MediaManager] Load metadata error
cast_receiver.js:18
ib cast_receiver.js:18
gb.Gb cast_receiver.js:18
B.log cast_receiver.js:13
E cast_receiver.js:15
Z.pa cast_receiver.js:71
Eb cast_receiver.js:23
Cb cast_receiver.js:24
(anonymous function) cast_receiver.js:21
Is it possible to play SHOUTcast live streams with Google Chromecast (Styled Media Receiver or Custom Receiver)? If yes, can you give me some hints or point me to an example?
Append a /; after the port of the stream url, so you get to the stream data i.e http://46.105.118.14:13500/;
I use the localcast android app with this trick to make my chromecast play SHOUTcast Radio.

Getting Video View data as an inputstream

I am working on an application which plays hls streams from a server. I have used Video view for playing the stream. But now I need the stream data for some background processing. Is it possible to get the stream data which is currently playing in the video view as an inputstream??

Android VideoView Buffer size

I have a android application that plays HLS (Http Live Streaming) videos using VideoView.
I am using Local http proxy for forwarding http requests from VideoView to main HLS server as my stream (transport segment) is encrypted.
Flow of my application:
0. Preparing VideoView with local proxy url. ex. "http:// localhost :9878/index.m3u8"
1. VideoView sends requests to my proxy for M3U8 and ts segments.
2. Proxy forwards requests for M3u8 and ts from VideoView to HLS server.
3. Proxy checks for transport stream requests and before sending response to VideoView decrypts transport stream and sends it to VideoView.
4. VideoView plays the video stream.
This is working properly but some times i get following error:
output buffer is smaller than decoded data size Out Length
When i get this error in logcat my video becomes garbage (green video)
I see this issue usually when video stream bitrate size increases, is there any workaround for this issue?

Hot to get live streaming data in android

I am trying to make an app which gets livestreaming camera videos. I can stream my webcam from my laptop on the ip (for example ip:176.33.226.53:8070), by using the 1AVStreaming program but I can't reach the streaming video in my code.
Media Player can directly work with the url itself.
Look for something like
Uri myUri = Uri.parse("http://your/video/file/path");
MediaPlayer player = new MediaPlayer();
player.setDataSource(context, myUri);
player.prepare();
Use MediaPlayer.OnPreparedListener to show controls or start the video
Their are various examples available. Just Google It

Categories

Resources