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 5.4 Adding VideoFile to project

Qt 5.4 Adding VideoFile to project

Scheduled Pinned Locked Moved General and Desktop
qt 5.4.1video
8 Posts 2 Posters 3.6k Views 2 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.
  • MichalM Offline
    MichalM Offline
    Michal
    wrote on last edited by
    #1

    Hi, sorry for newbie question...how Can I add the video file to a project?? I tried to add it to .src file but doesnt not work (Size probably...). I need a path to /video.mp4 in a project folder, but not absoluteFilePath. Or what is the proper way to include a video file to a project. I'd like to send my app with the videofile to someone.
    Thanks for help.

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

      Hi,

      What size is that video file ?

      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
      • MichalM Offline
        MichalM Offline
        Michal
        wrote on last edited by Michal
        #3

        Well it is several Mb for training purpose, but it is gonna be 1080p, so probably minimum 100 Mb. I have no knowledge what max lenght they will be.

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

          Then generally, files that size are deployed along your application, not compiled in

          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
          • MichalM Offline
            MichalM Offline
            Michal
            wrote on last edited by SGaist
            #5

            I figured that out. The question is how to deploy video file so it would show up in a debug/release folder. I found something like this on the net, added to .pro file:

            copydata.commands = $(COPY_DIR) $$PWD/data $$OUT_PWD
            first.depends = $(first) copydata
            export(first.depends)
            export(copydata.commands)
            QMAKE_EXTRA_TARGETS += first copydata
            

            LINK and I am trying to make it work.

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

              What problem are you getting ?

              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
              • MichalM Offline
                MichalM Offline
                Michal
                wrote on last edited by Michal
                #7

                Sorry for the delay. The only problem is with the last line: QMAKE_EXTRA_TARGETS += first copydata
                error:** [copydata] Error 4.**

                Makefile.Debug:101: recipe for target 'copydata' failed
                mingw32-make[1]: *** [copydata] Error 4
                mingw32-make[1]: Leaving directory 'D:/Projects/build-Test2-Desktop_Qt_5_4_0_MinGW_32bit-Debug'
                mingw32-make: *** [debug] Error 2
                makefile:34: recipe for target 'debug' failed
                Im browsing the net for a solution. I have created in my project "*copydata*" directory.
                

                Thanks for your time SGaist.

                EDIT: I have probably found a solution to my problem: LINK
                I will try to make that work, read all documentation on qmake and learn it.

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

                  If it's path issue, shell_path can help your there

                  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