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
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,
_
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
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,
_
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
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,
_
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.
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,
_
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.
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,
_
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.
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,
_
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
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.
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.