What's new

Tips for creating "anamorphic" from "non-anamorphic" video capture? (1 Viewer)

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Ow...my head hurts now. But I'll be more aware of what needs to happen when splicing segments together for the next time. Thanks mucho!
 

Rob Gillespie

Senior HTF Member
Joined
Aug 17, 1998
Messages
3,632
I also use IVTC.

My point was, that Pat seems to be going through several steps to achieve 16:9 when TMPGEnc allows you to do it by changing one setting.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Okay, now that I've been shown the light and streamlined the process, here's what I've done to get pretty good results now to create a 16x9 m2v from an interlaced letterboxed video source. I've bypassed VirtualDub (previously used for cropping and IVTCing. I handle the AC-3 audio portion separately (and mux it back later in the DVD authoring stage):

1. Canopus DV File Converter

I run the original captured AVI file through the Canopus DV file converter and select "Target Format = Premiere compatible Canopus AVI (AVI 2)". I had tried using "Canopus Reference AVI" but I didn't like the comb effects from the resultant converted AVI file. (I might have to play around to see if TMPGEnc can handle "Canopus Reference AVI" if I get some time.)

2. TMPGEnc encoding

On the main TMPGEnc window (bypass any wizard dialogue screens):

Video Source -> Browse to select the Canopus Reference AVI video file just created.

Select "ES (Video Only)"

Audio Source -> Erase the audio file name populated automatically. No audio file will be used at this stage.

Output File Name -> filename.m2v (this is used later to mux with an AC-3 file in a DVD authoring program to produce the files for a DVD).

Click on "Setting" button on the bottom right corner:

Video tab:

Stream type = MPEG-2 Video
Size = 720x480
Aspect ratio = 16:9 Display
Frame rate = 23.976 fps (internally 29.97 fps), gets populated when Encode mode is selected.
Rate control mode = 2-pass VBR(VBR)

=> Frame Rate Control mode -> Setting
-> Average bitrate =4550 (this goes up or down depending on running time of the film, this seems to work for a 125 minute film)
->Maximum bitrate = 9100
->Minimum bitrate = 1800
->Max pass = 2 pass
->P picture spoilage = 0
->B picture spoilage = 20

Click "OK" to exit Frame Rate Setting

Profile & Level = Main Profile & Main Level (MP&ML)
Video Format = NTSC
Encode mode = 3:2 pulldown when playback
YUV format = 4:2:0
DC component precision = 10 bits
Motion search precision = High Quality (Slow)

-----
Advance tab:

Video source type = Interlace
Field order = Bottom field first (field B) 720 = width, height is usually 4/3 times the number of pixel of the new cropped video file's height. If cropped height was 300 pixels, then use at least 400 in this new height to stretch the video during encoding (I used 412 to get the video frame a little taller).

There's a bunch of filters below that are quite useful and necessary:

"Inverse telecine" should be clicked if the video if from a film source shot in 24 fps.

"Clip Frame" (Used to get rid of the black bars on the top and bottom of the frame and crops the video being encoded):
For my particular video, I used:
Top = 90
Bottom = 90
to snip off the top 90 lines on top and 90 lines from the bottom.
Use the scroll bar to move around the film to make sure you aren't clipping too much. You might have to play around with the previously mentioned "Custom Size" to get the right height on the final m2v file.

"Noise reduction" is a personal preference thing, feel free to experiment with it and without it (and playing around with the levels of noise reduction and how little or how much smoothing you prefer). For this project I used "Still picture = 10", "Range = 1", and "Time axis = 10" to get a little bit of smoothing without losing a ton of detail in the encoding.

"Simple color correction" was used to darken this particular video file "-1", and I also dropped the Red by "-10" to get rid of some redness in the faces of the actors. Feel free to play around with the setting and toggle the "enable" box to see the results of the changes.

------
GOP structure tab:

Number of I picture in GOP = 1
Number of P picture in GOP = 7
Number of B picture in GOP = 1
Output interval of sequence header = 1 GOP
MAX number of frames in a GOP = 18

Click on "Output bitstream for edit (Closed GOP)"
Click on "Detect Scene change"

----
Quantize matrix tab:

Default

Click on "Output YUV data as Basic YCbCr not CCIR601"

-------

And then hit OK button to make the settings active for this encoding session (you can also save these settings under "Save" in the bottom right corner of the window), then hit the "Start" button to start the encoding process.
 

Rob Gillespie

Senior HTF Member
Joined
Aug 17, 1998
Messages
3,632

Mine is Full Screen (keep aspect ratio). Which basically keeps things as they are doesn't move or do anything with the display. The actual 16:9 bit is controlled soley by the aspect ratio setting mentioned above.

I know with TMPGEnc there are more than one way to achieve the same result, but give mine a go and see if it comes out any different.

btw I don't do any cropping or resizing except for the 'clip frame' option which is used to black-out the letterboxing borders to pure black.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Okay, I've tried it Rob's way, and we are getting to the same point through different paths, but both work, and Rob's way does automate the aspect ratio calculation by making TMPGEnc to do the work for you if you get the other parameters correct. Here's Rob's way (changes in bold text), which is more automated and provides good results: :emoji_thumbsup:

1. Canopus DV File Converter

I run the original captured AVI file through the Canopus DV file converter and select "Target Format = Premiere compatible Canopus AVI (AVI 2)". I had tried using "Canopus Reference AVI" but I didn't like the comb effects from the resultant converted AVI file. (I might have to play around to see if TMPGEnc can handle "Canopus Reference AVI" if I get some time.)

2. TMPGEnc encoding

On the main TMPGEnc window (bypass any wizard dialogue screens):

Video Source -> Browse to select the Canopus Reference AVI video file just created.

Select "ES (Video Only)"

Audio Source -> Erase the audio file name populated automatically. No audio file will be used at this stage.

Output File Name -> filename.m2v (this is used later to mux with an AC-3 file in a DVD authoring program to produce the files for a DVD).

Click on "Setting" button on the bottom right corner:

Video tab:

Stream type = MPEG-2 Video
Size = 720x480
Aspect ratio = 16:9 Display
Frame rate = 23.976 fps (internally 29.97 fps), gets populated when Encode mode is selected.
Rate control mode = 2-pass VBR(VBR)

=> Frame Rate Control mode -> Setting
-> Average bitrate =4550 (this goes up or down depending on running time of the film, this seems to work for a 125 minute film)
->Maximum bitrate = 9100
->Minimum bitrate = 1800
->Max pass = 2 pass
->P picture spoilage = 0
->B picture spoilage = 20

Click "OK" to exit Frame Rate Setting

Profile & Level = Main Profile & Main Level (MP&ML)
Video Format = NTSC
Encode mode = 3:2 pulldown when playback
YUV format = 4:2:0
DC component precision = 10 bits
Motion search precision = High Quality (Slow)

-----
Advance tab:

Video source type = Interlace
Field order = Bottom field first (field B) gets greyed out.

There's a bunch of filters below that are quite useful and necessary:

"Inverse telecine" should be clicked if the video if from a film source shot in 24 fps.

"Clip Frame" (Used to get rid of the black bars on the top and bottom of the frame and crops the video being encoded):
For my particular video, Use whatever it takes to only have the video portion showing. For my example:
Top = 108
Bottom = 111
to snip off the top 108 lines on top and 111 lines from the bottom. TMPGEnc automatically comes up with the right Video Arrange Method WxH pixel numbers. Use the scroll bar to move around the film to make sure you aren't clipping too much.

"Noise reduction" is a personal preference thing, feel free to experiment with it and without it (and playing around with the levels of noise reduction and how little or how much smoothing you prefer). For this project I used "Still picture = 10", "Range = 1", and "Time axis = 10" to get a little bit of smoothing without losing a ton of detail in the encoding.

"Simple color correction" was used to darken this particular video file "-1", and I also dropped the Red by "-10" to get rid of some redness in the faces of the actors. Feel free to play around with the setting and toggle the "enable" box to see the results of the changes.

(If I use the originally captured AVI file, it usually comes out darker, and the color correction requires me to bump up the brightness, usually over 10-15, plus I get this weird faint vertical striations that go away when I process it through the Canopus DV file converter.)

------
GOP structure tab:

Number of I picture in GOP = 1
Number of P picture in GOP = 7
Number of B picture in GOP = 1
Output interval of sequence header = 1 GOP
MAX number of frames in a GOP = 18

Click on "Output bitstream for edit (Closed GOP)"
Click on "Detect Scene change"

----
Quantize matrix tab:

Default

Click on "Output YUV data as Basic YCbCr not CCIR601"

-------

And then hit OK button to make the settings active for this encoding session (you can also save these settings under "Save" in the bottom right corner of the window), then hit the "Start" button to start the encoding process.
 

Wayne Bundrick

Senior HTF Member
Joined
May 17, 1999
Messages
2,358
Sounds like a winning recipe.

TMPGenc should be able to work with Canopus reference AVI files, and it's supposed to be a little smarter about finding the segmented video files referenced by the .AVI file if you open the AVI file across a network or the drive letters/paths have changed otherwise. Normally you can't move the video to another folder or else Canopus loses track of things.

But there's no point using reference AVI if AVI2 works.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Just a sidenote, using Rob's method, if you don't crop enough lines to get to a 16x9 aspect ratio, you'll get the video with some side bars added to the video image as it gets letterboxed to keep the aspect ratio consistent.

I was playing around with a Criterion LD and wanted to see what would happen if I only cropped to the blue "Criterion" square at the start of the video file (which meant cropping only 50 lines at the top and 60 lines at the bottom). It's the same effect when you see anamorphic transfers of films with a 1.66 aspect ratio (where you'll see sidebars).

Then I decided I could without maintaining that Criterion graphic and didn't need to crop so little (thus wiping out most of the blue "Criterion" graphic) and went back to cropping over 100 lines each at the top and bottom to get near the 2.35 aspect ratio. :)
 

Ken Chan

Senior HTF Member
Joined
Apr 11, 1999
Messages
3,302
Real Name
Ken
16x9 should be exactly 360 (3/4 of 480) pixels tall. With the 704 source setting, the stretched picture fits exactly in "16:9 Display" "Full screen (keep aspect ratio)", with neither bars nor cropping. Not so with the other setting.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
You know, I was going to tinker with the 720x480 vs. 704x480 setting (because it was bothering me a little as well), but glad we are zeroing in on a good recipe for this pursuit. Thanks for the heads-up and the link too.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Just as an exercise, I'll be seeing if creating M2V files with a high bitrate (like over 9000) that are 2 hours in length (and would take up 8Gb of disk space) and then compressing them with Intervideo's DVD Copy will yield a better looking video that would fit on one 4.3GB recordable DVD, then just creating the M2V files with bitrates around 4700. I'll report back the results when I get some time later tonight to check out the results.

I'll be authoring/creating a DVD's Video_TS folder with files that take up more than 8GB, and then I'll use DVD Copy to compress it down to fit on the single DVD recordable. Supposedly their compression technology is very good, based on some comparison tests screen shots I've seen.

DVD Copy doesn't undermine DVD CSS encryption, uses UniPass technology to do the burning, and is used more by people creating their own DVDs from personal video footage, and needing to copy them.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Well, the experiment is over, and I won't be using DVD Copy to crunch up DVDs because the resulting DVD video exhibits this faint pulsating artifact that makes watching the final product not so pleasing to the eye if you are aware of it.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
I discovered that by clicking on the "Detect Scene change" box, the video would freeze for a split second during some (not all) scene changes. So I tried clicking off the box, and it appears that the m2v file plays more smoothly, without any freezes in video playback at the spots where I noticed freezing before.
 

Ken Chan

Senior HTF Member
Joined
Apr 11, 1999
Messages
3,302
Real Name
Ken
That's actually in the MPEG? So does it end up skipping video frames, so that the audio stays in sync?

Detecting scene changes should not only improve quality, by putting whole I-frames when there's a major change, but by having those I-frames, you can put chapter stops right on those scene changes. One disadvantage of using those longer GOPs (18 frames is the max for NTSC DVD) is less accuracy for chapter stops, because they have to go at the beginning of the GOP, where the I-frame (usually) is.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Oops, haven't quite updated my adventures in this endeavor lately.

I'm not sure if it skips frames to keep audio in sync. I've been pre-occupied with recovering the actual frames out of the LD's interlaced captured video file by using IVTC.

So now, I've finally grokked most of what Ken and Wayne was typing on page one, I've even grokked frameserving! I've also discovered that TMPGEnc wasn't doing a good enough job at IVTC when the captured video file has many places where the 3:2 changes cadence. I even used TMPGEnc to re-tag the frames as I noticed the changes in 3:2 cadence during scene changes and splices, but the resultant encoded file just didn't look as good as I knew it should look as I tried to recover the progressive 24fps nature of film.

For my current project, Blade Runner (Criterion LD) I was getting scrolling text at the beginning of the film to look shifty and not solid as it scrolled upwards, so I knew something was wrong, even though the right frames appeared to be tagged (in a red border in the IVTC section).

So, I did some more fiddling around, and the results could be promising:

Segmenting the video file:

I wrote down all the places where the 3:2 changed on my captured video file. Yes, this can be somewhat time-consuming, but once you get the rhythm of the process, it goes quicker than in the beginning. Then I used VirtualDub to do the IVTC on each segment of the video file, and saved each segment using HuffyUV compression to keep the file segments small as possible without losing video quality. For this particular file, I wound up with 10 segments. I did have to play around with the Offset in the IVTC setting for each segment, plus I used "reverse polarity" for all of the IVTCing of the segments. I also had to watch the second video window to make sure I had the Offset number correct during the IVTC process to create the new segments (you'll see the interlaced video instead of solid film-like video in the second window if you have the Offset wrong, so you just keep adjusting it if you haven't figured out how to pick the correct Offset number, which also starts to come naturally as you look at the pattern of good frames and interlaced frames from the starting point of the segment in question).

Once I had all 10 of my segments saved to the hard drive, I then used VirtualDub, opened up the first segment, and then appended all the subsequent segments in sequential order. At this point, I didn't do any saving/creating of the newly appended file. I used VirtualDub as a Frameserver to basically "glue" all the segments together temporarily without having to write a large video file to the hard drive as I used TMPGEnc to create the encoded file for DVD.

In TMPGEnc, for the source file type being processed, I used the "Non-interlaced" type. I also used Encoding = "3:2 Pulldown during playback", and framerate = "23.974fps, (29.97 internally)". I also clip the frame to get the 16x9 framing so that it'll play back like an anamorphic transfer on the DVD player. The resulting encoded file looked much better/smoother/film-like than manually trying to use TMPGEnc to do the IVTC "on-the-fly" during the encoding.

Now I have smooth playback of the scrolling text, and there was this one bit of film that looked horrible as the interlaced bits caused the diagonal lines in this one scene to stick out like a sore thumb, but now it's silky smooth as it should have been in the first place (for "Blade Runner", right before Decker shows up at Tyrell Corporation, right before you see the first shot of the owl's face, as his ship is flying over this building structure that has nasty diagonals in the shot).

When I get home (left the PC burning the DVD before I had to leave for work), I'll be able to see if lip-sync is a problem, in case the absence of a few frames might have caused the audio to get just a wee bit out of sync.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
There are about 14-18 frames that don't make it back into the final progressive video file, and that's just under a second between the original file, and the new file. I wound up snipping a little bit here and there around the segment end/start points to get the lip sync to match as the film gets to the second hour.

What I did notice is that there was some bad ADR in Blade Runner the closer I watch for lip sync. I had to resort to matching action noises in scenes because of the so-so ADR.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Re: audio sync, what seems to work is to snip 0.1 seconds of audio near the splice points for each segment. I simply edit a copy of the Wave file I have made from the original captured video file, and then convert that back to an AC3 file to be used in the authoring portion for the DVD creation. That keeps the dialogue right on cue for my test project.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
I've found another way to sync up the audio:

From the 10 new progressive video segments from the IVTC process with VirtualDub, I was able to then use VirtualDub to strip out the audio for each segment, and then saved each one as a wave file. Once the files are created, I simply used a wave editor to append them into one long wave file, saved it, and then converted it over to an AC3 file.

This method gets rid of the guesswork of snipping out the miniscule bits of audio that accompany the frames get lost during the IVTC process. It's very hard to discern any loss in audio at the splice points now. And this new AC3 file syncs up just right with the LD's audio/video output.
 

Patrick Sun

Senior HTF Member
Joined
Jun 30, 1999
Messages
39,669
Now I think I've figured out how to use TMPGEnc to do the IVTC after all. Once I mark all the frames I want it to process, I have to remember to change the Source type from "Interlaced" to "Non-Interlaced/Progressive" on the second tab of the Settings. This seems to work correctly (and removes the need to use VirtualDub to do the IVTC and the frameserving once I get to the encoding stage). In the past, I had the Source type on "Interlaced" and the output of the encoded file was a mess, lots of combing on display. Now using Source type = "Non-Interlaced" the output is what I expect it to be.
 

Users who are viewing this thread

Sign up for our newsletter

and receive essential news, curated deals, and much more







You will only receive emails from us. We will never sell or distribute your email address to third party companies at any time.

Forum statistics

Threads
357,052
Messages
5,129,666
Members
144,281
Latest member
blitz
Recent bookmarks
0
Top