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. How to embed Video files in my application?
Qt 6.11 is out! See what's new in the release blog

How to embed Video files in my application?

Scheduled Pinned Locked Moved General and Desktop
13 Posts 4 Posters 4.5k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #3

    Thanks SGaist.
    Actually it's not some gigabytes but rather something around 25 megabytes that I'm trying to embed here without any luck. So, I didn't mean that much big files. Do you have any idea how can I get past this error?
    By the way the reason I want to do this is just a matter of protecting some animation video that I don't want my customer to copy it.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #4

      Hi amahta,

      I don't thinks that's even possible. Why not modify the video file by adding some binary strings on it that way the video can't be opened by your customers and when you needed the video just remove those binary strings on the video file so you could play it.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #5

        Thanks minds, but I think I still have some hope :) cause I've seen executables like that but I'm not sure how they're embedding those. As for encrypting my video file, you're right that is also a solution.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #6

          [EDIT]
          Create a class library in VS and embed your video there then compile the dll. You can then use the dll into your project and read the video there. I haven't tried this though. But I believe the project would definitely compile.

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #7

            bq. By the way the reason I want to do this is just a matter of protecting some animation video that I don’t want my customer to copy it.

            I guess even if you embed the video as is in the rcc and compile it to an exe, the video can be extracted. There are tools available,
            E.g
            "resources_extract":http://www.nirsoft.net/utils/resources_extract.html

            So the best way would be to encrypt the video before putting it into the rcc.

            157

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #8

              [quote author="p3c0" date="1384249611"] I guess even if you embed the video as is in the rcc and compile it to an exe, the video can be extracted. There are tools available,
              E.g
              "resources_extract":http://www.nirsoft.net/utils/resources_extract.html

              So the best way would be to encrypt the video before putting it into the rcc.
              [/quote]
              Thanks but let's say my customer won't go that far looking for tools to extract it. :) And the problem here is that I can't embed it into my program. (You can read my first post)

              1 Reply Last reply
              0
              • p3c0P Offline
                p3c0P Offline
                p3c0
                Moderators
                wrote on last edited by
                #9

                Since the video file is too large the compiled cpp code will be also too large and hence the “Compiler Out Of Heap Space” errors. If you split your video file in parts and add those splitted parts in separate qrc files i guess it may work. But then you will need to find a way to merge those files again.

                157

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #10

                  [quote author="p3c0" date="1384252348"]Since the video file is too large the compiled cpp code will be also too large and hence the “Compiler Out Of Heap Space” errors. [/quote]

                  The "Compiler Out Of Heap Space" error will occur during compilation thus no compiled code is produced so your conclusion is wrong, it is not because the compiled cpp code is too large. Now that you mention it I think I have encountered this before on a compiler that I have developed and as far as I remember this is due to lack of memory of the pc running the program I might be wrong though it's been two years.
                  Anyways, amahta I've edited my post above and why don't you give it a try.

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #11

                    Not so sure about what "compiled cpp code is too large" means.
                    Lack of memory is also out of question.
                    I think it's just a matter of configuring compiler. I'll share the result if I find a solution.

                    1 Reply Last reply
                    0
                    • p3c0P Offline
                      p3c0P Offline
                      p3c0
                      Moderators
                      wrote on last edited by
                      #12

                      bq. The “Compiler Out Of Heap Space” error will occur during compilation thus no compiled code is produced so your conclusion is wrong, it is not because the compiled cpp code is too large.

                      @minds, i meant the resource file to cpp file which is converted by the rcc tool. As this converted cpp file will be too large to compile the virtual memory may be exhausted.

                      157

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #13

                        maybe the compiler has a memory limit that might be configurable.

                        @p3c0, just wanted to be clear

                        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