Bug 479167 - digiKam 8.3 does not take into account the "aspect ratio" property
Summary: digiKam 8.3 does not take into account the "aspect ratio" property
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Video (show other bugs)
Version: 8.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-29 17:06 UTC by Peter
Modified: 2023-12-30 15:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.3.0


Attachments
Aspect ratio in digiKam 8.2 (970.90 KB, image/png)
2023-12-29 17:06 UTC, Peter
Details
Aspect ratio in digiKam 8.3 (945.73 KB, image/png)
2023-12-29 17:07 UTC, Peter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2023-12-29 17:06:03 UTC
***
The video contains the aspect ratio attribute, which corresponds to a ratio of 16:9.
This is taken into account by digiKam 8.2, but not by 8.3.
Screenshots attached.



SOFTWARE/OS VERSIONS
Windows: Windows 10
Comment 1 Peter 2023-12-29 17:06:41 UTC
Created attachment 164544 [details]
Aspect ratio in digiKam 8.2
Comment 2 Peter 2023-12-29 17:07:13 UTC
Created attachment 164546 [details]
Aspect ratio in digiKam 8.3
Comment 3 Maik Qualmann 2023-12-29 20:19:52 UTC
Hmm, I can't reproduce any problems here with "real" 16:9 videos. Your video is 704x576 = 11:9 (1.2). This means that the square representation is actually correct. Why there is an aspect ratio of 1.77 in the metadata is a mystery to me at this point. We would have to scale your video by a factor of 1.4545 in width, but that is not logical given the video size.

Otherwise we would have to assume a height of around 396 pixels, the rest are black borders. Where is the video from? Is this from a 4:3 (DVD/DV) recorder that has recorded in 16:9 mode? Something is wrong here.

Maik
Comment 4 Peter 2023-12-29 21:06:54 UTC
(In reply to Maik Qualmann from comment #3)
> Hmm, I can't reproduce any problems here with "real" 16:9 videos. Your video
> is 704x576 = 11:9 (1.2). This means that the square representation is
> actually correct. Why there is an aspect ratio of 1.77 in the metadata is a
> mystery to me at this point. We would have to scale your video by a factor
> of 1.4545 in width, but that is not logical given the video size.
> 
> Otherwise we would have to assume a height of around 396 pixels, the rest
> are black borders. Where is the video from? Is this from a 4:3 (DVD/DV)
> recorder that has recorded in 16:9 mode? Something is wrong here.
> 
> Maik

I converted this video(s) from 4:3 to 16:9 using ffmpeg.
ffmpeg has a switch that adjusts the display aspect ratio.

Video it was converted with this command:
ffmpeg -i [input file] -aspect 16/9 -c:v h264_nvenc -preset slow [output file]
Comment 5 Peter 2023-12-29 21:09:13 UTC
(In reply to Peter from comment #4)
> (In reply to Maik Qualmann from comment #3)
> > Hmm, I can't reproduce any problems here with "real" 16:9 videos. Your video
> > is 704x576 = 11:9 (1.2). This means that the square representation is
> > actually correct. Why there is an aspect ratio of 1.77 in the metadata is a
> > mystery to me at this point. We would have to scale your video by a factor
> > of 1.4545 in width, but that is not logical given the video size.
> > 
> > Otherwise we would have to assume a height of around 396 pixels, the rest
> > are black borders. Where is the video from? Is this from a 4:3 (DVD/DV)
> > recorder that has recorded in 16:9 mode? Something is wrong here.
> > 
> > Maik
> 
> I converted this video(s) from 4:3 to 16:9 using ffmpeg.
> ffmpeg has a switch that adjusts the display aspect ratio.
> 
> Video it was converted with this command:
> ffmpeg -i [input file] -aspect 16/9 -c:v h264_nvenc -preset slow [output
> file]

ffmpeg -i [input file] -aspect 16:9 -c:v h264_nvenc -preset slow [output file]
Comment 6 Peter 2023-12-29 21:27:30 UTC
Actually I don't know if this is a fault.
digiKam 8.2 and smplayer have so far displayed (aspect ratio 16:9) the videos correctly even though the size is 704x576
I may have to use "ffmpeg -s 1024x576 -aspect 16:9" switch for real 16:9 videos going forward.
Comment 7 Maik Qualmann 2023-12-29 21:39:59 UTC
Well, this is a 4:3 video with one frame in 16:9 letterbox format. A video I created here has the same parameters, but plays correctly. I'm a little more recent with Qt, Gilles is currently compiling to the current Qt version. I won't be able to test it on Windows until tomorrow.

Maik
Comment 8 caulier.gilles 2023-12-29 21:43:46 UTC
Yes and compilation have been restarted one time as now the full build capacity is up to 250Gb. I extended the VM disk to 350Gb...

Gilles
Comment 9 Peter 2023-12-30 07:11:45 UTC
(In reply to Maik Qualmann from comment #7)
> Well, this is a 4:3 video with one frame in 16:9 letterbox format. A video I
> created here has the same parameters, but plays correctly. I'm a little more
> recent with Qt, Gilles is currently compiling to the current Qt version. I
> won't be able to test it on Windows until tomorrow.
> 
> Maik

I tested in Linux Mint 21.2 and digiKam-8.3.0-20231228T113507-x86-64.appimage
Here the video is displayed correctly.
Comment 10 Maik Qualmann 2023-12-30 07:23:59 UTC
The AppImage is also not yet based on Qt6 and does not use the new QMultimediaPlayer.

Maik
Comment 11 Maik Qualmann 2023-12-30 15:06:07 UTC
This problem is resolved with the current Windows build based on Qt-6.6.1.

https://files.kde.org/digikam/

Maik