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 & FFMPEG encrypt & decrypt Video offline
QtWS25 Last Chance

QT & FFMPEG encrypt & decrypt Video offline

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 1.5k Views
  • 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.
  • Dara AlaviD Offline
    Dara AlaviD Offline
    Dara Alavi
    wrote on last edited by
    #1

    I want encrypt & decrypt Video file With FFMPEG oflfine mode in hard disk.
    I encrypt a Video File (mp4 Extention) by ffmpeg.exe Tools by this Command:

    ffmpeg -i SampleVideo_1280x720_1mb.mp4 -vcodec copy -acodec copy
    -encryption_scheme cenc-aes-ctr -encryption_key
    76a6c65c5ea762046bd749a2e632ccbb -encryption_kid
    a7e61c373e219033c21091fa607bf3b8 SampleVideo_1280x720_1mb_encrypted.mp4
    

    for decryption : i want decrypt and play video file (encrypted.mp4) in my player source c++ (ffmpeg base) and now i dont wnat use decrypt file with command line with ffplay.exe *like this :

    ffplay SampleVideo_1280x720_1mb_encrypted.mp4 -decryption_key
    76a6c65c5ea762046bd749a2e632ccbb
    

    I do not need ffplay.exe because i downloaded FFMPEG dev and i have written my own player program Which is based on FFMPEG! with QT & C++.
    I dont want use ffplay.exe that exist static FFMPEG Folder. .
    I want decrypt and play Encrypted File in my player program Through Programing code.

    Now how to decrypt encrypted files using FFMPeg API with C++ Programing?

    I searched a lot but did not find anything.
    There is no explanation on how to use it. Frown | :(
    I did not find a sample.. Frown | :(

    thanks in advance.

    An architect and software engineer , reverse with professional experience.

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

      Hi
      Could you not look at ffplay source code and see how it does ?

      Dara AlaviD 1 Reply Last reply
      4
      • B Offline
        B Offline
        Bonnie
        wrote on last edited by
        #3

        Since the encryption and decryption are purely by FFMPEG API and have nothing to do with Qt, I think it should be more efficient to ask that in some FFMPEG-related forums.

        1 Reply Last reply
        3
        • mrjjM mrjj

          Hi
          Could you not look at ffplay source code and see how it does ?

          Dara AlaviD Offline
          Dara AlaviD Offline
          Dara Alavi
          wrote on last edited by Dara Alavi
          #4

          @mrjj said in QT & FFMPEG encrypt & decrypt Video offline:

          Hi
          Could you not look at ffplay source code and see how it does ?

          Hi mate.
          I saw it, but I could not understand how it did it.
          Call different functions and library .

          @Bonnie said in QT & FFMPEG encrypt & decrypt Video offline:

          Since the encryption and decryption are purely by FFMPEG API and have nothing to do with Qt, I think it should be more efficient to ask that in some FFMPEG-related forums.

          so can you tell use Why Qt support FFMPEG For Media Engine ? like this
          [link text]https://doc.qt.io/archives/qtextended4.4/ffmpeg.html(link url)
          Such a situation can happen to any library that works with Qt!
          Both are open source, both based on C ++
          There is no barrier when a project can be created with these conditions.
          And if you understand the essence of the question, you can write the relevant program in the GUI interface.

          Good luck..

          An architect and software engineer , reverse with professional experience.

          B 1 Reply Last reply
          0
          • Dara AlaviD Dara Alavi

            @mrjj said in QT & FFMPEG encrypt & decrypt Video offline:

            Hi
            Could you not look at ffplay source code and see how it does ?

            Hi mate.
            I saw it, but I could not understand how it did it.
            Call different functions and library .

            @Bonnie said in QT & FFMPEG encrypt & decrypt Video offline:

            Since the encryption and decryption are purely by FFMPEG API and have nothing to do with Qt, I think it should be more efficient to ask that in some FFMPEG-related forums.

            so can you tell use Why Qt support FFMPEG For Media Engine ? like this
            [link text]https://doc.qt.io/archives/qtextended4.4/ffmpeg.html(link url)
            Such a situation can happen to any library that works with Qt!
            Both are open source, both based on C ++
            There is no barrier when a project can be created with these conditions.
            And if you understand the essence of the question, you can write the relevant program in the GUI interface.

            Good luck..

            B Offline
            B Offline
            Bonnie
            wrote on last edited by
            #5

            @Dara-Alavi
            It's a very old archived documentation. There's no Qt Extended anymore.
            Anyway, if you insist, good luck with that then :)

            Dara AlaviD 1 Reply Last reply
            0
            • B Bonnie

              @Dara-Alavi
              It's a very old archived documentation. There's no Qt Extended anymore.
              Anyway, if you insist, good luck with that then :)

              Dara AlaviD Offline
              Dara AlaviD Offline
              Dara Alavi
              wrote on last edited by
              #6

              @Bonnie said in QT & FFMPEG encrypt & decrypt Video offline:

              It's a very old archived documentation. There's no Qt Extended anymore.
              Anyway, if you insist, good luck with that then :)

              It may be an old document, but it still works! FFMPEG & QT they does not get old, I insist on solving my problems, not running away from them. Good luck you too.

              An architect and software engineer , reverse with professional experience.

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

                Hi,

                As shown in that example, you usually wrap the C API to integrate it with your C++ code.

                Like the engine you saw in that old example, you have to implement a class that will encapsulate the calls to the ffmpeg API.

                Follow the logic of the ffmpeg application and implement the various steps in your class.

                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
                1

                • Login

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