Bug 444197 - ffmpegthumbs uses SAR not DAR for thumbnail aspect ratio
Summary: ffmpegthumbs uses SAR not DAR for thumbnail aspect ratio
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdemultimedia
Classification: Unmaintained
Component: ffmpegthumbs (show other bugs)
Version: 20.08
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-21 15:00 UTC by Tom B
Modified: 2024-09-22 19:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom B 2021-10-21 15:00:05 UTC
SUMMARY

Some videos set the DAR in the container, not in the video stream (for example, for encoders such as SVT-AV1 which don't currently support setting the DAR in the stream), for such videos the DAR is set in the container.

Here's the output for ffmpeg -i file.mkv -show_streams for a sample video with this problem:

[STREAM]
index=0
codec_name=av1
codec_long_name=Alliance for Open Media AV1
profile=Main
codec_type=video
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=720
height=576
coded_width=720
coded_height=576
closed_captions=0
has_b_frames=0
sample_aspect_ratio=64:45
display_aspect_ratio=16:9
pix_fmt=yuv420p10le
level=5
color_range=tv
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
refs=1
id=N/A
r_frame_rate=50/1
avg_frame_rate=50/1
time_base=1/1000
start_pts=21
start_time=0.021000
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:DURATION=00:50:41.541000000
[/STREAM]

There are two aspect ratios:

sample_aspect_ratio=64:45
display_aspect_ratio=16:9


ffmpegthumbs seems to use SAR not DAR


STEPS TO REPRODUCE

1. Find a video file and the aspect ratio in the container:

ffmpeg -i "out.mkv" -c:a copy -c:v copy -aspect 21:9 "out.mkv"

2. Have ffmpegthumbs generate the thumbnail, it will be at the original aspect ratio, not 21:9.


While overriding the aspect ratio like this is not ideal, any modern video player will present the correct aspect ratio when playing the video, ffmpegthumbs should do the same when taking the thumbnail.
Comment 1 Christoph Cullmann 2024-09-22 19:04:29 UTC
kdemultimedia is no longer maintained.

If you have issues like you reported with current versions of our applications, please report the issue at the bugtracker of the application.