A
A
Andrey Turyansky2013-11-22 13:30:33
Python
Andrey Turyansky, 2013-11-22 13:30:33

How to output streaming video in the application?

Good afternoon.
I'm building a wifi robot with a camera. In principle, everything is outrageously standard based on tp-link wr703n + OpenWrt, however, I want to make a client application through which all this stuff will be managed.
At the moment, I have already rolled out a client with buttons on wxPython, which drives the server part on the robot itself, now I want to attach something like a player there - a window into which the mjpeg-stream video stream will be broadcast.
All such "wifi machines" usually steer through the web interface and there are control buttons there. I do not like it. Moreover, I plan to manage as a result from the phone / PDA not with on-screen buttons, but with physical ones, and I want to leave the screen for video.
You can, of course, run the client separately and the browser separately, but not all browsers display the stream well, and there are a lot of unnecessary gestures.
I found this article and got into it a little. An example from there takes a stream and puts it in jpegs, but how can I turn all these alternating pictures into a video and display it on the screen?
Unfortunately, my programming skills are frozen at the level of college VB6 with forms, controls and mouse programming.
I want to do something cross-platform (linux \ windows \ maybe android), I settled on python - it seems like a pretty simple language.
In fact, if all the water is discarded, how can this be done? It is desirable if it is possible to exclude a bunch of bulky libraries and frameworks that are inaccessible for smartphones and other mobile devices (I want to try using the nokia n810 as a remote control, it’s still lying around)
Or, as an option, embed a vlc player in the application?
So far I've been googling but can't find anything relevant. Probably because I don't know what to look for.
Perhaps someone from the reader did something similar \ knows how to do it \ can throw an example. I will be very grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dieselpoweredthings, 2013-11-25
@warezzzok

In the simplest case, you can do this:

from time import sleep
while True:
  image = server.get_frame()
  application.image_container.draw(image)
  sleep(100) # 1000 / 100 = 10 fps

Where application.image_container is a component for displaying images.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question