Jump to content

Anamorphic PAL DVD Rip not using correct aspect ratio


Recommended Posts

Posted

Just ripped an old DVD to the collection - Taken (2002), it's PAL, 25 FPS, 720 x 576 in size, and is also anamorphic.

I've used MakeMKV to rip it and then encoded it using NEAV1E and also Handbrake.

Neither converted version will play right using the correct aspect ratio.

The rather odd behaviour is that if I skip through the video, it briefly plays fine at the correct ratio and then goes squished. This is in any Emby client.

Taken - S01E01 - Beyond the Sky - ORIGINAL CLIP.mkvTaken - S01E01 - Beyond The Sky - AV1 - HANDBRAKE CLIP.mkvTaken - S01E01 - Beyond the Sky - 576p - AV1 - NEAV1E CLIP.mkv

If I play the original ripped MKV file, it's fine, so clearly something could be going wrong in the encoding process. Both versions play fine in VLC.

If I check via MediaInfo, it's set to 16:9 which is correct?

Any pointers for handling the encode? Added samples.

sanjaydevani
Posted

Since the original plays fine, check your Handbrake settings. Make sure "Keep Aspect Ratio" is on and try encoding to MP4 instead of MKV.

Posted

I did a test encode to MP4 and that went OK, so I just did a batch convert with FFMPEG rather than reencode all the eps.

Using the Win Emby client plays fine now (DirectPlay) on the MP4, the browser (Firefox) still gets confused on the MP4 version and squishes it.

So not totally solved, yet, but getting there. I would ideally like to keep them as MKVs, as I've got more than one audio stream.

Posted

Another couple tests converting to x265 - used both handbrake to do a NVENC h265 version and NEAV1 to do a x265 encode and both play with no issue in Win Emby client.

Seems to be something specific with AV1....

Posted (edited)

Just tried MS Edge and AV1/MKV is playing fine, it's not squishing and it's also DirectPlay, whereas Firefox requires transcoding and squishes video.

Tried the Emby Theater app (didn't know it existed until now!) and it also DirectPlay and also playing fine.

So could this be an issue with the Windows Store Emby clients? Are there some logs I can grab from it, or do they all come from the server? It is using DirectPlay, so don't think the server is going to be of much help.

Edited by bwlonsdale
Posted

Hi, we have a new windows app about to launch so stay tuned.

visproduction
Posted
12 hours ago, bwlonsdale said:

Just tried MS Edge and AV1/MKV is playing fine, it's not squishing and it's also DirectPlay, whereas Firefox requires transcoding and squishes video.

I think .mkv media can have force aspect ratio preference in the meta data, so that the original media can be stretched or squished and the player is suppose to pick up on the metadata preference to show the playback in a different aspect ratio.  I suspect that you might have that and transcoding doesn't perhaps see this preference and instead just looks at the actual pixel aspect ratio and keeps it.

It think you may need to recode your media to have the actual pixel dimension aspect ratio, instead of relying on embedded metadata that says show this as 2.35 aspect ratio instead of the actual 1.78. This is a guess.  Does Emby watch .mkv change the aspect ratio or does this embedded info get ignored and is the cause of your problem?

Posted (edited)
On 11/1/2024 at 3:21 AM, bwlonsdale said:

Just ripped an old DVD to the collection - Taken (2002), it's PAL, 25 FPS, 720 x 576 in size, and is also anamorphic.

I've used MakeMKV to rip it and then encoded it using NEAV1E and also Handbrake.

Neither converted version will play right using the correct aspect ratio.

The rather odd behaviour is that if I skip through the video, it briefly plays fine at the correct ratio and then goes squished. This is in any Emby client.

Taken - S01E01 - Beyond the Sky - ORIGINAL CLIP.mkv 33.52 MB · 0 downloads Taken - S01E01 - Beyond The Sky - AV1 - HANDBRAKE CLIP.mkv 3.32 MB · 0 downloads Taken - S01E01 - Beyond the Sky - 576p - AV1 - NEAV1E CLIP.mkv 4.02 MB · 2 downloads

If I play the original ripped MKV file, it's fine, so clearly something could be going wrong in the encoding process. Both versions play fine in VLC.

If I check via MediaInfo, it's set to 16:9 which is correct?

Any pointers for handling the encode? Added samples.

Both the original and AV1 play the same in the new app that is close to release. I also tested it in mpv (the player that app uses), with the same result. There are black bars around the video frame which slightly distort the frame. It's a DVD thing. When re-encoding you may want to remove those. I also re-encoded the 'ORIGINAL' clip to h265 in Handbrake with these settings (note the bottom line to slightly adjust the aspect)

image.thumb.png.9ea357ddea7739866e8473df2c48087b.png

 

The resulting frame looking like this

image.jpeg.ee71064f09083941dff55e3a8dce2961.jpeg

 

The 'ORIGINAL' frame looking like this

 

image.jpeg.d46d7bce2fe7b248d437e10f62e9f05d.jpeg

Edited by generiq
visproduction
Posted

Display size was 1024 width, your Final dimension setting was wrong at 1016.  The original AR for this show was 1.7778 or 16:9.
Don't check optimal size with Handbreak.  That feature just picks best closest multiple for encoding.  The storage size should have been also the exact preferred size for 16:9 which in this case would be 1024 x 576, not the automatic 702 x 572.

Handbreak's approach is to automate most things so people don't have to bother, but the end result from this automation is always a compromise for quality and in this case even the Aspect Ratio.  I don't bother with Handbreak, because you have unclick so many things to get the settings correct.  I use AVIDemux.

Hope that makes some sense.

Posted (edited)
1 hour ago, visproduction said:

Display size was 1024 width, your Final dimension setting was wrong at 1016.  The original AR for this show was 1.7778 or 16:9.

Except that it worked perfectly! You aren't paying attention. With the black bars in the original, you can visibly see the picture is the wrong aspect. So once removed, you need to adjust it, which Handbrake didn't automatically do. If you look at the aspect I adjusted it to, it's 15.99:9. Do you really want to complain about a 0.01 difference? 

16 / 9 = 1.7777777778

15.99 / 9 = 1.7766666667

Its ok...Nobody will notice.

Edited by generiq
Posted (edited)

And I think these options are better. Everything lines up better. I also chose bwdif as the deinterlacer with Bob. So it frame doubles

image.thumb.png.7eeacce5d51023619f9e703ce104624a.png

This is what it spits out

image.png.ee5603d893d1a141b3d7f63eb78c1b72.png

Edited by generiq

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...