Live streaming video in Qt

1.8k views Asked by At

I am making a "simple" software that can streaming video (without audio) from pc to pc. I am a newbie in Qt so I have some questions:

  • Does Qt 5.1 have any class to Encode and Decode video?
  • If not, can I use other libraries (such as gstreamer) to Codec the video? And how can I import them into a Qt based project.

I need all of your advice. Thank you very much.

1

There are 1 answers

0
Greenflow On

Decoding is no problem. You can use the QMediaPlayer class. Under Linux it actually uses the gstreamer libs. Encoding is not implemented. This is a bit beyond the scope of Qt5. And don't let the classes QMediaRecorder or QVideoEncoderSettings confuse you. They are mainly helper classes for QCamera or QRadioTuner, which provide an already encoded stream from their devices. If you need to encode single images into video frames and put them into a container, you need a 3rd party lib like ffmpeg.

Streaming a video from on pc to another is easily implemented with Qt5. Encoding or transcoding cannot be done with Qt5 alone.