Skip to content

Instantly share code, notes, and snippets.

@gnanet
Last active October 30, 2017 15:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gnanet/11351147 to your computer and use it in GitHub Desktop.
Save gnanet/11351147 to your computer and use it in GitHub Desktop.
View and record ogg video(no audio) from an Android phone on linux over WIFI
PREFACE:
I was playing around with the IP Webcam app, and was looking for a fast and simple solution for getting the stream recorded while i can monitor what is being recorded, but a year ago i could not find a good solution. After the last update of the Android app, i thought i check again, and the best hint came from the suggested "Videochat driver" solution for linux: https://github.com/bluezio/ipwebcam-gst
and the linked blog of the author Dr. Antonio García-Domínguez: http://xmleye.wordpress.com/2011/07/08/reutilizar-un-movil-android-como-webcam-con-droidcamx-e-ip-webcam/
After a half day reading the docs and mailinglists the resulting commandline is below.
GOAL: Simultaneously monitor and record a video stream using the IP Webcam Android app and a Linux desktop
REQUIRED:
- Both Linux and Phone are in the same WIFI LAN and the bandwith can keep up
OR
- You need to have a looong USB cable and Android SDK
SOFTWARE (My setup is based on Ubuntu Linux 12.04):
- The IP Webcam Android app from Pavel Khlebovich: https://play.google.com/store/apps/details?id=com.pas.webcam
- sudo aptitude gstreamer0.10-tools gstreamer0.10-plugins-base gstreamer0.10-plugins-good
IMPORTANT: you have to to adjust the IPWEBCAM-ADDRESS and PORT to the data you see on your phone's display after starting the IP Webcam
gst-launch souphttpsrc location="http://IPWEBCAM-ADDRESS:PORT/video" is_live=true ! jpegdec ! ffmpegcolorspace ! tee name=tee tee. ! queue ! autovideosink tee. ! queue ! videorate ! video/x-raw-yuv, framerate=25/1 ! theoraenc ! oggmux ! filesink location=ipwebcam.ogg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment