PDA

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



anjani.gandhi
25th January 2017, 12:41
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

anda_skoa
26th January 2017, 12:23
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,
_

anjani.gandhi
27th January 2017, 12:37
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

anda_skoa
28th January 2017, 08:12
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,
_

anjani.gandhi
30th January 2017, 07:13
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

anda_skoa
30th January 2017, 09:50
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,
_

anjani.gandhi
30th January 2017, 10:12
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.

anda_skoa
1st February 2017, 09:07
Now you are running the Qt program on a PC?

What program do you run on the target then?

Cheers,
_

anjani.gandhi
1st February 2017, 10:56
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.

anda_skoa
2nd February 2017, 09:40
Since your problem does not seem related to Qt at all, I would recommend to look into video processing frameworks, e.g. GStreamer.

Cheers,
_

anjani.gandhi
3rd February 2017, 12:13
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.

anda_skoa
4th February 2017, 10:09
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,
_

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

Leaserbe
25th November 2017, 07:22
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 (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.

snowflow
30th April 2020, 10:55
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.