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

is it possible to directly send video clips? #60

Open
MeixinZhu opened this issue Jun 3, 2021 · 6 comments
Open

is it possible to directly send video clips? #60

MeixinZhu opened this issue Jun 3, 2021 · 6 comments

Comments

@MeixinZhu
Copy link

Thanks for this great repo! It works very nicely for sending images.
I wonder whether it is possible to directly send video clips to remote servers? instead of sending frames to the server then combine them into a video.

@jeffbass
Copy link
Owner

jeffbass commented Jun 4, 2021

No, imageZMQ is not suitable for sending video clips that are NOT implemented by sending individual image frames. With imageZMQ each image frame is a distinct ZMQ message. True "video streaming" with multiframe compression (like that used in most video streaming codecs) won't work with imageZMQ.

@MeixinZhu
Copy link
Author

Hi Jeff, thanks for your reply. I got it. Do you know any other approaches for video streaming? Thanks!

@timsu92
Copy link

timsu92 commented Jun 9, 2021

You can use OpenCV to read a video into frames, and also use OpenCV to save them to a clip.

@timsu92
Copy link

timsu92 commented Jun 10, 2021

However, I don't think sending clips using this is ideal, because you need to decode and encode, which causes quality loss.
Instead, it would be better to transmit the original bytes using 0mq, the upstream of this good work.

@jeffbass
Copy link
Owner

Hi @MeixinZhu,
As @timsu92 mentioned, you may want to build your own video streaming protocol using ZeroMQ. If not, there are many video streaming protocols and applications to choose from. Which one to choose is really dependent on what you are trying to do. You might want to look at tutorials for ffmpeg or gstreamer. If you want to stream a webcam to a browser, you may want to start with one of these Webcam to Browser video streaming tutorials using Flask: PyImageSearch or Miguel Grinberg.

@MeixinZhu
Copy link
Author

Thank you!! This is really helpful.

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

No branches or pull requests

3 participants