GithubHelp home page GithubHelp logo

Comments (6)

miguelgrinberg avatar miguelgrinberg commented on June 25, 2024

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.

from flask-video-streaming.

dragonxtek avatar dragonxtek commented on June 25, 2024

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() ?

from flask-video-streaming.

miguelgrinberg avatar miguelgrinberg commented on June 25, 2024

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.

from flask-video-streaming.

dragonxtek avatar dragonxtek commented on June 25, 2024

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

from flask-video-streaming.

miguelgrinberg avatar miguelgrinberg commented on June 25, 2024

@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.

from flask-video-streaming.

miguelgrinberg avatar miguelgrinberg commented on June 25, 2024

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

from flask-video-streaming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.