imagezmq icon indicating copy to clipboard operation
imagezmq copied to clipboard

is it possible to directly send video clips?

Open MeixinZhu opened this issue 3 years ago • 6 comments

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.

MeixinZhu avatar Jun 03 '21 16:06 MeixinZhu

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.

jeffbass avatar Jun 04 '21 21:06 jeffbass

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

MeixinZhu avatar Jun 07 '21 07:06 MeixinZhu

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

timsu92 avatar Jun 09 '21 15:06 timsu92

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.

timsu92 avatar Jun 10 '21 00:06 timsu92

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.

jeffbass avatar Jun 10 '21 06:06 jeffbass

Thank you!! This is really helpful.

MeixinZhu avatar Jun 18 '21 06:06 MeixinZhu