Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n different streamings #10

Closed
dragonxtek opened this issue Sep 29, 2017 · 6 comments
Closed

n different streamings #10

dragonxtek opened this issue Sep 29, 2017 · 6 comments

Comments

@dragonxtek
Copy link

Hi again,
Can you implement video_source as parameter of video_feed?
If you want to stream many videos, it's better only change the video_source from app.py
Thanks

@miguelgrinberg
Copy link
Owner

Streaming videos was not what I was thinking when I created this demo, but sure, it would be fairly easy to have the client pass the source as an argument to the streaming endpoint.

I just have to say, that if what you are after is streaming videos, there are much better ways to do that than sending the video as a sequence of jpeg images.

@dragonxtek
Copy link
Author

What other better ways are?
I guess send video as a sequence of jpeg images uses less bandwidth.
If I have a video with 30fps, camera.read() reads 30fps by default or less?
How can you define the fps on camera.read() ?

@miguelgrinberg
Copy link
Owner

Videos use more efficient compression algorithms than motion jpeg. Jpeg streaming is not efficient, it is mostly use for security cameras and similar type of low-end live video streaming.

The <video> tag in the browser can play mp4 video without any additional help, for example. Consider that if you stream as jpegs, the server will have to decode the original video and then re-encode as a sequence of jpegs. it's a lot of work, and you end up using more bandwith. If you have the videos already stored in your server, just serve them as files and let the browser deal with them directly.

@dragonxtek
Copy link
Author

Exactly, but I'm thinking in pre-process the on-real time video with opencv to detect some pattern

@miguelgrinberg
Copy link
Owner

@dragonxtek Okay, if you have to decode the frames in the server for the image detection part, then serving the result as motion jpeg might be okay.

@miguelgrinberg
Copy link
Owner

This issue will be automatically closed due to being inactive for more than six months. Please reopen if you need more assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants