Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deinterlacing methods to current best practices #469

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

MobyGamer
Copy link
Contributor

For many years, hardware devices and online streaming platforms have been capable of 50p or 60p output, so the older advice of deinterlacing 25i/30i to 25p/30p is no longer necessary. For matching the fidelity of interlaced sources as they were originally viewed on period hardware, each field should be output to its own frame, producing 50p content from 25i sources, and 60p content from 30i sources. These updates to ffmprovisr reflect that.

Additionally, the deinterlacing filter advice of yadif or w3fdif has been changed to bwdif, which combines the best attributes of both older filters.

Checklist

For many years, hardware devices and online streaming platforms
have been capable of 50p or 60p output, so the older advice of
deinterlacing 25i/30i to 25p/30p is no longer necessary.  For matching
the fidelity of interlaced sources as they were originally viewed on
period hardware, each field should be output to its own frame, producing
50p content from 25i sources, and 60p content from 30i sources.  These
updates to ffmprovisr reflect that.

Additionally, the deinterlacing filter advice of yadif or w3fdif has
been changed to bwdif, which combines the best attributes of both older
filters.
index.html Outdated
By default, <a href="https://ffmpeg.org/ffmpeg-filters.html#yadif-1" target="_blank">yadif</a> will output one frame for each frame. Outputting one frame for each <em>field</em> (thereby doubling the frame rate) with <code>yadif=1</code> may produce visually better results.</dd>
<dt>idet</dt><dd>detect interlaced video field order<br>
<a href="https://ffmpeg.org/ffmpeg-filters.html#idet" target="_blank">idet</a> will try to detect if the video is interlaced, and if so, what the order of the fields are (top-field-first, or bottom-field-first). This is done to ensure the output of the deinterlacing filter is correct.</dd>
<dt>bwdif</dt><dd>deinterlacing filter (‘Bob Weaver Deinterlacing Filter’)<br>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, I didn't know this was named after a dude

Copy link
Member

@ablwr ablwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely, thorough, insightful, and very welcome. Thank you! I'll approve this and allow some time for fellow archivists and maintainers to weigh in.

@kieranjol
Copy link
Collaborator

kieranjol commented Aug 1, 2023

I echo Ashley, this looks really great!
I’d like to take a little more time later to review this thread https://lsv.uky.edu/scripts/wa.exe?A2=2304&L=AMIA-L&D=0&P=51537370 with regards to 50/60fps as best practice. Off the top of my head, still giving people the knowledge and option of both methods ( doubling vs not doubling) may be a way forward, and I’d love to hear from others!

@privatezero
Copy link
Member

I wouldn't say that AMIA thread noted by @kieranjol resolved in any consensus around best practices. I think this is a great command, but my preference would be to have as a separate recipe rather than as an update of an existing one as that way ffmprovisr gains explanations of more filters/options and the ultimate choice is up to the user.

@kieranjol
Copy link
Collaborator

I agree Andrew!

@retokromer
Copy link
Member

I second @privatezero’s position: another command would be better than simply eliminating yadif.

@MobyGamer
Copy link
Contributor Author

I think this is a great command, but my preference would be to have as a separate recipe rather than as an update of an existing one as that way ffmprovisr gains explanations of more filters/options and the ultimate choice is up to the user.

I can make those changes and resubmit, although I'm not sure what the correct process is. Is it to reject/close this pull request, then submit a future one with the suggested changes?

@ablwr
Copy link
Member

ablwr commented Aug 1, 2023

Honestly do whatever is easiest for you :)

@ablwr
Copy link
Member

ablwr commented Aug 1, 2023

to extend that sentiment just a bit: I don't know how you're engaging with git/GitHub, but one method is that you could go into this branch you are working on, make changes and a new commit, and push those new commits to your branch and it will update here (you can also do a "force push" using -f to try to overwrite your existing work, if that's what you want to do) or you can close and re-open a new one, which is sometimes the easier thing to do, especially if you don't spend your time in git every day.

@MobyGamer
Copy link
Contributor Author

I wasn't aware that pull requests could be automatically updated. I'll attempt updating the branch, and will notify again if that appeared to be successful.

@ablwr
Copy link
Member

ablwr commented Aug 1, 2023

Yep, they'll auto-update here!

A new section was added specifically to address how to deinterlace video
to frames, preserving the visual cadence of the source material.
An animated example of field separation was also provided for the
documentation.
@MobyGamer
Copy link
Contributor Author

I reverted the previous sections and added a new section, "deinterlace fields to frames". I also included an animated example showing the result of such deinterlacing (which, IMO, should be the default for all born-interlaced content). If these changes and the new graphics are not visible, please let me know.

Copy link
Member

@ablwr ablwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the additional pics too

@ablwr
Copy link
Member

ablwr commented Aug 2, 2023

@privatezero and/or @kieranjol please review and feel free to merge!

@kieranjol
Copy link
Collaborator

It's perfect, thank you for taking on board the feedback! The gif is so helpful too.

Copy link
Member

@privatezero privatezero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess that leaves me to merge! Thanks for the contribution!

@privatezero privatezero merged commit 8290b25 into amiaopensource:gh-pages Aug 2, 2023
@kfrn
Copy link
Member

kfrn commented Aug 21, 2023

Late to the party but thanks for this, @MobyGamer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants