I tried running the code is this link
but it is displaying application has stopped, I have been looking for an example to use surfaceView in live video streaming to android and Finally I found this but it is not working
I need live video streaming, since I'm streaming from an ip camera and I would like the streaming to be in real time
can someone tell me what the problem might be or help me with another example
Related
I have developed a screen recording application. Now I want the live streaming feature while recording screen. I want this live stream on youtube. From my research I only found how to live stream using camera or how to just open live streaming intent.
Can you guys guide me in the right direction it'll be very helpful
Thank you for your time
You need a media server for live streaming, please read here for detail:
Android(publisher) --RTMP--> SRS/Nginx--RTMP/HLS--> Android(player)
(YouTube)
The media server SRS/Nginx is actually similar to the YouTube-like platform.
About the live streaming publisher or player, you're able to use FFmpeg, OBS or ijkplayer, about more information, please read this link.
Let me refraise my question, I wrote it in a hurry.
Current situation:
I have set up a digital video recorder to record broadcasts provided via DVB-C. It is running on a raspberry 3B using TVHeadend and jetty/cling to provide UPnP and other possibilities to access media files. For watching recordings, I wrote an android player app using IJKPlayer, which runs on smartphones, FireTV and AndroidTV.
One hassle when playing media files which are currently beeing recorded is, that IJKPlayer doesn not support timeshifting. Means, when I start playing a currently recording file, I can only watch the length which is known by the player at that moment. Anything which is recorded afterwards can not be played. I need to exit the player activity and start it again. I have resolved that issue by "simulating" a completed recoding using a custom servlet implementation. Since the complete length of the recording is already known, I can use ffmpeg to accomplish this.
Future situation:
I plan to move away from IJKPlayer to ExoPlayer, because it supports hardware playback and is much faster when playing h.264 media. I can of course use the same solution like above, but as far as I have found out yet, ExoPlayer can support media files which are currently being recorded by using the Timeline class. However, I don't seem to find neither a usefull documentation nor any good example. Hence, I would appreciate any help with the timeline object.
Regards
Harry
Looks like my approach won't work. At least, I didn't find a solution. Problem is, that the server returns the stream size as it is during player-start-time. I didn't find a method to update the media duration for "regular" files.
However, I can solve the problem by changing the server side. Instead of accessing a regular file, I convert the file to m3u8 in realtime, using ffmpeg. I then throw the m3u8 URI onto the player and it updates the duration of the stream (while playing) without the need to create any additional code on the client side.
i need to make an application that can retrieve and send video using video streaming. but i just do not have any clue how to make it.
what i understand, video streaming is something like when the user want to watch video from the server like youtube, etc. i also want to add on that the application can send the video to the server using android application.
i am using android 2.2. if anyone is willing to give me any keyword i should search for to get to such a tutorial or any tips i should know, that would be a great help.
thank you.
As i tried few months before, android versions bellow 4.0 doesn't support live video streaming from phone to the server :(
you can pipeline capturing and sending chunk of video using Threads, so that it feels like a video streaming having very less delay :)
and for stored media content search for RTSP and related protocols for streaming i hope 2.2 supports this .
Guys
I am new to android and want to write a simple application that plays a video in android using video view. I have written the code it is working but the view is not clear. It is blurred. What should I do?? Please Help.
Is there any alternative to video view to achieve that...?? I want to play the recorded video from android phones
There are two possibilities. Either the quality of the video might be low or you would have tried it in a emulator. Sometimes it is possible for emulator to have some problems with playing video which I have personally faced. So you have to try it in a real device.
And regarding alternative for videoview, there is no such alternatives available I believe. But still videoview should be simple to play a video.
I am using YouTube’s RTSP link to demo some capability to the client. Occasionally the mediaplayer fails to display any video (Blank screen). However I am able to hear the sound. Can someone help me understand what is going wrong?
Thanks for the help in advance
I dont know much about youtubes RTSP, but I have had similar problems with youtube not loading the video (but the sound is ok) when the playback quality is changed. I bet that is where your problem lies. I would make sure that you specify playback quality and everything and request that feed before loading it into your player if at all possible.
The Android Emulator doesn't work with streaming RTSP video. So I suggest you should test your streaming application (video) on real device.
Hope it is useful for you