Python OpenCV stream to Android Studio

asked 2018-08-10 10:41:41 -0500

Venelyne gravatar image

Hi everyone,

Is there any way where I can stream a live video from python opencv (code from https://www.pyimagesearch.com/2017/09...) to android studio? If not, can I stream it live in web first and get it in android?

Thanks for your reply.

edit retag flag offensive close merge delete

Comments

android studio is an IDE, you can't "stream" anything to it.

berak gravatar imageberak ( 2018-08-11 02:04:05 -0500 )edit

also, opencv's android api has no facilities to read ip streams

(lacking backends like ffmpeg or gstreamer there)

berak gravatar imageberak ( 2018-08-11 02:06:22 -0500 )edit

Then can you give me an idea how to live stream the video in python opencv to the cloud? What exactly can I use to do it?

Venelyne gravatar imageVenelyne ( 2018-08-11 02:08:46 -0500 )edit

IF you built your cv2 with gstreamer support, you can use cv2.VideoWriter with gstreamer pipelines.

berak gravatar imageberak ( 2018-08-11 02:12:12 -0500 )edit

on the other hand, why insist on using opencv here at all ? programs like ffmpeg or gstreamer were actually made for this purpose, so why not use those ?

berak gravatar imageberak ( 2018-08-11 02:14:11 -0500 )edit

Honestly this is my first time hearing about ffmpeg and gstreamer, and I am not sure if they can "stream" the python video with frames (the box tracking the object)

Venelyne gravatar imageVenelyne ( 2018-08-11 02:19:54 -0500 )edit