Results 1 to 15 of 15

Thread: Extract frames from a saved .mp4 video to play it on device's frame buffer without ui

  1. #1
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Post Extract frames from a saved .mp4 video to play it on device's frame buffer without ui

    hello,
    I am working in Qt 5.7. I want to play a saved video of a format .mp4 in the embedded device's frame buffer. As my frame buffer can except on RGB32 data. so convert my video into that format I need to use QVideoFrame and QAbstractVideoSurface class functionality that I come to know from Qt documents. But how to use it that I dont know. Can any one please help me? and I can't display video directly on ui. I have to send one bye one frame on fdev of my embedded device board (my board is of TI AM437x).
    I search a lot but not find the proper answer, even in this forum also such thread are unanswered. Please do reply

    thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    You want to display the video outside of your main UI?

    On a secondary framebuffer device with the main UI running on the primary framebuffer?

    Cheers,
    _

  3. #3
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    yes... I will cross compile a project for Am437x board. and want to play video on its frame buffer directly. I'll be having access of frame buffer only after stopping the matrix GUI process. So then I cant run any GUI. I can flush data on fdev only.
    Thank you for your interest to support me

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    I am still unsure I understand your setup.

    You are running a Qt program without GUI? I.e. a QCoreApplication based one?
    And you manually write into the framebuffer?

    Cheers,
    _

  5. #5
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    no I am using Qcore GUI app, I am not sure Qcoreapp supports media player in which way. This is my hardware side requirement that I have to play video on frame buffer. and frame buffer accepts raw data only... in my case RGB. So thats why i need to convert mp4 to RGB.I found the only way by extracting frame and convert it to rgb and send it... If any other you plz suggest it.
    Thank you
    Last edited by anjani.gandhi; 30th January 2017 at 07:51.

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    I am sorry I don't understand your setup.

    If you are running a Qt GUI application then it runs either with a display server which accesses the framebuffer or it uses the framebuffer directly, depending on which QPA you are using.

    In either case you can't use the framebuffer while it is in use.

    So you are either running a Qt GUI on your target framebuffer and can use the built-in video playback facilities, or you are not running a Qt GUI and you can simply run a video player or playback pipeline.

    Cheers,
    _

  7. #7
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    k let it be for frame buffer right now. Tell me how to get frame in form of RGB formate from a mp4 video. Now firstly I am programming for desktop kit. then I'll send frames to dev/fb0 and check it on kit.

  8. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    Now you are running the Qt program on a PC?

    What program do you run on the target then?

    Cheers,
    _

  9. #9
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    I can compile the same program for different targets. So to reduce complexity I thought at least first I should save a frame from video in RGB32 format in pc. Then I'll add some lines to handle and send frames on kit buffer.

  10. #10
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    Since your problem does not seem related to Qt at all, I would recommend to look into video processing frameworks, e.g. GStreamer.

    Cheers,
    _

  11. #11
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    I have to achieve this task with Qt only.But not suppose to use GUI functionality. (i.e cant use widget or something for display Video as I need to convert it to RGB).if you show me the way to save the video frames in form of RGB it would be very helpful.I am a new to this.

  12. #12
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    Qt's video facilities also use GStreamer on Linux.

    If you don't want Qt's video player to show the video, you could still use GStreamer's Qt bindings for example.

    Cheers,
    _

  13. The following user says thank you to anda_skoa for this useful post:

    anjani.gandhi (4th February 2017)

  14. #13
    Join Date
    Dec 2016
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    I'll try to use Gstreamer and will ask you when I'll stuck.Thank you
    Last edited by anjani.gandhi; 4th February 2017 at 14:09.

  15. #14
    Join Date
    Aug 2017
    Posts
    3
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    If you want to convert the videos to other formats easily or change the frame to a fluent one, this tool may help you: http://www.videoconverterfactory.com/tips/wv-converter.html
    It provides the function of enchancing video parameters like frame rate and also supports most common videos formats.

  16. #15
    Join Date
    Dec 2017
    Posts
    3
    Qt products
    PyQt3 PyQt4
    Platforms
    Windows Android

    Default Re: Extract frames from a saved .mp4 video to play it on device's frame buffer withou

    I use online video converters because I only convert short screen recording. If you need to convert huge files you have to download something, but I can't help you.

Similar Threads

  1. Replies: 1
    Last Post: 16th December 2016, 10:23
  2. Replies: 1
    Last Post: 5th December 2013, 06:46
  3. Replies: 0
    Last Post: 3rd May 2013, 09:01
  4. QtOpenGL - extract z-buffer information
    By sajis997 in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2012, 10:06
  5. Replies: 8
    Last Post: 17th May 2011, 14:03

Tags for this Thread

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.