VideoHelp Forum
+ Reply to Thread
Results 1 to 25 of 25
Thread
  1. I have an Xvid video that is 512 x 384. I need to upscale this to 704 x 480 (I presume it will still be in proportion?). What is the best way of doing it? I looked at the Nnedi3 readme but I'm still not sure what I need to do.
    Quote Quote  
  2. Code:
    nnedi3_rpow2(2, cshift="LanczosResize", fwidth=704, fheight=480)
    Subtitute another AviSynth resize algorithm if you want (BilinearResize, BicubicResize, Spline64Resize, etc.).

    Or you could do it as two separate operations:

    Code:
    nnedi3_rpow2(2) # double width and height
    LanczosResize(704,480)
    The display aspect ratio will only be 4:3 if you set the DAR to 4:3 or the PAR to 10:11.
    Quote Quote  
  3. Thanks that works. Why does it have "LanczosResize" mentioned in the cshift though? I just want to use nnedi3 as it leaves fewer artifacts than LanczosResize (from my experience of using the following to upscale 352 to 704):

    turnleft().nnedi3(dh=true).turnright()
    Quote Quote  
  4. Also do you have any idea how I can demux an Xvid file as TSmuxer won't touch it? I need to demux it so I can remux the audio with the avisynth encoding.

    I also need to convert it from PAL 25 fps progressive to NTSC 29.97 fps interlaced. Should I just do the following to do that?

    QTGMC(Preset="Super Fast")
    AssumeTFF() # What should I have instead of this as the footage is progressive at this point.
    ConvertFPS(29.97)
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    Quote Quote  
  5. nnedi3 only upscales by powers of 2 (ie, 2x, 4x, 8x...). The LanczosResize is used to downscale from 1024x768 to your desired 704x480.

    You can demux the audio from an AVI file with VirtualDub (though it will come out as a WAV file). VirtualDubMod can demux the audio as AC3, MP3, etc.

    At the point where you have AssumeTFF() you are controlling whether the output after Weave() is TFF or BFF.
    Quote Quote  
  6. Originally Posted by VideoFanatic View Post
    Why does it have "LanczosResize" mentioned in the cshift though?
    You can name any resizer you like. Somehow you have to get it from heightx2 and widthx2 back to your final resolution
    I also need to convert it from PAL 25 fps progressive to NTSC 29.97 fps interlaced. Should I just do the following to do that?
    You definitely shouldn't do it as you wrote below that line. Why do you want to convert a progressive source to interlaced output? If for DVD and you don't want to slow it to film speed, just encode as progressive 25fps and add in pulldown afterwards to get to interlaced 29.97fps.

    If you insist on hard-telecining it (bad idea), use ChangeFPS rather than ConvertFPS.
    Last edited by manono; 20th Feb 2013 at 01:44.
    Quote Quote  
  7. I didn't want to get into a discussion on frame rate conversions.
    Quote Quote  
  8. Originally Posted by jagabo View Post
    I didn't want to get into a discussion on frame rate conversions.
    Hehe, I was wondering about that myself.

    I'm figuring VideoFanatic doesn't know about DGPulldown and the better way to convert PAL to NTSC. But I could easily be wrong and he has some reason of his own for wanting to do what he's doing.
    Quote Quote  
  9. Member turk690's Avatar
    Join Date
    Jul 2003
    Location
    ON, Canada
    Search Comp PM
    Originally Posted by jagabo View Post
    I didn't want to get into a discussion on frame rate conversions.
    Not about frame rate conversions, but you did give me this script a few months past:

    Crop(0,60,-0,-60)
    nnedi3_rpow2(2, fwidth=720, fheight=480, cshift="LanczosResize")

    This intended to scale back to 720x480 an original letterboxed 4:3 clip after cropping off 60 pixels (the black bars) top and bottom. It works as intended and slanted-line stair-stepping is largely gone. The description of nnedi3, though, is it is a de-interlacer, (of the brutal throw-one-field-away type); is it then still important to ensure I use duly deinterlaced clips with this script (i found no problems using *.vob files straight off a video DVD (not film, not telecined, just plain interlaced 29.97fps))?
    For the nth time, with the possible exception of certain Intel processors, I don't have/ever owned anything whose name starts with "i".
    Quote Quote  
  10. I have a 704 x 480 MPEG2 NTSC interlaced video that was missing about 1 minute of video so I got the missing bit from a torrent (the video in question I'm talking about in this thread - it's 512 x 384 PAL progressive). My video editor will not read the joined video unless all parts of the video are the same resolution, frame rate and TV system (NTSC). Also I will be re-encoding the main video (combined with the missing bit) with Avisynth and in my encoder you need to select if you want the whole video to be interlaced or progressive. So I need to convert the torrent video to 704 x 480 NTSC interlaced.

    DGPulldown only accepts elementary streams but TSmuxer can't demux the AVI and I can't see any demux option in Virtual Dub so how do I get an elementary stream?. After using DGPulldown I would need to re-encode the video anyway as I'm upscaling so do you recommend I still use DGPulldown or should I do everything in a script?

    Is Nnedi3 the best option for resizing because won't it upscale to double the dimensions and then use Lanczos4Resize to downscale to the correct size? Would I not be better off using Lanczos4Resize to upscale to the correct dimensions in the first place otherwise I'd get more artifacts by doubling the resolution then downscaling?

    So basically I need to convert my 4:3 512 x 384 PAL progressive video to 704 x 480 NTSC interlaced. Would this script work?

    Code:
    QTGMC(Preset="Super Fast") 
    LanczosResize(704,480)
    ConvertFPS(59.94) 
    AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave()
    Quote Quote  
  11. Originally Posted by VideoFanatic View Post
    My video editor will not read the joined video unless all parts of the video are the same resolution, frame rate and TV system (NTSC).
    You wouldn't be able to join them in the first place unless they had those properties in common. However, since you'll be joining them to another already NTSC video, you've just made a case for slowing the PAL video and audio to film speed and encoding the video as progressive 23.976fps with standard pulldown. That's if the source video came from film. If the source for the progressive PAL video was originally NTSC video (not film), then the chances are good there are some very strange things going on within your progressive PAL 25fps video. It's very difficult to make a good conversion from interlaced 29.97fps video to progressive 25fps video.

    Also I will be re-encoding the main video (combined with the missing bit) with Avisynth and in my encoder you need to select if you want the whole video to be interlaced or progressive.
    Is the rest of it progressive 23.976fps with pulldown? Or hard telecined perhaps, and can be IVTC'd? Or was the main NTSC section shot on video? If the AVI is natively 25fps (was progressive 25fps before being made into an AVI), so should the rest of what you already have be progressive.

    Also, you can encode the different sections separately and join them together during authoring. I use Muxman for such things all the time. So, some can be encoded as interlaced, some as progressive with pulldown. It's usually a good idea to make sure the final frame of something that's going to have another piece joined to it afterwards be set as an I-Frame. I use CCE for this.
    DGPulldown only accepts elementary streams but TSmuxer can't demux the AVI and I can't see any demux option in Virtual Dub so how do I get an elementary stream?.
    What's DGPulldown have to do with an AVI? It's for adding various kinds of pulldown to MPVs (MPEG-2 video). You want to demux the AVI? I use VDubMod for such things. jagabo already mentioned that.
    After using DGPulldown I would need to re-encode the video anyway
    You use DGPulldown after encoding your video.
    ...do you recommend I still use DGPulldown or should I do everything in a script?
    If your sources are progressive or can be made that way with an IVTC, you should definitely encode as progressive with pulldown applied. If your NTSC source was shot on video you use that script from before for that PAL section but with ChangeFPS rather than ConvertFPS. If you don't know which your main NTSC video is is, post a sample.
    Is Nnedi3 the best option for resizing because won't it upscale to double the dimensions and then use Lanczos4Resize to downscale to the correct size?
    For such a small upscale I wouldn't use NNEDI3. Others might.
    Would this script work?
    Yes, that script will work. But I'd never do it that way as I don't like blurry video.
    Quote Quote  
  12. VideoFanatic has been dealing with WWF wrestling videos lately. So the original was 59.94 field per second NTSC video. His PAL clip was probably converted to interlaced PAL with field blending, then further converted by someone to 25p. So his PAL clip is probably horribly and irreversibly mutilated.
    Quote Quote  
  13. Originally Posted by VideoFanatic View Post
    Is Nnedi3 the best option for resizing
    Usually, yes.

    Originally Posted by VideoFanatic View Post
    because won't it upscale to double the dimensions and then use Lanczos4Resize to downscale to the correct size?
    Yes. It will use whatever resize filter you specify via cshift.

    Originally Posted by VideoFanatic View Post
    Would I not be better off using Lanczos4Resize to upscale to the correct dimensions in the first place
    No. Upscaling is a much more serious cause of aliasing problems, downscaling much less so.

    Originally Posted by VideoFanatic View Post
    So basically I need to convert my 4:3 512 x 384 PAL progressive video to 704 x 480 NTSC interlaced. Would this script work?

    Code:
    QTGMC(Preset="Super Fast") 
    LanczosResize(704,480)
    ConvertFPS(59.94) 
    AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave()
    Yes, it will work. It may not be the best possible method though.
    Quote Quote  
  14. Whenever you upscale you get artifacts. What I was saying about upscaling via doubling the resolution then downscaling was that the damage will already have been done by doubling the resolution so surely downscaling after that won't help? So wouldn't I be better off just scaling to the correct size with Lanczos4Resize(704,480) in the first place?

    Manomo - I don't see any video demux option on VirtualDub!

    How would I go about uploading a clip for you? It's an Xvid AVI MPEG4. My video editor doesn't support that so I can't save a clip.

    My source video is MPEG2 704 x 480 NTSC 29.97 fps interlaced and was recorded off TV. It was missing a section so I want to get the missing part from a completely different TV recording in Xvid AVI MPEG4 format which I want to convert to the same format as my source video. I believe that the Xvid video was recorded in Australia (a PAL region) so it's natively PAL. I'm not sure how they got it progressive and 25 fps because I thought that if you want progressive and you keep it at 25 fps (instead of doubling the frame rate) then you'll get a choppy frame rate. But the frame rate looks fine on my TV.

    Sorry if we keep repeating ourselves but I'm getting a bit confused here. What do you guys think would be the best solution for my Xvid clip? Keeping in mind that it needs to end up in the exact same format as my source clip.

    Should I do everything in a script or also use DGPulldown after encoding the Xvid video to an MPV?
    Quote Quote  
  15. Originally Posted by VideoFanatic View Post
    Whenever you upscale you get artifacts. What I was saying about upscaling via doubling the resolution then downscaling was that the damage will already have been done by doubling the resolution so surely downscaling after that won't help? So wouldn't I be better off just scaling to the correct size with Lanczos4Resize(704,480) in the first place?
    I understood exactly what you were saying. Since nnedi3's upscaling is superior to Lanczos4, and upscaling is always worse than downscaling, the sum of nnedi3(upscaling)+Lanczos4(downscaling) will be better than Lanczos4(upscaling).

    Why do you even bother with questions like this? All you have to do is try it yourself. Since there are always exceptions to the rule you'll have to try both anyway.
    Last edited by jagabo; 20th Feb 2013 at 13:04.
    Quote Quote  
  16. Yes I could try it myself but I can't always see what you guys can see which is why I'm asking what you guys think would be the best option for upscaling?
    Quote Quote  
  17. Originally Posted by VideoFanatic View Post
    Manomo - I don't see any video demux option on VirtualDub!
    I said I use VDubMod for demuxing audio. So did jagabo. In VDub you can go File->Save WAV though.

    And jagabo reminded me you're the wrestling video guy. Sorry for all the irrelevant writing about film and IVTC and pulldown. I was thinking you were one of the anime guys.

    How to save a clip? Use the little arrow things in VDub(Mod) to isolate a section, and DirectStreamCopy the video.

    And again, I apologize for adding to the confusion. With shot-on-video sources DGPulldown never comes into play as it's for adding pulldown to progressive sources only. You already have interlaced 29.97fps video and you'll convert your PAL progressive video to interlaced NTSC by changing the resolution and interlacing it using your script (or a better one).
    Quote Quote  
  18. Originally Posted by VideoFanatic View Post
    Yes I could try it myself but I can't always see what you guys can see which is why I'm asking what you guys think would be the best option for upscaling?
    Most videos won't show such and extreme difference, but here's an example from a frame enlarged 2x with Lanczos4Resize(width*2, height*2) on the left, nnedi3_rpow2(2) on the right:

    Click image for larger version

Name:	2x.png
Views:	9380
Size:	351.5 KB
ID:	16379


    It's less obvious with 512x384 to 720x480, but still visible:

    Name:  sample.png
Views: 19143
Size:  178.1 KB

    nnedi3 will give smoother lines and edges, sharper lines and edges, and less oversharpening halos.
    Quote Quote  
  19. OK I see what you mean but what if you don't use Lanczos4Resize to double the resolution and instead just upscale from the original resolution to 704 x 480 with Lanczos4Resize? Could you please show me a pic of that compared to nnedi3_rpow2(2)?
    Quote Quote  
  20. Originally Posted by VideoFanatic View Post
    OK I see what you mean but what if you don't use Lanczos4Resize to double the resolution and instead just upscale from the original resolution to 704 x 480 with Lanczos4Resize? Could you please show me a pic of that compared to nnedi3_rpow2(2)?
    That's what the second image pair shows.
    Quote Quote  
  21. Thanks very much.
    Quote Quote  
  22. OK I'm trying this:

    Code:
    QTGMC(Preset="Super Fast") 
    nnedi3_rpow2(2, cshift="Lanczos4Resize", fwidth=704, fheight=480) 
    ConvertFPS(59.94) 
    AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave()
    Is there any way I can find out if I need to upscale to 704 x 480 or 720 x 480?

    Just wondering why QTGMC is needed (excluding denoising) for upscaling or PAL to NTSC conversions as it seems like nnedi and ConvertFPS are all that's required? The reason I ask is that once this video is re-encoded, I'll be joining it with my MPEG2 file which contains the rest of the episode then I'll be re-encoding the whole episode again using McTemporalDenoise and QTGMC.

    ChangeFPS gives choppy playback so I'll use ConvertFPS.
    Last edited by VideoFanatic; 21st Feb 2013 at 13:56.
    Quote Quote  
  23. Originally Posted by VideoFanatic View Post
    OK I'm trying this:

    Code:
    QTGMC(Preset="Super Fast") 
    nnedi3_rpow2(2, cshift="Lanczos4Resize", fwidth=704, fheight=480) 
    ConvertFPS(59.94) 
    AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave()
    Is there any way I can find out if I need to upscale to 704 x 480 or 720 x 480?
    Are you making a DVD? Then scale to 720x480. Of course, that assumes your source is truly 4:3 or 16:9 DAR.

    Originally Posted by VideoFanatic View Post
    Just wondering why QTGMC is needed (excluding denoising) for upscaling or PAL to NTSC conversions as it seems like nnedi and ConvertFPS are all that's required? The reason I ask is that once this video is re-encoded, I'll be joining it with my MPEG2 file which contains the rest of the episode then I'll be re-encoding the whole episode again using McTemporalDenoise and QTGMC.
    If your source is 25p you don't need it. You could just use ChangeFPS(59.94) later on (where you have ConvertFPS()).

    Originally Posted by VideoFanatic View Post
    I read the difference between ChangeFPS and ConvertFPS but what's the difference like in picture quality? I know I could try myself but I'd like to know what you guys think.
    ChangeFPS simply duplicates frames to increase the frame rate. ConvertFPS duplicates and blends frames (many frames will look like double exposures). The difference will be plainly obvious if you use VirtualDub and step through frame by frame.
    Last edited by jagabo; 21st Feb 2013 at 14:07.
    Quote Quote  
  24. Originally Posted by jagabo View Post

    Originally Posted by VideoFanatic View Post
    Just wondering why QTGMC is needed (excluding denoising) for upscaling or PAL to NTSC conversions as it seems like nnedi and ConvertFPS are all that's required? The reason I ask is that once this video is re-encoded, I'll be joining it with my MPEG2 file which contains the rest of the episode then I'll be re-encoding the whole episode again using McTemporalDenoise and QTGMC.
    If your source is 25p you don't need it. You could just use ChangeFPS(59.94) later on.
    OK but say for example it was 25i or if I was converting NTSC to PAL or vice versa then is QTGMC needed? If so I'm just wondering what it does to the picture apart from denoising?

    I believe that the Xvid video was recorded in Australia (a PAL region) so it's natively PAL. I'm not sure how they got it progressive and 25 fps because I thought that if you want progressive and you keep it at 25 fps (instead of doubling the frame rate) then you'll get a choppy frame rate. But the frame rate looks fine on my TV. Any thoughts on how they did it?
    Quote Quote  
  25. Originally Posted by VideoFanatic View Post
    OK but say for example it was 25i or if I was converting NTSC to PAL or vice versa then is QTGMC needed?
    Of course. You have to deinterlace before resizing the frame.

    Originally Posted by VideoFanatic View Post
    I believe that the Xvid video was recorded in Australia (a PAL region) so it's natively PAL. I'm not sure how they got it progressive and 25 fps because I thought that if you want progressive and you keep it at 25 fps (instead of doubling the frame rate) then you'll get a choppy frame rate. But the frame rate looks fine on my TV. Any thoughts on how they did it?
    If the source was shot on film it was natively 24 fps and just sped up to 25 fps for broadcast. 24 or 25 fps is always choppy/flickery compared to 50 fps.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!