[kdemultimedia] [Bug 444197] New: ffmpegthumbs uses SAR not DAR for thumbnail aspect ratio

Tom B bugzilla_noreply at kde.org
Thu Oct 21 16:00:05 BST 2021


https://bugs.kde.org/show_bug.cgi?id=444197

            Bug ID: 444197
           Summary: ffmpegthumbs uses SAR not DAR for thumbnail aspect
                    ratio
           Product: kdemultimedia
           Version: 20.08
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: ffmpegthumbs
          Assignee: unassigned-bugs at kde.org
          Reporter: tom at r.je
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list