Skip to content

Add information on video codecs and conversion of video files#24

Merged
mschwan-phytec merged 3 commits intomainfrom
WIP/t.hahn@phytec.de/video-formats
Mar 25, 2026
Merged

Add information on video codecs and conversion of video files#24
mschwan-phytec merged 3 commits intomainfrom
WIP/t.hahn@phytec.de/video-formats

Conversation

@TobiasHahn-phytec
Copy link
Copy Markdown
Contributor

Add a page that can be opened in both multimedia pages by pressing the information icon in the toolbar, which displays available video and audio codecs for encoding and decoding and whether they are hardware accelerated or not.
A codec is regarded as hardware accelerated if it can be found in the caps (source caps for encode; sink caps for decode) of a gstreamer element factory, which meets any of the following conditions:

  • its rank is greater than 256 / GST_RANK_PRIMARY
  • its name starts with vpu (e.g. vpudec / vpuenc_h264)
  • it's of the type GST_ELEMENT_FACTORY_TYPE_HARDWARE
  • its klass metadata contains GST_ELEMENT_FACTORY_KLASS_HARDWARE

In the file dialog there is a new column that lists the video codecs that are used in video files. If the discovery of codecs fails with an error unknown is displayed instead. If the discovery fails because there are plugins missing (e.g. if a codec in the video can't be decoded) or if the qmlsink is used and there is not at least 1 video and 1 audio stream unsupported is displayed. If discovery fails for a different reason failed is displayed instead. If any of the 3 messages is displayed, the video is additionally disabled in the file dialog. GstDiscoverer is used for discovery.

Using the convert button in the file dialog allows the conversion of video files to different formats, codecs and resolutions. The options for file extensions and codecs are selected based on the selected container format. When selecting codecs using the combo box, hardware codecs are displayed normally while software codecs are displayed in italic. Selectable resolutions are "keep the current resolution" (empty combo box), 960x540, 1280x720, 1600x900 and 1920x1080.

Correct the file icon to display the correct icon in the file dialog
instead of the .notdef glyph.

Signed-off-by: Tobias Hahn <t.hahn@phytec.de>
@TobiasHahn-phytec TobiasHahn-phytec force-pushed the WIP/t.hahn@phytec.de/video-formats branch from 3cdedbb to 86b6bfa Compare March 9, 2026 12:12
Add a page that can be opened in both multimedia pages to display
available video codecs for encoding and decoding and whether they are
hardware accelerated or not.
In the file dialog there is a new column that lists the video codecs
that are used in video files.
Using the convert button in the file dialog allows the conversion of
video files to different formats, codecs and resolutions. Video files
using software codecs can be converted to hardware accelerated videos
to allow faster playback for example.

Signed-off-by: Tobias Hahn <t.hahn@phytec.de>
Install gstreamer dependency to allow the building with the information
on video codecs and conversion of video files.
@TobiasHahn-phytec TobiasHahn-phytec force-pushed the WIP/t.hahn@phytec.de/video-formats branch from 86b6bfa to 653e90c Compare March 9, 2026 12:22
@TobiasHahn-phytec TobiasHahn-phytec marked this pull request as ready for review March 9, 2026 14:07
@mschwan-phytec mschwan-phytec merged commit fd81693 into main Mar 25, 2026
1 check passed
@mschwan-phytec mschwan-phytec deleted the WIP/t.hahn@phytec.de/video-formats branch March 25, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants