I found a few questions on Stackoverflow like this but no answer yet. I'm trying to stream camera input from an Android device to a HTML5 video tag for some real-time image processing. The Camera plugin for Phonegap does not support this so I tried using getUserMedia. This almost worked except that Chrome does not support the file:// protocol for getUserMedia, where the video stream is stored(I believe). It works when I run it from a server but I want to be able to use this app locally, without an Internet connection. Does anybody have any ideas? Thanks!
Related
I'm making a Cordova app for Android and iOS which needs to embed and record streaming video from an IP camera. I'm testing with a D-Link DCS-4701E.
An <img> tag can show the mjpg source, but a <video> tag cannot. Nor will it when set to H.264 mode.
I've found several solutions which will open the stream in the native player, but I need it embedded.
These IP cameras also need to be secured and I don't know how to authenticate. Putting it in the src attribute like http://{username}:{password}#{ip}/{whatever} doesn't work on Android or Chrome, though it does in Firefox. That doesn't seem like good security anyway.
I've looked at some other web cam streams and on Android they either give me a direct link to an rtsp:// to open in the native player, or the don't work at all.
So to sum up I have three problems:
I need to authenticate a connection to an IP camera stream.
I need to display that video.
I need to record that video.
A good solution would make it work in a <video> tag because then I can use video.js and plugins to record.
Thanks
I want to send live video stream from my android device to wowza streaming engine. I am using sample in this blog but I can not see the result on Test Players page.
Do I need to have a web server serving a page with a video player pointed to this video/app on wowza?
I found this little (but very useful) library with three examples: libstreaming
It works like a charm! Easy to install and develop.
Main point is to look at Wowza logs to understand if stream was successfully published or not.
Then, according to logs you will know what Application, Application instance and Stream name are used for publishing.
So you'll be able to set up any player (VLC for example) with those values and look if stream is viewable or not.
Accepted answer is ok. Libstreaming is working (kinda) but it did not fulfill my expectations so that it can be pushed to some production app. Since this question is quite old, i will share mine up-to-date solution (AS 2.1.2 - Marshmallow) which is using JavaCV. I've built boilerplate for android so it can be used in no time.
Here is url:
How to stream live video from android to Wowza via RTMP
I am trying to create an Android App to stream live/archived videos from my church's website.
However, I ran into a problem because all of the streams are giving .flv (flash) videos and or flash players...
I have succesfully been able to load .3gp videos in a VideoView but because Android doesn't support flash natively I tried to open the videos via the WebView.
This didn't work. At least, not for the links that I am working with. However, I can open youtube.com and click on any video to play it - but I can't play any of the streams from the church website.
My question:
Is there any way for me to make this work?
I have access to
1) rtsp stream of .f4v
2) http stream of .m3u8
3) rtmp stream of .fv4
I have spent 2 days searching the web for ideas or fixes and everything I find doesn't seem
to work with my particular case.
It seems to me that the only option is to have the church stream direct .3gp/mp4 files that I can access.
Otherwise, I have no clue how to make .f4v files work. No luck with the WebViews yet..
Do any of you have any suggestions for me?
P.S. I will also have to create an iOS app so looking for a solution that will work on
both platforms.
Thanks for your time!
To answer my own question:
It seems that the android emulator cannot play flash/m3u8 files.
However, my nexus 7 does just fine with both VideoView and WebView!
Cool library I found is Vitamio that is supposed to solve the problem I had.
I didn't use it however.
Updated
I may have found the solution, I can probably make a mobile app with phonegap that talks to my rails app and make a lighter version of a mobile version of the rails app
I may be getting an educational rails application to work on soon. The client is an educational consultant, she wants to build a rails application and one of the feature is that a teacher can record a feedback that belongs to a particular student for an assignment. The app needs to be able to record an audio and play an audio.
I have been researching this feature both on stackoverflow and google but I don't find the answers very complete.
I got a couple of options,
1) I have found this blog, a developer built an audio recorder/player with flash http://cykod.com/blog/archive/December2010
and basically its teaching me to grab the audio from a browser with a microphone with flash (needs user permission) and then send it to the server therefore you can escape using red5 (media server).
She wants it to be mobile friendly. I don't think the recording works on the android phone because of flash and I am sure the android phone lacks a microphone. I don't know much about ios either because I don't specialize in mobile. I got my android phone to download flash so it can play the sound.
2) using red5server but I think the player/recorder will still be flash and it doesn't work on the phone
3) http://www.sajithmr.me/jrecorder-jquery and jrecorder
I got some solutions for rails but is there a mobile friendly solution ?
I am sure the android phone lacks a microphone
A phone without a microphone would be pretty useless! :)
With Android you can use MediaRecorder to record and save an audio file. I'm sure it works, I've done it before.
Although I have never tried, I think you can do it in PhoneGap with the Capture options and on iOS with the Audio Video Foundation framework.
That's for the mobile part. You don't need flash there, there are much better options.
On your web application, you can surely use Flash to record audio from the computer's microphone.
However, if you're lucky enough your users will use recent browser that support HTML5 audio recording and playback. Check out capturing audio tutorial and libraries such as audio.js.
HTH
Is it possible to play a remote video which is in server using html5 in android.
I have tried playing the local video and it works fine.
Android tag support is very flanky in currently deployed phones. You can search about various problems of it here at stackoverflow.com.
I'd suggest using link to a video file on the remote server which is then opened in a standalone media player. This guarantees that the video will work on all the devices.
works fine in 2.3+ (tested personally on 2.3, 3.0, 3.1 and 3.2)
try absolute paths instead of relative paths, the type attribute should only read "video/mp4" or "video/webm" - nothing more!
check http://caniuse.com/webm and http://caniuse.com/mpeg4 for supported codecs. Ogg-Video is not supported so far.