How do i play a stream with QMediaPlayer

后端 未结 2 1642
孤城傲影
孤城傲影 2020-12-29 11:05

I have set up a server and video streaming so that I can connect to the stream with ffplay using the following command line:

ffplay rtmp:///path
         


        
2条回答
  •  暖寄归人
    2020-12-29 11:45

    I've just managed to play stream in QML VideoOutput with C++ QMediaPlayer using the setMedia(QUrl("http://127.0.0.1:8080"));
    The stream was created by VLC media player using the HTTP to the 8080 port. I've also succeeded in playing the stream created by VLC media player to local file by passing it to QMediaPlayer via setMedia(QMediaContent(), &localFile);.

提交回复
热议问题