Go Back    Forum > Digital Video > Video Project Help > Restore, Filter, Improve Quality

Reply
 
LinkBack Thread Tools
  #21  
05-16-2017, 03:02 PM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
Originally Posted by sanlyn View Post
There's no quality loss with lossless codecs, so I have no idea what you mean.
I deleted the Ut file so I can't screengrab, but there was...smudging, I guess would be the best way to describe it. Some sort of motion blur or something. Almost like overly-aggressive denoising, but an uncompressed file with identical settings didn't have the same issue.

Quote:
What's wrong with doing your edits on a 50p video in Adobe and outputting the edits as 50p? Take that 50p edited Adobe output:
Well, I'd then have to reimport that. So regardless of which way I do it, there are inefficiencies. I'm just trying to find the method that has the least. For most tapes I'm also doing a version that's run through lordsmurf's script...it adds up.

Would Spline36Resize be the way to go for 720p50?
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
05-16-2017, 03:08 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
And by the way:

Quote:
Originally Posted by koberulz View Post
and create a DVD-compliant MPG (with GOPs where I want chapter markers).
With DVD, the max limit for PAL GOP is 15 frames. Chapter points are an authoring function, not an encoding function.

Quote:
Originally Posted by koberulz View Post
Would Spline36Resize be the way to go for 720p50?
You can try that by itself, or experiment with this which many say is better for upscaling from SD:
Code:
nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
Reply With Quote
  #23  
05-16-2017, 03:44 PM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
Originally Posted by sanlyn View Post
With DVD, the max limit for PAL GOP is 15 frames. Chapter points are an authoring function, not an encoding function.
Premiere allows you to insert chapter markers into a sequence, and when it encodes it ensures there's a GOP there so the chapter point in the authoring program can land exactly on that frame, rather than merely being at the nearest randomly-placed GOP.
Reply With Quote
  #24  
05-16-2017, 04:52 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
I understand that, and you can also encode so that a scene change starts a new key frame or GOP. A chaptyer won't go there until it's authored.

Quote:
Originally Posted by sanlyn View Post
Quote:
Originally Posted by koberulz
Would Spline36Resize be the way to go for 720p50?
You can try that by itself, or experiment with this which many say is better for upscaling from SD:
Code:
nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
No wait a minute, that won't work for a 4:3 image. Now this crazy workflow has me going in circles!


Let's change that. you need a 960x720 image in a 1280x720 frame. So you can try it two ways:

method A:
Code:
Spline36Resize(960,720)
AddBorders(160,0,160,0)
method B:
Code:
nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=960, fheight=720)
AddBorders(160,0,160,0)
I have a feeling that method "A" will have less blur to it, because nnedi3_rpow2 actually resizes twice -- once to get a straight 2x resize the complicated nnedi3 way, then spline36resize to exactly 960x720. I don't have a good sample of your videos around to try it both ways.
Reply With Quote
  #25  
05-17-2017, 04:53 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
I have HD2SD, which also has SD2HD, not sure how that handles things though.

What's the best way to run that lordsmurf script? It expects interlaced at present, but it seems a waste to run that script, go through all my other work, and then do the same thing all over again without that script.

Essentially I do one version with the lordsmurf script and one version without, then watch the footage through and if there are bad dropouts or whatever at any point, I drop the LS version over the top. That way I can still get the detail of not having that script (you know, minor things like the ball), but also utilise its cleanup power when necessary.

EDIT: And for square-pixel output, why 640x480? Why not 720x526?

Last edited by koberulz; 05-17-2017 at 05:36 AM.
Reply With Quote
  #26  
05-17-2017, 07:14 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
SD2HD is worth a try. HDtoSD has been replaced with iResize for better control of line twitter and other downscaling defects. A recent version is posted here: https://forum.videohelp.com/threads/...on#post2368998.

Internet posts usually require square-pixel progressive frames. 720x576 on the internet won't play at 4:3, but at 5:4. If your 720x576 is 16:9 anamorphic instead of 4:3, resize to square pixel 16:9 such as 856x480 or smaller frames.

For your personal use anamorphic video at 4:3 or 16:9 can be coded into mp4 for the proper display aspect ratio without resizing. mp4 encoding can accept 16:9 and 4:3 display aspect ratios, but anamorphic wont usually work on online 'net media players.
Reply With Quote
  #27  
05-17-2017, 07:18 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
720x526, not 720x576.

Basically, why downscale in both directions rather than just shifting one direction until it'll work as square pixels?
Reply With Quote
  #28  
05-17-2017, 07:32 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Quote:
Originally Posted by koberulz View Post
720x526, not 720x576.

Basically, why downscale in both directions rather than just shifting one direction until it'll work as square pixels?
720x526 is neither 4:3 nor 16:9, is not PAL spec, and the height is mod2 only which will be problematic for interlaced video chroma in 4:2:0 or 4:1:1 YV12. It will also be problematic for many Avisynth filters that expect mod8 in all dimensions.

You can keep the height and resize horizontally, of course. To-spec PAL SD at 16:9 would be 1024x576, at 4:3 it would be 768x576.

If you want 4:3 at a width of 720, the height would be 536 (which is mod8), not 526, and still wouldn't be exactly 4:3 but close.
Reply With Quote
  #29  
05-17-2017, 07:38 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
720x526 is neither 4:3 nor 16:9
I created a square-pixel PAL 4:3 document in Photoshop and resized the width back down to 720; it set the height at 526. Although it started at 788x576, not 768...so no idea.

If this is just a delivery format for web use, are PAL spec, interlaced chroma and AviSynth filters relevant?
Reply With Quote
  #30  
05-17-2017, 07:52 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
The internet is square pixel pogressive, not anamorphic. Make it any size you want. Web players won't adjust the display aspect ratio. If they don't like it, they'll let you know.

I have no idea how adobe is resizing. IF the original was 788x576, that's 1:37:1, not 1.333:1, and I have no idea where it came from. Mod2 vertical dimensions won't work for YV12 unless it's progressive. You want odd frame sizes or mod2 work, go ahead. The fact that adobe lets you do it without throwing errors is another reason why I don't use it.
Reply With Quote
  #31  
05-17-2017, 08:08 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
I was just resizing a document in Photoshop, it doesn't have a clue why I'm doing it and has no reason to complain.

Photoshop's widescreen square pixel is 1050x576, not 1024. So they're both wider than your stated dimensions.
Reply With Quote
  #32  
05-17-2017, 08:33 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
More reasons why I don't use Adobe for resizing. You should be setti8ng youir own frame dimensions. With 1050x576, what is the aspect ratio? Note: it's not 16:9.
Reply With Quote
  #33  
05-18-2017, 01:11 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
Originally Posted by koberulz View Post
What's the best way to run that lordsmurf script? It expects interlaced at present, but it seems a waste to run that script, go through all my other work, and then do the same thing all over again without that script.
I believe this got skipped over.
Reply With Quote
  #34  
05-18-2017, 08:06 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
First, you have to browse through that script and see what it's doing. It's not necessary to understand every detail such as exactly how the Manalyze lines actually work (they're adapted straight out of mvtools documentation, in case you haven't read it), but some things are obvious. For instance you'll see "SeparateFields()" at the beginning of the top procedure, then two other functions are called, and at the bottom of that top procedure you'll see "Weave()", which is an operation that has to follow SeparateFields at some point. Comment-out those two lines and you can use it on progressive video if necessary.

Why would you have to do everything over again? If you have a filtered script and you still have those ripples and dropouts, run the routine on the results you have. It doesn't change your previous filters or color corrections. The main idea behind lossless codecs is that you can save your work as lossless media.

Otherwise, starting at an earlier point, if you have a video and you see particular problems you have to map out beforehand what you expect is required and plan accordingly. If you have to intervene with something like Adobe, that will be part of the planning. You might need more than one intermediate stage, and that's not unusual. I sometimes use AfterEffects for color and timeline work -- in that case it requires a lossless intermediate that I will convert to RGB in Avisynth with 16-bit dither tools and then open in AE and save out of AE as lossless AVI. I had a slide show project with hundreds of photos, each sequence planned out in detail with individual resizing and composing, zooming and panning in AE with Ken Burns effects, audio and title overlays, and whatnot. I can't count the number of times I had to redo a simple sequence two or three times before it fit the running script. Then I had to join multiple lossless segments out of AE into an encoder and then author for disc.

I know you have some big files, but I had several 6-hour color captures that needed extensive cleanup and edits that required more than 250GB of intermediate files before I did the encoding, and the encoding wasn't done in Adobe. I've had 2-hour VHS movies that needed multiple intermediates, had to be joined in yet another round of intermediates, then were assembled in the encoder and encoded in one shot with pulldown applied for the final output to avoid pulldown cadences changes in the final version. I've had plenty of long videos that required different scene-by-scene filter changes, taking weeks to complete, that had to be joined for the final encoding. So what you describe isn't unusual. It's par for the course with problem videos, of which I and others have had plenty to deal with. I've had MPEG's that had to be demuxed into elementary video and audio streams so that pulldown could be applied to 20fps film video in DGPulddown to make it 25fps PAL or 29.976 fps NTSC, then remuxed in a smart rendering editor for edits and authoring. I worked on one truly horrific 3-hour opera transfer from tape directly to DVD that took 14 months to complete (the video didn't even belong to me, but it was my baptism of fire into Avisynth). With that project I saved hundreds of intermediate files and scripts on a USB and optical discs in hopes that one of these days I can do an even better job, as there are still a lot of unsolved problems with the final. You have to think ahead, and sometimes you have to drop back and rework something that gets blended back into the final. If you're dealing with an NLE that impedes that process, you should alter the workflow accordingly.
Reply With Quote
  #35  
05-18-2017, 09:05 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
For instance you'll see "SeparateFields()" at the beginning of the top procedure, then two other functions are called, and at the bottom of that top procedure you'll see "Weave()", which is an operation that has to follow SeparateFields at some point. Comment-out those two lines and you can use it on progressive video if necessary.
Right, but when we were working through RemoveSpots() previously, you talked about how SeparateFields() got different results to operating on originally-progressive footage, so I wasn't sure if that was the case here.
Reply With Quote
  #36  
05-18-2017, 09:31 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
SeparateFields() with RemoveSpots broke the video into smaller segments and separated fileds in which a spot or rip extended over multiple images. RemoveSpotsMC is a temporal filter -- if noise stays the same for 2 or 3 frames, the nosise isn't considered noise. Temporal filters look at the way images change over time. If something doesn't change, it isn't seen as noise. If you break the images into disparate pieces, the same noise would appear in one group of images but not in the other group, so in one of those groups the noise would be treated as a disturbance that doesn't belong there.

Not all filters can be used in this manner. Some filters that require progressive video will distort alternate lines if SeparateFields is used because alternate lines don't appear in the same place in both images and will be reassembled incorrectly during the weave process. It takes experiementation to tell which method works best which different filters. If you want to break up the frame sequence using deinterlaced full-frame video, separate Even and Odd frames, process them separately, then interleave into the original order when filtering is done.

There have been examples of using either separatefieds() or treating alternate frames in these forums. The chroma cleaner chubbyrain2 is one filter that has been used both ways. MCTemporalDenosie is another, although MCTD has a parameter that can be set to work with interlaced video. One filter that's only partially effective with SeparateFields() is dfttest.

[EDIT]With the RemoveSpots example you overlooked the fact that in many cases SepaateFields(0 was followed by filtering even and odd fields separately, then reassembling them:
Code:
SeparateFields()
a=last
e=a.SelectEven() + filters ... filter, etc.
o=a.SelectOdd() + filters ... filter, etc.
Interleave(e,o)
Weave()
... more procesing ....
return last

Last edited by sanlyn; 05-18-2017 at 09:46 AM.
Reply With Quote
  #37  
05-25-2017, 05:02 AM
lordsmurf's Avatar
lordsmurf lordsmurf is online now
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,632
Thanked 2,458 Times in 2,090 Posts
Method 1 = Don't.
Method 2 = Deinterlace all.
Method 3 = Interlace all.

If for web streaming, deinterlace interlaced footage, then merge with progressive.

Broadcasts can actually handle mixed interlaced/progressive, if done correctly with the TS streams.

Doing everything twice is indeed the best: interlaced for interlaced, progressive for progressive. Many people would get bored at the triage required when you work for studios. You encode lots of things lots of ways. Sometimes you can automate, sometime not.

50p, 25p, 50i, 25i ... oh goody. What fun. PTSD flashbacks to studio work.

I need more detailed source details. Long thread, but I never saw it. The conversation is too broad for simple interlaced vs. progressive when you start getting into non25/30 framerates. (Ditto for NTSC/PAL mixing.)

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #38  
05-27-2017, 10:53 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
Originally Posted by lordsmurf View Post
Method 1 = Don't.
Method 2 = Deinterlace all.
Method 3 = Interlace all.
I'm not 100% sure but this sounds like you're thinking of a combined progressive/interlaced source project?

Quote:
I need more detailed source details. Long thread, but I never saw it. The conversation is too broad for simple interlaced vs. progressive when you start getting into non25/30 framerates. (Ditto for NTSC/PAL mixing.)
Just my PAL VHS tapes that I've been working with. So there's no need to combine different source frame rates, interlace flags, sizes, or whatever else. Just after the best way of getting those 576i25 sources into a web-compatible format while retaining an interlaced intermediate for DVD encoding (as the required bitrate may vary based on other content used, or different tapes may even be combined into highlights or something, so I don't want to just go straight to an MPEG file).
Reply With Quote
  #39  
05-28-2017, 12:09 PM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 1,323
Thanked 334 Times in 276 Posts
If uploading to YouTube, you should upscale the content because:
  1. They don't support 576. It would be downscaled to 480p.
  2. Each quality level they offer uses better-quality encoding than every lower level. Nowadays their best quality is at 2160p or above, but perhaps it's not worth going above 1080p since there are diminishing returns for upscaled video. If uploading at 2160p and then viewing on a 1080p display, you would also have to weigh the impact of double-scaling artifacts vs compression artifacts.

Of course, web streaming quality is bad to begin with, so I don't know how much you care about making it less-bad.
Reply With Quote
  #40  
07-28-2017, 10:58 AM
koberulz koberulz is offline
Premium Member
 
Join Date: Feb 2016
Location: Perth, Australia
Posts: 453
Thanked 3 Times in 2 Posts
Quote:
Originally Posted by sanlyn View Post
I understand that, and you can also encode so that a scene change starts a new key frame or GOP. A chaptyer won't go there until it's authored.

No wait a minute, that won't work for a 4:3 image. Now this crazy workflow has me going in circles!


Let's change that. you need a 960x720 image in a 1280x720 frame. So you can try it two ways:

method A:
Code:
Spline36Resize(960,720)
AddBorders(160,0,160,0)
method B:
Code:
nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=960, fheight=720)
AddBorders(160,0,160,0)
I have a feeling that method "A" will have less blur to it, because nnedi3_rpow2 actually resizes twice -- once to get a straight 2x resize the complicated nnedi3 way, then spline36resize to exactly 960x720. I don't have a good sample of your videos around to try it both ways.
Are you sure you've got that math right? SD2HD has the picture significantly wider than the Spline36Resize script:
sd2hd.jpg
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Cine film conversion, interlaced vs. progressive? Sparx Capture, Record, Transfer 3 08-28-2016 04:28 PM
Capture interlaced, but how to to keep video interlaced when making DVDs? premiumcapture Encode, Convert for discs 11 12-21-2013 03:40 PM
Interlaced video to progressive (double frame rate) metaleonid Edit Video, Audio 23 09-29-2013 09:51 PM
Interlacing on HD progressive displays? admin Capture, Record, Transfer 2 12-02-2009 12:42 PM
Interlaced vs. non-interlaced artifacts? via Email or PM Capture, Record, Transfer 1 04-16-2009 05:37 PM

Thread Tools



 
All times are GMT -5. The time now is 08:07 PM