[HELP] File has inconsistent stored and displayed resolution - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: A/V Talk (https://forum.selur.net/forum-6.html) +--- Thread: [HELP] File has inconsistent stored and displayed resolution (/thread-2951.html) |
File has inconsistent stored and displayed resolution - Dyshonest - 04.12.2022 I don't know if I'm legally allowed to link it---it's on archive.org though. If it's important and it's okay for me to do so, I'll post the link. It's a .ts file of a TV show (Dragon Ball GT) recorded from a 1080i channel (FujiTV) in Japan. Yup, unfortunately it's interlaced too. 29.97 FPS, needs to be brought back to 23.97. I suspect someone recorded the channel feed to a rewriteable Blu-Ray or something, I don't know. EDIT: Selur gave permission and asked for it. Here is the file for anyone reading, it is quite large (2.2GB), make sure you're not on mobile data. https://archive.org/download/DBGTF2B/Dragon%20Ball%20GT%20-%2001%20%28FujiTWO%201440x1080%20MPEG2%20AAC%29.ts Well here's a still picture from the episode. https://i.imgur.com/j7gDOeE.jpeg Hmm. Very clearly 1920x1080 with heavy black bars to keep it centered (as the show was originally 4:3). MediaInfo says it's 1440x1080... 16:9. So it gets half of it right. Hybrid recognizes the file as 1440x1080. Any attempt to crop it, eats into the actual show, as it doesn't recognize what's on the sides. HandBrake recognizes it as having a stored resolution of 1440x1080, and a displayed resolution of 1920x1080. Using HandBrake, I was able to "upscale" it to 1920x1080, 16:9, the file then properly functions as if it always was 1920x1080. Here were my settings: https://i.imgur.com/US2CttO.png It's quite inconvenient (and not great for what I want to do in restoring the show because HandBrake is not as good of a deinterlacer as Hybrid) to have to process the video in HandBrake to then finally edit in Hybrid. And yet, nothing else seems to work. Altering the resolution or aspect ratio options in MKVToolNix don't impact anything. My last option was going to be the nuclear approach of dumping the video into .pngs using ffmpeg, then rebuilding it into a video. The only issue... is that ffmpeg churns out squished 1440x1080 frames, because it isn't ACTUALLY 1440x1080. Proof: https://i.imgur.com/39BAgTS.jpeg RE: File has inconsistent stored and displayed resolution - Selur - 04.12.2022 You seem to ignore PAR at all. Unlike 1920x1080, 1440x1080 normally isn't using a 1:1 PAR. (You ignoring the PAR would explain the effect of the cropping,..) -> post a link t to the archive.org article an I can have a look. Cu Selur RE: File has inconsistent stored and displayed resolution - Dyshonest - 04.12.2022 (04.12.2022, 09:46)Selur Wrote: You seem to ignore PAR at all. Here is the file, it is quite large (2.2GB), make sure you're not on mobile data. https://archive.org/download/DBGTF2B/Dragon%20Ball%20GT%20-%2001%20%28FujiTWO%201440x1080%20MPEG2%20AAC%29.ts I'm not sure what you mean by ignoring PAR? Anything I alter on the Pixel Aspect Ratio (PAR) part of Hybrid (pictured here: https://i.imgur.com/Ao6Mt67.png) doesn't impact the effects of cropping. The proper cropping data, from what I can gather, would be 240 on each side (leaving the slightest bit of a channel watermark which is no big deal to put up with since it'll properly display on 4:3 devices then!), and 6 pixels on top. However I can't get Hybrid to do this, since it thinks the image is a 1440x1080 video with an aspect ratio of 16:9, so any attempt to remove from the sides causes it to eat into the actual video. RE: File has inconsistent stored and displayed resolution - Selur - 04.12.2022 Quote:I'm not sure what you mean by ignoring PAR?Looking at your screenshot, the 1440x1080 has a par or 1333:1000 not 1:1. Stretching that to 1:1 you get 1440*1.3333x1080, which is 1919.52=1920 x 1080. The file, you link to, has 1440x1080 pixels. It's saved without black bars and a 'resize instruction' to stretch the width by 1.333 on playback. Everything seems as expected and the issue isn't Hybrid, but you are lacking a basic understanding of how aspect ratios are signaled in video. You might want to read https://forum.selur.net/thread-597.html and really read the linked articles to get at least a basic understanding of aspect ratios in video. If you want to convert this content to 1920x1080, you should tell Hybrid that you want to convert the 1.333 PAR to a 1:1 PAR, by:
This way, your output will look like this: AutoCrop will not crop the black bars, since it would require to crop into active parts of the image in the beginning. So if you wanted to get rid of the black bars in the second part of the file while taking into account that the first part looses active information, you could set the crop values to 180,6,180,2: This would result in: and Alternatively, you could split the file, into two parts and encode them separately. Note that this would increase the output height to 1430, if you wanted to stick with a max of 1080, you could simply change 'Auto adjust' from height to width. Hybrid would then create 1450x1080 content. (You cloud add back black bars by using the letterbox option.) A single video stream does not allow switching the aspect ratio. Transport streams allow the concatenation of streams while using different aspect ratios, but not all players support this on playback. Anime groups usually either live with the cropping or encode intro/auto separately from the main content and use 'ordered chapters' with mkv files. So, not a bug in Hybrid and I would really recommend reading up and get a basic understanding of aspect ratios. Cu Selur Ps.: Binary splitting the file into chunks and looking at the transport stream headers of the file, they all show Video: mpeg2video, yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn RE: File has inconsistent stored and displayed resolution - Dyshonest - 04.12.2022 I see. This was very informative, thank you. I have a very slight passing knowledge of aspect ratios but usually defer it to someone else. I didn't think it was actually far smaller than 1440x1080 pre-crop, given the gargantuan amount of stuff on the sides (180 on both sides) to even reach that before the 1.333. I thought it was just 1920x1080 (with a standard (for a 4:3 to widescreen) 240 on each side to center it), since it only seemed to behave as a widescreen file. I did not know this could happen. Well you've been an absolute lifesaver. Thank you so much. |