mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Anamorphic video converted without re-encoding has wrong aspect ratio #1203
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#1203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ken-g6 on GitHub (Jan 13, 2020).
When playing back an anamorphic video with "video playback that requires conversion without re-encoding" (see #1161), the video is not displayed with the correct aspect ratio on a Fire TV Stick 4K. I had to set my TV to stretch horizontally to display the video correctly. This has happened with several videos, but here's a good example:
Server System (please complete the following information):
Linux SerialPeacemaker 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxClient System (please complete the following information):
Media Info of the file
Logs
@Artiume commented on GitHub (Jan 13, 2020):
Can you post your ffmpeg remux logs. We suspect that some Anamorphic videos that have janky DAR/SAR values with the container holding the true values, but ffmpeg is not carrying over those values.
@Artiume commented on GitHub (Feb 7, 2020):
Anamorphic sources for LiveTV. SAR is Storage Aspect Ratio, FFmpeg should be using the Display Aspect Ratio.
@rexbron commented on GitHub (Apr 17, 2020):
@Ken-g6 Your files are tagged incorrectly. If the content is 1.3x anamorphic, the Display Aspect Ratio should be tagged as 16:9.
@Ken-g6 commented on GitHub (Apr 17, 2020):
The example log I posted is for a 4:3 video. I still have to stretch the video on my TV to get it to display in the correct aspect ratio. (Though I haven't tried it lately.)
@rexbron commented on GitHub (Apr 17, 2020):
It's only stored as at 4:3, (IE the SAR is 4:3). If you need to stretch it at the TV to get the correct aspect, the pixels themselves are not meant to be square (hence anamorphic, usually 1.3x).
If you tag the video with a display aspect ratio of 16:9, the anamorphic pixels will be desqueezed to the correct aspect ratio by the decoder before going out to the TV.
You have a 16:9 intended display video, squeezed into a 4:3 container, that is tagged such that the decoder thinks it's just a 4:3 video.
Make sense?
@Artiume commented on GitHub (Apr 17, 2020):
His post doesn't include the SAR, but nonetheless, the issue at hand still exists. I suffer from the same issue with content, it isn't a mistag issue. The issue is ffmpeg is using the SAR instead of DAR
@stale[bot] commented on GitHub (Aug 15, 2020):
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
@ToxicFrog commented on GitHub (Jul 11, 2023):
I think I'm hitting the same bug: I have a video here with ffprobe info
h264 (High), yuv420p(progressive), 720x480, SAR 853:720 DAR 853:480, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default), i.e. a 16:9 video ripped from anamorphic DVD. When played back in jellyfin-web, it displays as a 4:3 video rather than 16:9. In VLC it displays correctly.@fusselkater commented on GitHub (Feb 29, 2024):
The same problem seems to exist for anamorphic Live TV channels:
Stream #0:3: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbnAll SD Channels are shown in 4:3 aspect ratio instead of 16:9. Tested with jellyfin-web, android and FireTV App. For FireTV I found a workaround, by choosing LibVLC as player.
@pmyshakov commented on GitHub (Mar 21, 2025):
@felix920506 It seems to me that the definition of IsAnamorphic should be a little more complicated.
Even in the discussion mentioned in the comment there is an example of detecting that is very different from the code
From discussion
In code
350983e03c/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs (L856)@lordmortis commented on GitHub (Jul 11, 2025):
I appear to be having a similar issue to what's described here: I have some episodes encoded anamophically, and if i use SwiftFin and force direct play - they work. On first play in swift fin - they're fine, but afterwards they don't appear to be fine.
They also don't play correctly inside firefox.
I'm seeing this ffmpeg command line on transcode:
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -fflags +genpts -f matroska -canvas_size 720x576 -i file:"<REDACTED>" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -codec:v:0 copy -bsf:v h264_mp4toannexb -start_at_zero -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 6 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/cache/transcodes/a2c80921cc8419bbb9857751791849c5%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/a2c80921cc8419bbb9857751791849c5.m3u8"This file has MKV tags for a pixel size of 720x576 but a display size of 1047x576