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. create an encrypted video file from a webcam
Qt 6.11 is out! See what's new in the release blog

create an encrypted video file from a webcam

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

    Hi All,

    I would like to create a program that can capture video from a webcam. This captured video should then be packed into a compressed format like mpeg2 or mpeg4, and finally encrypted with aes256. I'm planning to also write an application that works in reverse, it takes the encrypted file, decrypts it, then plays the video.

    I have an USB webcam, and I have run the camera example. This works, I can see the video feed just fine. I found however, I can't capture the video stream. In the source I see m_camera->isCaptureModeSupported(QCamera::CaptureVideo)) returns false. Forcing it true does not enable me to record video.

    I have the following questions:

    1. Can QMediaRecorder capture the video feed from the viewfinder, or does it really need QCamera::CaptureVideo?
    2. How can I redirect the output of QMediaRecorder to be something else than a file, so I can encrypt it before it get written to disk? can QAbstractVideoBuffer be used to hold the video data while encrypting it?
    3. Am I headed in the right direction? Are there more elegant ways of doing this?

    My versions:
    Windows 7 Enterprise, Service Pack 1, 64 bit
    Core i7-3770 3.4GHz 8GB ram

    Qt Creator 4.5.2
    Based on Qt 5.10.1 (MSVC 2015, 32 bit)
    From revision 8673aae986
    Built on Mar 11 2018 04:21:24

    My webcam:
    Vimicro USB2.0 PC camera(Venus) (VID_0AC8&PID_3420)

    Cheers,
    Cedric

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cdwijs
      wrote on last edited by
      #2

      Hi All,

      I see ffmpeg can create an encrypted video file:
      http://hlsbook.net/how-to-encrypt-hls-video-with-ffmpeg/

      I'll test if I can integrate it into Qt and report back.
      Cheers,
      Cedric

      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