Simple line doubling -- Possible?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Simple line doubling -- Possible?

Post by markfilipak »

How do I specify simple line-doubling (of 60 fields/sec) to produce 60 frames/sec?

If you don't understand the frame & field specifications below, the question above should suffice.

What I have (the source).

I have source videos that have mixed 30FPS TELECAST PARTS -&- HARD-TELECINED PARTS.
Source: [A][C][d][E][f][G][h][j] -&- [A][a][c][C][d][D][d].

What I want.

As a trial, I want to transcode the whole video to line-doubled, 60FPS.
Line doubling: [A/A][b/b][C/C][d/d][E/E][f/f][G/G][h/h][I/I][j/j] -&- [A/A][a/a][B/B][b/b][B/B][c/c][C/C][d/d][D/D][d/d].
(It should produce the best transcode.)

What I've tried.

Since HandBrake solely makes progressive video, transcoding to 30FPS (no filters) produces some judder.
Deinterlace: [A/b][C/d][E/f][G/h][I/j] -&- [A/a][B/b][B/c][C/d][D/d].

The whole video can be detelecined to 24FPS, but the telecast parts should produce some combing & wicked judder.
Detelecine: [A/b][C/d][G/f][I/j] -&- [A/a][B/b][C/c][D/d].
(Actually, with the TV set to 23.970Hz, though the audio is about 100ms ms out of sync, the result is otherwise not too bad; it appears that HandBrake is doing something extra to the telecast parts that it's not disclosing.)

I tried simply transcoding to 60FPS (no filters), but the result was combed (which shouldn't happen with line-doubling), so I suspect it must be doing a 2-step process,
Deinterlace: [A/b][C/d][E/f][G/h][I/j] -&- [A/a][B/b][B/c][C/d][D/d], followed by
Frame doubling: [A/b][A/b][C/d][C/d][E/f][E/f][G/h][G/h][I/j][I/j] -&- [A/a][A/a][B/b][B/b][B/c][B/c][C/d][C/d][D/d][D/d].

I also tried transcoding to 60FPS with deinterlace, but the result had a bit of twittering.

All transcodes to 24FPS result in audio slightly out of sync.
All transcodes to 60FPS keeps the audio in sync.

How do I specify what I want?
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

markfilipak wrote: Tue Nov 12, 2019 5:46 am How do I specify simple line-doubling (of 60 fields/sec) to produce 60 frames/sec?

If you don't understand the frame & field specifications below, the question above should suffice.

What I have (the source).

I have source videos that have mixed 30FPS TELECAST PARTS -&- HARD-TELECINED PARTS.
Source:

Code: Select all

[A][b][C][d][E][f][G][h][I][j] -&- [A][a][B][b][B][c][C][d][D][d]
What I want.

As a trial, I want to transcode the whole video to line-doubled, 60FPS.
Line doubling:

Code: Select all

[A/A][b/b][C/C][d/d][E/E][f/f][G/G][h/h][I/I][j/j] -&- [A/A][a/a][B/B][b/b][B/B][c/c][C/C][d/d][D/D][d/d]
(It should produce the best transcode.)

What I've tried.

Since HandBrake solely makes progressive video, transcoding to 30FPS (no filters) produces some judder.
Deinterlace:

Code: Select all

[A/b][C/d][E/f][G/h][I/j] -&- [A/a][B/b][B/c][C/d][D/d]
The whole video can be detelecined to 24FPS, but the telecast parts should produce some combing & wicked judder.
Detelecine:

Code: Select all

[A/b][C/d][G/f][I/j] -&- [A/a][B/b][C/c][D/d]
(Actually, with the TV set to 23.970Hz, though the audio is about 100ms ms out of sync, the result is otherwise not too bad; it appears that HandBrake is doing something extra to the telecast parts that it's not disclosing.)

I tried simply transcoding to 60FPS (no filters), but the result was combed (which shouldn't happen with line-doubling), so I suspect it must be doing a 2-step process,
Deinterlace:

Code: Select all

[A/b][C/d][E/f][G/h][I/j] -&- [A/a][B/b][B/c][C/d][D/d]
followed by
Frame doubling:

Code: Select all

[A/b][A/b][C/d][C/d][E/f][E/f][G/h][G/h][I/j][I/j] -&- [A/a][A/a][B/b][B/b][B/c][B/c][C/d][C/d][D/d][D/d]
I also tried transcoding to 60FPS with deinterlace, but the result had a bit of twittering.

All transcodes to 24FPS result in audio slightly out of sync.
All transcodes to 60FPS keeps the audio in sync.

How do I specify what I want?
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

Sorry for double posting. I forgot that in this forum, you can't edit a post.
Deleted User 11865

Re: Simple line doubling -- Possible?

Post by Deleted User 11865 »

Actually you should be able to, but only for 20 minutes or so after initial posting. This may have changed, however.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Simple line doubling -- Possible?

Post by BradleyS »

It sounds like you want to disable interlacing detection, enable deinterlacing with the bob or bob eedi2 setting, and set fps to same as source.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

BradleyS wrote: Tue Nov 12, 2019 11:54 am It sounds like you want to disable interlacing detection ...
So deinterlace is either always on or always off, right?
... enable deinterlacing with the bob or bob eedi2 setting ...
Is bob line doubling?
... and set fps to same as source.
That's close. Actually "same as source" produced twitter. Setting FPS to 59.940 is perfect. You couldn't ask for a better picture.

Thanks, Bradley! I now know how to transcode mixed telecast & telecined material. The result is perfect in every way provided the TV is set to 59.940 Hz refresh. If the TV is set to 23.976 Hz, there's mondo judder.

You know, as I learn how to handle the 7 possible types of sources (24FPS v 25FPS v 30FPS & concurrent v sequential fields v mixed), the more it's becoming apparent that setting the TV to 59.940 Hz and transcoding to 119.880 Hz just might work for everything ... one setting for all transcodes. Can you imagine that?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Simple line doubling -- Possible?

Post by BradleyS »

Yes, that is what disabling interlacing detection does, makes the deinterlacing filter on all the time (or off if disabled).

Bob starts with line doubling, but is also interpolated for quality.

Glad you got it sorted. :)
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

BradleyS wrote: Tue Nov 12, 2019 6:11 pmBob starts with line doubling, but is also interpolated for quality.
Is there a way to solely do line doubling, only, and forego any interpolation? I think that foregoing interpolation would help with compression (and file size) without affecting quality.

By the way, setting FPS to '120' didn't work out as a means to achieve a single preset that works for everything because my TV doesn't do 120FPS -- it resulted in some twittering, but it might for a 120Hz TV.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Simple line doubling -- Possible?

Post by BradleyS »

The effect is minimal and mostly prevents strong aliasing. I guess you could output half height with custom anamorphic so your player would do the doubling, but most devices will do the same: some post-processing that looks far better than only line doubling, which usually leads to motion artifacts.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

BradleyS wrote: Tue Nov 12, 2019 9:03 pm The effect is minimal and mostly prevents strong aliasing.
The interpolation should not be required. It's simply blowing up the size of the encode by about 1/3rd.
I guess you could output half height with custom anamorphic so your player would do the doubling, but most devices will do the same: some post-processing that looks far better than only line doubling, which usually leads to motion artifacts.
I'm pretty confident that it will not produce motion combing (or any other artifacts) in this case. I'm encoding to 59.940 FPS, Since that FPS is native to the TV, the 'device' (meaning the TV?) is not doing any doubling.

Is there an override that will do bob but not interframe interpolation?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Simple line doubling -- Possible?

Post by BradleyS »

I'm not very familiar with it, but I believe not at this time.

Genuine question, what's your reference point for the 33% inflation? Are you feeding HandBrake a line doubled copy of your source to test?
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

BradleyS wrote: Tue Nov 12, 2019 9:21 pm I'm not very familiar with it, but I believe not at this time.

Genuine question, what's your reference point for the 33% inflation?
It's just a guesstimate based on my experience.
Are you feeding HandBrake a line doubled copy of your source to test?
No, I'm feeding the results of the encode back into my analyzer to 'see' the results (and the 'goodness' of the encode).
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

Bradley,

If I write that I want this

Code: Select all

.................. TELECAST PART .................     ................ HARD-TELECINE PART ..............
[A/A][b/b][C/C][d/d][E/E][f/f][G/G][h/h][I/I][j/j] -&- [A/A][a/a][B/B][b/b][B/B][c/c][C/C][d/d][D/D][d/d]
but I'm getting this

Code: Select all

[A/b][A/b][C/d][C/d][E/f][E/f][G/h][G/h][I/j][I/j] -&- [A/a][A/a][B/b][B/b][B/c][B/c][C/d][C/d][D/d][D/d]
can you understand what I mean (by all the different letters and upper/lower case and '/'?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Simple line doubling -- Possible?

Post by BradleyS »

Looks like you want bobbing but maybe have a field order issue? Not entirely sure.
Deleted User 13735

Re: Simple line doubling -- Possible?

Post by Deleted User 13735 »

The best beginning tutorials on field order, field dominance, and adaptive interpolation were written on the VirtualDub forum by Donald Graft aka
neuron2
, who coincidentally is the father of of "Bob," the deinterlacer. You have to dig, because the discussions go back twenty years, but the education from the horse's mouth is irreplacable.
Or, you can reinvent the ubiquitous 'matrix with four variables,' expressed in linear form, whichever seem easiest to you.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

musicvid wrote: Thu Nov 14, 2019 7:25 pm The best beginning tutorials on field order, field dominance, and adaptive interpolation were written on the VirtualDub forum ...
Thanks for that. Unfortunately, the VirtualDub forum appears to no longer exist.

"Sorry, the VirtualDub forums have been closed, and as of this date (22 Oct 2015), it's now down. I was going to leave it up in read-only mode longer, but someone decided to run a web spider that pulled 100GB+ in less than a month, which is threatening to blow my bandwidth allocation."
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

PS: I tried archive.org for both 'http://virtualdub.everwicked.com/' & 'http://forums.virtualdub.org/', but it appears that only forum index pages were archived, not topic threads.
Deleted User 13735

Re: Simple line doubling -- Possible?

Post by Deleted User 13735 »

Well crap, I'll look on Donald's site and around Doom. Sorry for being a stick-in-the-mud.
https://s3.eu-central-1.amazonaws.com/l ... 730574.jpg
Last edited by Deleted User 13735 on Thu Nov 14, 2019 9:05 pm, edited 1 time in total.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

A 2-bit Karnaugh map?... of what? Field Dominance? Hey, I'm not into the kinky stuff. :lol: :roll:
Deleted User 13735

Re: Simple line doubling -- Possible?

Post by Deleted User 13735 »

Sounds again like you're someone who needs to figure out everything for himself. Good luck.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

I'm very amenable to help, both getting & giving. Your Karnaugh map has no context, so it's difficult to guess what it's trying to convey. That's all.
markfilipak
Bright Spark User
Posts: 313
Joined: Thu Aug 01, 2019 8:58 pm

Re: Simple line doubling -- Possible?

Post by markfilipak »

PS: Actually, it's a 3-bit Karnaugh map (or, from the dividers in the NE & SW quadrants, maybe a 4-bit map). I can assume that 'Right' and 'Wrong' pertain to the 'Field Order' input (which makes the map quite non-standard), but then I don't know what to conclude about 'Field Dominance'.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Simple line doubling -- Possible?

Post by rollin_eng »

I would just assume musicvid is full of rubbish as usual.

Edit:Perhaps this was a bit harsh, if so please accept my apologies.
Last edited by rollin_eng on Sat Nov 16, 2019 7:28 pm, edited 2 times in total.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Simple line doubling -- Possible?

Post by BradleyS »

@rollin_eng You're welcome to your opinion, but also treading a bit on our forum rules and code of conduct. Care to revise?

Edit: Thank you!
Deleted User 13735

Re: Simple line doubling -- Possible?

Post by Deleted User 13735 »

As always, anyone is welcome to respond by sharing their own research, tests, learning experiences, and fun math facts related to the discussions. Lacking any and all of that, it is still fine to disagree, but without being disagreeable. Expectations are high.
Post Reply