Hi,
I am working on developing an app in which one of its features includes receiving a video stream from a webcam and displaying it through a videoView. I've been able to stream video before using VLC, but can't seem to get it working with my Android App.
In VLC, after choosing my webcam as the video source to stream, I choose http stream, and for transcoding I choose MP4 for encapsulation and H-264 as the video codec. (I believe these are the formats supported by Android) the generated stream output string is as follows:
:sout=#transcode{vcodec=h264,vb=800,scale=1,acodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/} :sout-keep
now on the android side, inside the onCreate method, my code looks like this:
mVideo = (VideoView) findViewById(R.id.videoView1);
MediaController mc = new MediaController(this);
mc.setMediaPlayer(mVideo);
mVideo.setMediaController(mc);
mVideo.setVideoPath("my_ipaddress:8080");
mVideo.requestFocus();
mVideo.start();
I am able to go on a different computer and capture the stream using VLC, but when I run the app on my Android device, I get a message that tells me the video can't be played. Not sure where the issue is, and I've been able to find a few similar post on here and on other forums, but still haven't found a solution that works for me. Any help would be greatly appreciated. Thanks!
Related
I have been working on developing an a very simple app that plays a video rtsp stream from VLC And have been very stuck after a week I thought it might be time to call it quits but first thought I would post my problem:
I saw on the android dev site that it supports
RTSP (RTP, SDP)
HTTP progressive streaming
Video Encoding Recommendations
Video resolution 176 x 144 px
Video frame rate 12 fps
Video bitrate 56 Kbps
Audio codec AAC-LC
Audio channels 1 (mono)
Audio bitrate 24 Kbps
Click to expand...
Click to collapse
I set everything up in VLC
Stream link: (remove !'s if need for link)
ihop.!org.!edgesuite.!net/ihopkc/wls/tpr/IHOP-KC_TPR_WLS!.asx
Destonation:
RTSP -> Output: /ihop.mp4(also tried .dsp) port 5544 -> Active transcodeing checked -> video profile H.264+ACC(mp4) (and edited everything down to android's low Video Encoding Recommendations (like above))
TTL = 1
the rtsp stream works great when I open up anther VLC instance and stream the link rtsp://myip:5544/ihop.(mp4 or dsp)
but when I run it in my device (nook color w/ CM7.0.2) video viewer it says "sorry can not play this video"
sdk code:
Code:
VideoView videoView = (VideoView) findViewById(R.id.surface_view);
Uri video = Uri.parse("rtsp://192.168.1.88:5544/ihop.mp4");
videoView.setVideoURI(video);
videoView.start();
I am able to run audio stream from vlc to android and also ping my ip in terminal emulator so i know its not a connection error
Any ideas on what im doing wrong or on how to get this to work?
the only thing left that I haven't tried is Darwin streaming server on mac( tried it on windows 7) and would need to fix my hackintosh to do this.
Any Help is very appreciated
THANK YOU!!!
What's the best, fastest, video streaming app for Android? (using it on a local 802.11ac network)
I'm using ES File Explorer to browse my SMB network shares and after selecting a video, and using MX Player, it takes several seconds to start and then if I skip around in the video it also takes several seconds.
On iOS there was an application called Air Video that streamed videos (lossless, if the device supported the video format) and it was incredibly fast. After selecting a video, playback would start almost instantly.
I've tried using Emit (but had bugs,crashed alot, etc), ES Player + MX Player, BubbleUPNP + MX Player, and most of them are very slow.
Are there any other options?
DicePlayer!
Hi...
You should try DicePlayer, you could add Samba server(s) and it's working great with both Linux (Ubuntu at least) and Windows (7,8).
If your hardware support the format and definition of the video you want to play it's start almost instantly.
Hope I helped you.
I have a linksys webcam that streams its output in a .asf link, however I have yet to find an android program out there that will stream the video. a few browsers like chrome and firefox will start to download the .asf file but does so in an endless cycle until it crashes or chops of a segment of time, which can be played back by a few video players ive found, however no player i have found is able to directly fead from it, so there is no real time viewing of the fead.
anyone know off hand of an .asf steam capable video player that works on the xoom? id love to use it to watch my webcams instead of using vlc on my desktop which is half way across the room where i usually sit and surf on the tablet.
thanks all!
Hello guys,
What are your recommendations for streaming applications that allows me to watch video on my android devices.
I prefer the app to have a wide support of video formats. Bonus if it does Audio streaming also.
Thank you
1a11ous said:
Hello guys,
What are your recommendations for streaming applications that allows me to watch video on my android devices.
I prefer the app to have a wide support of video formats. Bonus if it does Audio streaming also.
Thank you
Click to expand...
Click to collapse
I run ps3 media server on my PC for DLNA, then install BubblePnP on my android to stream the DLNA which plays through MX Player. Works perfectly.
Gotta use DLNA if you want to stream 720 or 1080. You cant use SAMBA its too slow.
- please Click Thanks if i helped.
I love BS player for this..also has lot of features like playing from YouTube,vid formats etc..it has good WiFi streaming performance as well,you just have to share the folder on PC and open file thru bsplayer ..very easy..
thanks for the suggestions, I will give them a shot.
I was aiming for something like installing a software on the pc and then installing an app that will allow me to browse the pc and stream my content.
Hello everyone,
maybe someone already had the issue below and could help me out...
I've turned my two old SGS2's with broken screen into an IP Webcam.
Both are gt-9100
Both have android 4.1.2 and the latest version of IP Webcam.
First, I've chosen the MOV video format, and when I try to open it, then it plays fine (but it produces quite huge files).
Second, I've chosen the WebM video format,
and when I access the webcam via browser (192.168.10.19:8080),
then I can see the thumbnails of recordings, but when I try to open them - nothing happens.
Also when I try to download the file and open it via MediaPlayer Classic, it does not work - "unable to open file".
Also, when I try to open the file directly on the phone, it does not work.
The same issue happens when I chose the MP4 format...
The issue occurs on both SGS2 phones.
Note that I have K-Lite Mega Codec Pack installed, and MediaPlayer opens other mp4 files without problem.
Any ideas what could be wrong with the recording?
Any help would be very appreciated!
Hello,
Thx for reply.
However streaming is not the problem.
I can see the stream from both SGS2 phones.
They are set to record the video on event (movement).
The video is recorded as mp4 (or webm) and saved in the internal memory.
I can see the video thumbnails,
but I cannot play it neither in the browser, nor via any player that I know of.
What's werid is that when I choose a MOV format, then it works well....
Hello,
Welcome to XDA.
Please post your question in the forum linked below
http://forum.xda-developers.com/android/help
The experts there may be able to help.
Found the solution.
Seems like the trick was in the video settings.
Voice Bitrate 64kbit/s
Video bitrate 1500kbit/s <- here is catch #1, it does not work if anything else is set (in my case)
Video Format MP4
Resolution 800x480 <- here is catch #2, it does not work if anything else is set (in my case)
Quality 50
Limit FPS no limit
Now I am able to play mp4 files recorded by IP Webcam.