Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th January 2025, 19:41   #1  |  Link
MaximRecoil
Registered User
 
Join Date: Feb 2004
Posts: 196
Weird MPEG-2 video files

I don't know which subforum would be best to post this in. I'm not trying to encode anything, but I've encountered some weird MPEG-2 files that were encoded by someone.

I'm using MakeMKV to copy a TV series DVD set to my computer so that I can watch them without having to swap discs after every 4 episodes and sit through the annoying unskippable stuff at the beginning of each disc. I'm leaving them in their original MPEG-2 form (no plans to re-encode them).

The video files from seasons 1 through 4 were all normal, but starting with season 5 they got weird. All of them show at least 2 different frame rates, and some of them show 3, when you look at the properties in MPC-HC. Here's one example:
Quote:
Frame rate: 24.464 FPS

Original frame rate: 23.976 (24000/1001) FPS

Video: MPEG2 Video 720x480 (4:3) 29.97fps [V: English [eng] (mpeg2 main, yuv420p, 720x480)]
The oddball 24.464, the film 23.976 (even though these DVDs had Betacam masters), and the correct 29.97 are all for same video file.

The oddball frame rate varies randomly from file to file, and sometimes the 23.976 one isn't there, leaving only 2 contradictory frame rates: the oddball one and the correct 29.97 one.

Two of the episodes so far were even weirder, because they had contradictory display aspect ratios in addition to contradictory frame rates: 16:9 and 4:3 (the correct DAR for all episodes is 4:3, as this TV show ran from the late 1980s to the mid 1990s). With those two episodes, if I played them in MPC-HC directly from the DVD, selecting them from the DVD's menu, they displayed in the correct 4:3 AR, but if I played the MKVs from MakeMKV, they displayed in the wrong 16:9 AR.

I was able to fix the DAR on those two files by remuxing them in tsMuxerGUI and selecting 4:3.

Does anyone have an explanation? I didn't think that DVD video specifications even allowed oddball frame rates, let alone multiple ones, nor two different DARs, all for the same video stream. How was that even accomplished?

Last edited by MaximRecoil; 30th January 2025 at 19:46.
MaximRecoil is offline   Reply With Quote
Old 1st February 2025, 15:41   #2  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,827
Drag the weird MPEG-2 files that were encoded by someone onto DGindex and see the reported pulldown.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 1st February 2025, 18:27   #3  |  Link
MaximRecoil
Registered User
 
Join Date: Feb 2004
Posts: 196
Quote:
Originally Posted by Emulgator View Post
Drag the weird MPEG-2 files that were encoded by someone onto DGindex and see the reported pulldown.
Where in DGIndex can you see the reported pulldown? I don't see anything about pulldown in the information window that comes up when you press F5 to preview.

MediaInfo says 2:3 pulldown.
MaximRecoil is offline   Reply With Quote
Old 1st February 2025, 19:14   #4  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,827
MediaInfo can not know about individual frames, DGIndex can.

The generated .d2v file will tell you. Set "Honor pulldown flags", press F4.
Pull the resulting .d2v file onto any editor and look for "field operation" at the top.
At the end the result of the pulldown flags will be listed: Something like 100%FILM, or 100% VIDEO, or 98% FILM...

Fire up the built-in DGIndex Manual, skip to Field operation.
The readme tells where the flags sit and how the flags are to be read.

MPEG-2 TFF/RFF flags allow to pulldown any frame/field differently, and irregularily.
Source fields can be manipulated so that 2 neighbored fields can appear 2..3 times constituting any legal framerate.
Something like 16 2/3p to 50i is possible.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 1st February 2025 at 19:35.
Emulgator is offline   Reply With Quote
Old 1st February 2025, 20:04   #5  |  Link
MaximRecoil
Registered User
 
Join Date: Feb 2004
Posts: 196
I've attached the .D2V file for the weirdest one: 3 different frame rates shown in MPC-HC's properties (23.976, 24.401, and 29.97) and 2 different display aspect ratios shown if you check the properties while playing it from the actual DVD (16:9 and 4:3; it displays in 4:3 from the DVD, displays in 16:9 from the .MKV).

91.25% film.
Attachments Pending Approval
File Type: zip D1_t02.zip
MaximRecoil is offline   Reply With Quote
Old 1st February 2025, 21:07   #6  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,827
Your .d2v file is not yet approved, so I am just guessing upfront:
If you relate 91,25% Film to these boundaries 100%Film=23.976fps vs. 100%Video=29.97fps you might end up somewhere at 24.xyz fps.
Quote:
How was that even accomplished?
Pro encoders like CCE can be fed with a pulldown list (extension .i23) supporting manual cadence correction, IIRC.
You got to keep the .m2vs with their pulldowning as-is.
If all available conversions/remuxing tools go with the required flagging behaviour, don't know, I won't guarantee for their accuracy.
For the AR-flagging-may-be-borked ones, you may reflag those using ReStream.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 1st February 2025 at 23:23.
Emulgator is offline   Reply With Quote
Old 2nd February 2025, 01:07   #7  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,865
CCE had best pulldown support ever. Their manual was very good, talking even about chapters positions. Whole 3:2 detection, correction, etc GUI was very detailed and powerful.
I've done one disc with 3:2 pulldown with manual correction, chapters correct positioning etc. It was perfect
kolak is offline   Reply With Quote
Old 2nd February 2025, 04:27   #8  |  Link
MaximRecoil
Registered User
 
Join Date: Feb 2004
Posts: 196
I don't know why that D2V attachment is still "pending approval," nor even why attachments need approval here to begin with (is that a new thing?), but here's an external link to it:

https://drive.google.com/file/d/1Jdi...ew?usp=sharing

How can an episode have flags for 2 different display aspect ratios, and why would playing the episode from the DVD in a standalone DVD player or in a software media player on a PC result in 4:3 but playing the ripped episode results in 16:9? This is the first time I've ever encountered that. There must be more than one "place" that has an aspect ratio flag.

I know that with, say, an MKV container, there can a container-level DAR that can be different than the SAR (when they're different, container-level DAR overrides SAR in my experience), but that's not what's happening here, because when I look at the properties while playing either of those two episodes directly from the DVD where MKV isn't even part of the equation, it shows both 16:9 and 4:3 (and 853:480 too, which is another way of stating ~16:9):



Does the VIDEO_TS.IFO file contain an aspect ratio flag that can override the AR flag in the MPEG-2 stream itself?
MaximRecoil is offline   Reply With Quote
Old 2nd February 2025, 10:21   #9  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,041
Quote:
Originally Posted by MaximRecoil View Post
Does the VIDEO_TS.IFO file contain an aspect ratio flag that can override the AR flag in the MPEG-2 stream itself?
HW DVD players and SW players emulating DVD players follow the .IFO. What is written in the .ifo can be checked with the good ole' IFOEdit.exe.
The AR 853:480 is just calculated (by tools) as 32/27x720:480, with 32/27 being the PixelAspectRatio (PAR, aka SAR in H.264) of 16:9 NTSC DVDs. DVD's/mpeg2 actually do not specify the PAR but only the DAR (16:9, 4:3) though. So if the .ifo says 4:3 for the DAR a HW DVD player will play the corresponding title set (i.e. the associated .vobs) as 4:3, even though the .vob(s) may be flagged as 16:9 or something else. Likewise, if the .ifo says 16:9 the video should be played as 16:9 even though the .vob(s) may be flagged as 2.35:1 or whatever, for example.
When we however play the .mpg or .vob files in a SW player it depends which (possibly) conflicting parameters the player obeys (mpeg2 stream sequence header, or .vob container flag) and/or how the player is configured.

FWIW the commandline below outputs the file "frameinfo.xml" which one can open in EXCEL. It provides a lot of information in a structured table about the video parameters for each frame of your .mpg file.
Code:
ffprobe.exe "your.mpg" -show_frames -print_format xml -select_streams v:0  >frameinfo.xml

Last edited by Sharc; 2nd February 2025 at 18:38.
Sharc is offline   Reply With Quote
Old 3rd February 2025, 19:07   #10  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,951
Yeah, this is typical for a DVD where the main title is 23.976 but the credits are in 30i.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.