Results 1 to 2 of 2

Thread: Video file loading an external resource to QRC structure using QT 5.4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2015
    Posts
    1
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Video file loading an external resource to QRC structure using QT 5.4

    Hello all,

    We are using QT 5.4, and trying to load an video file.
    Below is the qml code which is put under QRC
    Qt Code:
    1. Rectangle {
    2. width: 480
    3. height: 270
    4. color:"white"
    5.  
    6. MediaPlayer {
    7. id: player
    8. // source: "file:video.avi"
    9. source: "file:///P2952/Sprint21/Animation_Demos/video.avi"
    10. autoPlay: true
    11. autoLoad: true
    12. }
    13.  
    14. VideoOutput {
    15. source: player
    16. anchors.fill: parent
    17.  
    18. }
    19.  
    20. Component.onCompleted: {
    21. player.play();
    22. }
    23.  
    24. }
    To copy to clipboard, switch view to plain text mode 

    If we put video file inside QRC resource, Memory allocation errors are coming.

    Can anyone help how to access external video files ( placed out of QRC files) and display using qt.

    Thanks in advance
    Last edited by anda_skoa; 5th February 2015 at 08:51. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Video file loading an external resource to QRC structure using QT 5.4

    What memory allocation errors? How large is the video? What's wrong with using your current code?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. qwebview loading html from resource
    By sawarsi in forum Qt Programming
    Replies: 1
    Last Post: 31st January 2013, 18:15
  2. Loading Qt resource file on to Shared Memory Windows CE 5.0
    By thanuj in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 23rd December 2010, 12:34
  3. QFontDatabase loading font from resource
    By myrky in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2010, 12:50
  4. QML file not loading external JS file?
    By anothertest in forum Qt Programming
    Replies: 2
    Last Post: 14th April 2010, 09:11
  5. External Javascript file not loading initially
    By bkudrle in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2009, 17:05

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
  •  
Qt is a trademark of The Qt Company.