Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QMediaContent video stream latency
Forum Updated to NodeBB v4.3 + New Features

QMediaContent video stream latency

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 964 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    balazs.kiss
    wrote on last edited by balazs.kiss
    #1

    Hello ,

    I'm working on a robot model project. The robot communicates with my PC via Wifi, and an IP cam provides the video stream for the end-user. However I'm facing now with an issue that the video stream on my PC has 2-3 seconds delay, which is quite annoying.

    My code snippet:

    video_ablak = new QVideoWidget(this);
    media_player = new QMediaPlayer(this, QMediaPlayer::LowLatency);
    ui->video_layout->addWidget(video_ablak);
    video_ablak->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    stream = QNetworkRequest(QUrl("rtsp://192.168.1.11:554/11 :network-caching=150"));
    //stream.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);
    //stream.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);

    ipcamera = new QMediaContent(stream);
    media_player->setVideoOutput(video_ablak);
    media_player->setMedia(*ipcamera);
    media_player->play();

    In VLC media player I could achieve ~150-200 ms latency by reducing the network-caching to 150ms.

    0_1556196653408_vlc_setting.JPG

    I tried the same in the link of the IP camera, but it has no effect. Neither the "setAttribute" parts in comment.

    How could I reduce the network caching in Qt or how could I achive lower latency in the video stream?
    (I wouldn't like to use the libVLC, because I have already a working mediaplayer in my software)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved