Results 1 to 2 of 2

Thread: Adding videos to .qrc file

  1. #1
    Join Date
    Aug 2010
    Posts
    5
    Thanked 3 Times in 1 Post
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Adding videos to .qrc file

    Hi - I'm working on a Qt application for symbian, Qt 4.6.3 and Qt mobility 1.0.2.

    My application will play a video using QMediaPlayer and QVideoWidget classes. I'd like the video file to be embedded in the application, not to be stored somewhere else in the phone memory or on a remote server. The video file isabout 10Mb mp4 file. So I'm trying to add the video to a .qrc file, but as soon as I add it to the .qrc file, I'm getting build errors like:

    - out of memory allocating 65536 bytes
    or, if I add a smaller .mp4 file
    - error: section .data [00400000 -> 00400003] overlaps section .rodata [00012180 -> 007bd5c3]

    I'm assuming I'm getting the errors due to the size of my mp4 file ... Is there a limitation for the size of the files? Also, I couldn't find information about what other video formats are supported by QMediaPlayer to play videos.

    Thanks!

  2. #2
    Join Date
    Nov 2010
    Posts
    16
    Thanked 1 Time in 1 Post

    Default Re: Adding videos to .qrc file

    The 'resource compile' converts your file into a 'C' array in a source file. If the array is gigantic, your compile and/or target CPU may have issues. You don't say what platform (CE, Symbian, Linux) or CPU (Arm, MIPS, PowerPC, x86, x86_64, ...). Also, you didn't say which command failed. Was it the 'rcc', your compiler or linker?

    Typically the 'resource' was meant for picutures on bitmaps, stylesheets, etc.; a movie is a bit of an abuse. I have just created a 1MB resource file on Embedded QT Linux, so at least that is possible. You might try to re-code your video. What is your screen depth and length of the video? If you just grab the video from somewhere, it might be encoded at a resolution greater than your display, so that is just a waste.

    Also, the resources will end up as part of a code section versus a file which the OS will load on demand. If you don't have swap, it is much better to keep the video as a file.

Similar Threads

  1. Adding user variables to .ui file
    By seweazel in forum Qwt
    Replies: 5
    Last Post: 10th September 2010, 08:27
  2. Qt::WA_TranslucentBackground and videos headache.
    By Smokex in forum Qt Programming
    Replies: 0
    Last Post: 17th March 2010, 18:40
  3. Qt Creator Adding a Help File (for the Property Browser)
    By BobTheProg in forum Qt Tools
    Replies: 5
    Last Post: 29th January 2010, 23:44
  4. Adding QPushButton to *.ui file by hand
    By s410i in forum Qt Programming
    Replies: 3
    Last Post: 23rd June 2009, 13:08
  5. Adding a new file to moc process in XCode
    By redneon in forum Qt Programming
    Replies: 0
    Last Post: 2nd May 2009, 18:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.