Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT video write from images (cv::Mat) problem
Forum Updated to NodeBB v4.3 + New Features

QT video write from images (cv::Mat) problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.0k 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.
  • R Offline
    R Offline
    RahibeMeryem
    wrote on last edited by
    #1

    Hi,

    I am using thread and signal slot mechanism in my opencv object detection framework.

    I decide to write frames as video (mp4 or mjpg) to a file.

    I opened :

    video = new VideoWriter;
    cv::VideoWriter video ("/data/outcpp.avi",CV_FOURCC('M','J','P','G'),25, Size(1280,720));
    ..
    ..
        video->write(frame);
    

    frame is coming from:

    connect(worker , &Worker::frameChanged , recorder , &Vrecorder::recording);
    

    it is creating file outcpp.avi and the size stuct at 4kb. It is not writing the video.

    Same code is working as pure c++ without QT signal slot mechanism.

    Any suggestion ?

    Or any experince to write video from signalling with opencv or ffmpeg ?

    Which one is preferable ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should show the complete code you are using. In what you posted, you seem to have some pointer to a VideoWriter, then a local cv::VideoWriter with the same name, then writing through the first object.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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