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. |
18th November 2023, 23:10 | #1 | Link |
Registered User
Join Date: Oct 2023
Posts: 2
|
Are interlaced fields encoded separately?
This is a question regarding interlaced video that I've never received a firm answer on.
Question is: are the fields in interlaced video actually encoded separately? This would mean that the fields exist separately in the video stream and are recombined by your video player. Or, are the fields encoded into the same frame as a progressive video, and the term "60i" is simply used to describe how the video is visually perceived? If the former, how can I check that a video is truly interlaced, and not just a progressive video with interlaced frames? |
18th November 2023, 23:27 | #2 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,251
|
Quote:
You can always encode interlaced video "as if it was progressive", i.e. weaving each pair of consecutive fields and then encoding the "interlaced frames" just as if they were progressive video. The result will not be good, obviously That's why video formats like H.264 have a dedicated "interlaced" mode, where the fields will indeed be encoded separately. But, usually, you need to explicitly enable this! Note that H.264 actually has two different "interlaced" modes, called PAFF (Picture Adaptive Field Frame) and MBAFF (MacroBlock Adaptive Field Frame). PAFF allows to decide, on a frame basis, whether to encode each frame as a frame or as two fields. MBAFF allows to decide, on a macroblock basis, whether to encode as field or frame. Meanwhile, in H.265, encoding of "interlaced" material has been greatly simplified, pretty much treating each field as a separate picture. Quote:
It is possible that progressive material was encoded as interlaced, which is inefficient but doable. And, just as well, it is possible that interlaced material was encoded as progressive, which definitely should be a no-go but you never know! (Note that if any tools like MediaInfo and friends show "interlaced" vs. "progressive", then this always indicates how the video was encoded, not what the nature of the material is)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 18th November 2023 at 23:50. |
||
19th November 2023, 20:03 | #3 | Link |
Registered User
Join Date: May 2006
Posts: 4,015
|
Select a scene with motion. Separate the fields and step through the fields. If there is motion with every field advancement it is true interlaced. If there is motion with every 2nd field only it is progressive video.
|
21st November 2023, 04:18 | #4 | Link | ||
Registered User
Join Date: Oct 2023
Posts: 2
|
Sorry for not responding earlier. I actually did respond within the first day but I got a message about the post requiring moderator approval, but that never happened so I'm just re-writing my post.
Quote:
Quote:
What are you using to separate the fields? I can only advance frame by frame using vlc or mpv. |
||
21st November 2023, 22:54 | #6 | Link | |||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,866
|
Quote:
Some very old and very low budget TVs take 30i source with 3:2 pulldown and just encode it as interlaced, which delivers worse quality. But inverse telecine is still often possible. Quote:
Quote:
Note that lots of tools treat a properly encoded 3:2 pulldown streams as straight-up 24p, and report it as such, despite DVD not having a true 24p mode. |
|||
1st May 2024, 05:40 | #7 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,076
|
It depends on the colorspace. YV12 definitely encodes each field separately, which is part of the reason why the height should only be cropped in increments of 4 pixels rather than 2.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
28th May 2024, 13:58 | #8 | Link |
Registered User
Join Date: May 2024
Posts: 3
|
Interlaced fields in video are typically encoded together within the same frame, not separately. The term "60i" refers to how the video is perceived, with two fields making up each frame. To check if a video is truly interlaced, you can use software like MediaInfo to inspect the file's properties, or view the video frame-by-frame in an editing program to see if there are distinct interlaced fields
|
28th May 2024, 18:28 | #9 | Link | |
Registered User
Join Date: Oct 2012
Posts: 8,102
|
Quote:
https://learn.microsoft.com/en-us/wi...vformats08.gif if you store field individual it is technically not interlaced anymore. |
|
29th May 2024, 10:52 | #10 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,368
|
Interlacing of the lines is a property of how the video was sampled / is going to be presented, eg. in the raw domain - in a coded bitstream it is very common to encode the fields separately, and re-combine them after decoding. This is done for efficiency of course, alternating lines with different temporal information would be terrible to compress.
H264 for example has two encoding modes, PAFF (Picture Adaptive Frame/Field), which separates the two fields, and MBAFF (Macroblock Adaptive Frame/Field) which can do the same separation on a macroblock level for efficiency gains. Only after decoding will the fields be combined and get the "interlaced lines" style. With that in mind every video codec can in theory be used for interlaced encoding - just encode at twice the fps and half the frame size, and add a filter around it to split/re-combine. This is technically how HEVC encodes interlaced. It has no special interlaced mode, just encodes half-sized fields, and carries some metadata to instruct the decoder to combine it. It is not very well supported though, as everyone is trying to make interlaced go away. Some video processing frameworks will also keep the fields separate in their processing chain, and only combine them as needed, as its more efficient to do this, depending on what kind of effects you apply to it.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders Last edited by nevcairiel; 29th May 2024 at 10:55. |
31st May 2024, 00:24 | #11 | Link | |
Registered User
Join Date: Jan 2015
Posts: 1,076
|
Quote:
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
|
31st May 2024, 13:52 | #12 | Link |
Registered User
Join Date: Oct 2012
Posts: 8,102
|
if a software does something at one point it does not change that YV12 is not encoded at all and does not mean it sperate fields.
YV12 is just a 420 format that has 3 array that's it. it stores the same information as NV12 which uses only 2 array. |
31st May 2024, 14:29 | #13 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,890
|
The cropping only needs to be mod4 if it's interlaced otherwise it can be mod2. Mind you there's a slight chance a mod2 height won't display correctly if you're using a decoder that hasn't been updated in over 20 years, but other than that a mod2 height is fine.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|