hi, when I try to incapsulate this 1012x572 raw file:
https://www.dropbox.com/s/wzfzhihmnl5ylzz/title_t00_track1_%5Beng%5D.mpg.264?dl=0
into an mkv with mkvtoolnix, the result become 1013x572.
h.264: Video: MPEG4 Video (H264) 712x572 (11392:6435) 25fps [V: h264 high L4.1, yuv420p, 712x572]
mkv:...Video: MPEG4 Video (H264) 712x572 (1013:572) 25fps [V: h264 high L4.1, yuv420p, 712x572 [default]]
Source: Video: MPEG2 Video 720x576 (16:9) 25fps [V: mpeg2 main, yuv420p, 720x576]
the source is a PAL DVD 16:9 ITU OFF, crop(4, 2, -4, -2)
I used MeGUI and x264 Force SAR 64:45
how do I fix it?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 13 of 13
Thread
-
Last edited by maudit; 20th Jan 2022 at 10:21.
-
Not sure if I understand your problem, but:
The source picture is after cropping 712x572, not 1012x572. Same as the encoded .264.
In mkvtoolnix: Set aspect Ratio 16/9 in the dropdown box. -
What do you want to display as ? 1012x572 in "square pixels"?
DAR = FAR * SAR
1012/572 = 712/572 * SAR
SAR = 1012/712, which reduces to 253/178
ffmpeg -i title_t00_track1_[eng].mpg.264 -bsf:v h264_metadata=sample_aspect_ratio=253/178 -c:v copy bsf253_178.264
mkvtoolnix
ffplay -i bsf253_178.mkv
Stream #0:0: Video: h264 (High), yuv420p(progressive), 712x572 [SAR 253:178 DAR 23:13], 25 fps, 25 tbr, 1k tbn (default)
double check
23/13 * 44/44 = 1012/572 -
-
-
Video resolution is 712x572 and it's still same after remux to mkv.
mkvtoolnix added DAR, and it's rounded to least distortion, what is 1013 instead of 1012. [11392:6435 *572 = 1012.622222222222]
So it's "fixed" already.Last edited by VoodooFX; 20th Jan 2022 at 11:52.
-
If SAR 64:45 is the correct SAR, which I assume it is.
712 x 64 /45 = 1012.6222
572 x 11392 / 6435 = 1012.6222
So somewhere along the way the MKV DAR has been rounded. Nothing to worry about though.
Did this come from MPC-HC?
MPEG4 Video (H264) 712x572 (1013:572) 25fps [V: h264 high L4.1, yuv420p, 712x572 [default]]
I'd have to check, but I think MPC-HC rounds the DAR to whole pixel dimensions (1013:572), but maybe not for RAW streams. I'd have to check.
To find out, open the MKVToolNix "MKV Header Editor", and then the MKV in question. Expand the video stream section and check the contents of the following elements.
Video Pixel Width
Video Pixel Height
Video Display Width
Video Display HeightAvisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
thx @hello_hello,
you solved my problem.
yes that line came from mpc-hc.
probably is exactly like you said:
"I think MPC-HC rounds the DAR to whole pixel dimensions (1013:572), but maybe not for RAW streams. I'd have to check."
To correct the resolution from 1013 to 1012,
I opened the mkv into the toolnix header editor and I changed the "Video Display Width" value from 1013 to 1012 and saved.
now mpc-hc plays the mkv at a 1012 res.
thanks -
-
ok you're right, surely it is, but let's assume that I prefer to have at least a MOD2 res, cause I hate odd numbers.
..is not completely clear to me what SAR to use in the x264 settings..
I tried with the MeGUI anamorphic SAR calculator overriding the x264 settings:
global MeGUI_darx = 11392
global MeGUI_dary = 6435
and the result is the same compared to when I used the sar 64:45 taken from this table down below:
anyway, thanks you all for all the info.
DVD Aspect FrameSize SAR ITU
PAL 4:3 720 x 576 12:11 ITU ON
PAL 4:3 720 x 576 16:15 ITU OFF
PAL 16:9 720 x 576 16:11 ITU ON
PAL 16:9 720 x 576 64:45 ITU OFFLast edited by maudit; 22nd Jan 2022 at 15:12.
-
Once again, 1012x572 is not resolution, it's aspect ratio, mod2 doesn't matter here.
-
-
maudit,
The "ITU" aspect ratios in your table aren't what you get from MeGUI's anamorphic encoding, as they're mpeg4 SARs, not ITU, although for some resolutions MeGUI will change an ITU SAR to mpeg4 (Bluray standard definition encoding), or it's the x264 encoder changing them, I can't remember.
The SAR possibilities are listed here (referred to as PARs).
https://forum.doom9.org/showthread.php?p=1058927#post1058927
Once upon a time most/all GUI's used the "almost exact" ITU SARs, but as far as I know all currently maintained GUIs have switched to the mpeg4 equivalents instead. Except for MeGUI. It still uses the almost exact ITU DARs in the script creator.
For other readers, there's info in your other thread on how to add mpeg4 DARs to MeGUI (like 16:9 and 4:3, the mpeg4 equivalents are 20:11 and 15:11 for both PAL and NTSC).Last edited by hello_hello; 23rd Jan 2022 at 22:03.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview)
Similar Threads
-
Splitting a MKV using MKVToolNix
By Knocks in forum EditingReplies: 16Last Post: 20th May 2023, 19:41 -
Converting multiple video files to MKV using MKVToolnix
By pcmacbob in forum Newbie / General discussionsReplies: 5Last Post: 7th Sep 2022, 13:24 -
questions about cutting .mkv videos with ffmpeg and mkvtoolnix
By aaajan in forum EditingReplies: 5Last Post: 29th Mar 2021, 04:48 -
MKVtoolnix, MKV remove parts end with 1 mkv.
By gridmonkey in forum Newbie / General discussionsReplies: 0Last Post: 18th Jan 2021, 13:10 -
Please help- RAW .264 file needs to be playable
By eagle132 in forum Video ConversionReplies: 12Last Post: 28th Feb 2017, 01:11