VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. I have a tv capture that needs some magic. It's a stretched, cropped, sped up and upscaled to 1080i video of Avatar: The Last Airbender. The DVDs I bought way back are full of halos and blending, something this capture doesn't have for what I've seen. It looks like it has about the same interlacing issues I had with another capture, except for the fact I now have an untouched TV capture and this show was made in NTSC land.
    Click image for larger version

Name:	vlcsnap-2015-04-15-22h36m55s254.png
Views:	532
Size:	1.36 MB
ID:	31275

    I have this avisynth code:
    Code:
    ffVideoSource("Clip1.mkv")
    AssumeFPS(50)
    Crop(66,0,-66,-0)
    TFM()
    QTGMC().SelectEven().SelectEven()
    Spline36Resize(1620,1080)
    ColorMatrix(mode="rec.709->rec.601")
    Changing AssumeFPS to 25 and removing one SelectEven results in 25fps video that looks more like 12.5fps.
    Compared to the DVD, the right aspect ratio is about 3:2 after cropping the black side bars.
    The panning movement doesn't seem smooth, it does produce some blocking/flickering, and the lines are blocky
    Click image for larger version

Name:	Blocking.png
Views:	544
Size:	1.84 MB
ID:	31265
    Click image for larger version

Name:	vlcsnap-2015-04-15-22h15m55s154.png
Views:	573
Size:	1.11 MB
ID:	31266

    Does anyone know how I can rid of this?
    Also, is it possible to slow it down (25->24/23.976 fps) inside avisynth? I now use tsmuxer for that.
    Image Attached Files
    Quote Quote  
  2. Originally Posted by pub View Post
    Does anyone know how I can rid of this?
    Get rid of what? The fact that most of what you showed isn't supposed to be 25fps but 50fps? You could reinterlace it, if for DVD. And, oddly enough, some of it still has interlacing.

    What's the end format going to be? A DVD?
    Changing AssumeFPS to 25 and removing one SelectEven results in 25fps video that looks more like 12.5fps.
    That's because you slowed it down (made it play twice as long) which isn't your intent, I don't think. Maybe you meant to use just the 'SelectEven'? What you did made it twice as long with half the framecount.

    Also, is it possible to slow it down (25->24/23.976 fps) inside avisynth?
    Yes, but you don't really want to do that, not unless you want to remove a whole lot of unique frames. Just look at your 50fps source. For much of it every frame is different. You can't just toss out half the frames.
    Quote Quote  
  3. It's not some sort of 24fps to 25fps pulldown is it?

    This seems to work on the samples I tried, but I'm not sure it's right. I'll bow to manono's expertise.

    tfm().tdecimate(cycle=25, cycleR=1)
    QTGMC doesn't always work well for animation anyway.
    I don't quite understand the logic behind speeding 25fps up to 50fps, de-interlacing with QTGMC (which would give you 100fps progressive) and then removing every second frame, then removing every second frame again.....

    AssumeFPS(50)
    Crop(66,0,-66,-0)
    TFM()
    QTGMC().SelectEven().SelectEven()
    Wouldn't doing it this way give you 25fps with twice as many frames?

    Crop(66,0,-66,-0)
    TFM()
    QTGMC().SelectEven()
    Last edited by hello_hello; 15th Apr 2015 at 18:48.
    Quote Quote  
  4. Originally Posted by hello_hello View Post
    It's not some sort of 24fps to 25fps pulldown is it?
    I don't think so. However, what you wrote had me go back and look at it again. When just playing it in MPC-HC, it's 50fps and every frame is different in the opening parts. However, when opening it using FFVideoSource in an AviSynth script it shows every other frame to be a duplicate. Does Europe even broadcast 1080p at 50fps? Anyway, if every other frame is a repeat then a simple SelectEven will fix that. But I don't think it was converted from film by frame duplication but by speeding it up. Meaning TDecimate won't work and you'd have to slow it to film speed with an AssumeFPS along with also slowing the audio.

    If what I just wrote is correct, then part of my original answer to pub was wrong and I apologize.
    Quote Quote  
  5. Originally Posted by manono View Post
    when opening it using FFVideoSource in an AviSynth script it shows every other frame to be a duplicate.
    That's a longstanding bug in ffVideoSource and some interlaced AVC. The clips are 25i. Specify the frame rate in ffVideoSource:

    Code:
    ffVideoSource("filenmame.ext", fpsnum=25000, fpsden=1000)
    Quote Quote  
  6. 25i? So even MPC-HC is wrong when saying it's 50fps? One wouldn't think it would be so difficult to find the correct framerate. So I guess everything I wrote for pub was wrong. Thanks for the correction. Here are a couple of pics from MPC-HC taken from his Clip1.mkv:
    Image Attached Images    
    Quote Quote  
  7. MPCHC (updated about 3 months ago) on my computer simply says 25 fps interlaced.

    Click image for larger version

Name:	info.png
Views:	721
Size:	25.9 KB
ID:	31278
    Quote Quote  
  8. My MPC-HC and your MPC-HC don't seem to be in agreement (jagabo beat me to it).

    Name:  mpc1.gif
Views: 871
Size:  3.0 KB

    Click image for larger version

Name:	mpc2.gif
Views:	733
Size:	11.8 KB
ID:	31280

    I'll confess I didn't even look at the frame rate in respect to whether it's 25fps or 50fps. Being 1080p I just assumed it was 25fps.
    Quote Quote  
  9. Originally Posted by manono View Post
    Originally Posted by hello_hello View Post
    It's not some sort of 24fps to 25fps pulldown is it?
    I don't think so. However, what you wrote had me go back and look at it again. When just playing it in MPC-HC, it's 50fps and every frame is different in the opening parts. However, when opening it using FFVideoSource in an AviSynth script it shows every other frame to be a duplicate.
    Even though for me MPC-HC is showing 25fps, when I step through the frames one at a time with MPC-HC every second frame is a duplicate. I kind of remember it always being like that. Maybe it depends who's doing the de-interlacing?
    Quote Quote  
  10. Clip 1 has combing in places but all that's needed to fix it is TFM(). Is the whole thing actually progressive? Now I'm confused.......
    Quote Quote  
  11. I've only looked at the first three clips but Clip 3 still has me a little puzzled. When I play it in MPC-HC I see wobbly lines, but there's a distinct clean/dirty pattern (seems mostly like 2:2). Same when looking via Avisynth, only there's a clean/dirty combing pattern. What's causing that? I'm indexing with L-Smash because the version of ffmsindex I have keeps dummy spitting with this one.

    Click image for larger version

Name:	clip3a.gif
Views:	698
Size:	57.9 KB
ID:	31283 Click image for larger version

Name:	clip3b.gif
Views:	685
Size:	60.9 KB
ID:	31282
    Last edited by hello_hello; 15th Apr 2015 at 21:18.
    Quote Quote  
  12. Originally Posted by jagabo View Post
    MPCHC (updated about 3 months ago) on my computer simply says 25 fps interlaced.
    Time for a new one then, I guess. Thanks to both of you.
    Quote Quote  
  13. Originally Posted by hello_hello View Post
    Wouldn't doing it this way give you 25fps with twice as many frames?

    Code:
    Crop(66,0,-66,-0)
    TFM()
    QTGMC().SelectEven()
    Originally Posted by jagabo View Post
    Code:
    ffVideoSource("filenmame.ext", fpsnum=25000, fpsden=1000)
    With this line, it works fine without AssumeFPS and extra SelectEven

    Originally Posted by hello_hello View Post
    Clip 1 has combing in places but all that's needed to fix it is TFM(). Is the whole thing actually progressive? Now I'm confused.......
    I think Nickelodeon did 480p24/23.976 -> 576i25 -> 1080i25 or 480i24/23.976 -> 576i25 -> 1080i25 (not sure if I'm saying that right)

    Code:
    ffVideoSource("Clip2.mkv", fpsnum=25000, fpsden=1000)
    Crop(66,0,-66,-0)
    tfm().tdecimate(cycle=25, cycleR=1)
    QTGMC().SelectEven()
    Spline36Resize(1620,1080)
    ColorMatrix(mode="rec.709->rec.601")
    Results with this when I use Clip2.mkv:
    Click image for larger version

Name:	blocks.png
Views:	539
Size:	1.30 MB
ID:	31305

    Is this a ffVideoSource error, is my source that bad or is it something else?
    Image Attached Files
    Quote Quote  
  14. Try ffVideoSource("Clip2.mkv", fpsnum=25000, fpsden=1000, seekmode=0).
    Quote Quote  
  15. Originally Posted by pub View Post
    Code:
    ffVideoSource("Clip2.mkv", fpsnum=25000, fpsden=1000)
    Crop(66,0,-66,-0)
    tfm().tdecimate(cycle=25, cycleR=1)
    QTGMC().SelectEven()
    Spline36Resize(1620,1080)
    ColorMatrix(mode="rec.709->rec.601")
    Why the resize since, after the cropping, it's 1788x1080. And why the colormatrix line since it's Hi-Def all the way and should remain rec.709? And you shouldn't use TDecimate, I don't think, to make it 24fps as the 'real' framerate of the capture is 25fps. They didn't add extra frames that should be removed.
    Quote Quote  
  16. Originally Posted by pub View Post
    Originally Posted by jagabo View Post
    Code:
    ffVideoSource("filenmame.ext", fpsnum=25000, fpsden=1000)
    With this line, it works fine without AssumeFPS and extra SelectEven
    Yeah, when I first posted I didn't realise ffmsindex was outputting it as 50fps and so I thought you were speeding it up to 50fps for some reason. Sorry about that. It makes sense now.

    Originally Posted by pub View Post
    Originally Posted by hello_hello View Post
    Clip 1 has combing in places but all that's needed to fix it is TFM(). Is the whole thing actually progressive? Now I'm confused.......
    I think Nickelodeon did 480p24/23.976 -> 576i25 -> 1080i25 or 480i24/23.976 -> 576i25 -> 1080i25 (not sure if I'm saying that right)

    Code:
    ffVideoSource("Clip2.mkv", fpsnum=25000, fpsden=1000)
    Crop(66,0,-66,-0)
    tfm().tdecimate(cycle=25, cycleR=1)
    QTGMC().SelectEven()
    Spline36Resize(1620,1080)
    ColorMatrix(mode="rec.709->rec.601")
    I'd go with whatever manono says is best.
    TFM() on it's own gets rid of the combing so maybe that's all that's required.
    I'd also wonder why you're converting the colours and resizing the way you are.
    And I'd still like to understand the reason for the pattern of clean/dirty frames I mentioned earlier, but it looks as though it is just plain old PAL.

    Originally Posted by pub View Post
    Is this a ffVideoSource error, is my source that bad or is it something else?
    Probably an ffms2 decoding error. The version I have won't even open your samples (it just produces an error) so I used L-Smash for indexing instead and it's been fine LWLibavVideoSource(). It also gets the frame rate correct without the need for the frame rate conversion stuff in the script.
    Quote Quote  
  17. I see lots of weird stuff going on. For example, clip3 (after bob doubling) shows about 31 unique frames per second.
    Last edited by jagabo; 16th Apr 2015 at 21:44.
    Quote Quote  
  18. It was clip 3 that made me think maybe some sort of decimation was required originally, but maybe it was just messed up during the transfer process, because I'm not sure if I can see a pattern of unique and repeated frames that makes sense. There's kind of a pattern of two unique frames followed by a repeat, two unique followed by a repeat, then a single frame repeated, but even that whole pattern doesn't seem to repeat consistently.

    If you just use TFM() motion isn't smooth, but I think maybe it's simply because something got messed up.
    Quote Quote  
  19. Originally Posted by jagabo View Post
    I see lots of weird stuff going on. For example, clip3 (after bob doubling) shows about 31 unique frames per second.
    That might actualy be somewhat right, I've seen some other posts that the first season is hybrid/has a variable framerate.
    Quote Quote  
  20. Originally Posted by manono View Post
    Originally Posted by pub View Post
    Code:
    ffVideoSource("Clip2.mkv", fpsnum=25000, fpsden=1000)
    Crop(66,0,-66,-0)
    tfm().tdecimate(cycle=25, cycleR=1)
    QTGMC().SelectEven()
    Spline36Resize(1620,1080)
    ColorMatrix(mode="rec.709->rec.601")
    Why the resize since, after the cropping, it's 1788x1080. And why the colormatrix line since it's Hi-Def all the way and should remain rec.709? And you shouldn't use TDecimate, I don't think, to make it 24fps as the 'real' framerate of the capture is 25fps. They didn't add extra frames that should be removed.
    The resize is because my TV doesn't support the 3:2 flags I would need to add to play it at the proper aspect ratio
    Argh, I forgot to remove the ColorMatrix. I had it downsized 720x480 first becuase encoding it at 1080p is very slow (0.3fps)

    Isn't there a filter I can use instead of SelectEven after QTGMC to get rid of all the duplicate frames, so I'll end up with a variable framerate? Ofcourse after slowing it down, because it is sped up somehow if I compare running times and the audio. Or am I thinking wrong?
    Quote Quote  
  21. Originally Posted by pub View Post
    The resize is because my TV doesn't support the 3:2 flags I would need to add to play it at the proper aspect ratio
    What you get after cropping is the proper aspect ratio. It's 1:1 and the television should play it that way. It shouldn't need any aspect ratio flags.
    Isn't there a filter I can use instead of SelectEven after QTGMC to get rid of all the duplicate frames, so I'll end up with a variable framerate?
    Why are you using QTGMC? And what's this about a variable framerate? If you're referring to jagabo's comment, then bob it to 50fps, if necessary. Anyway, another way to get it back to the original framerate is:

    QTGMC(FPSDivisor=2)

    ... because it is sped up somehow if I compare running times and the audio.
    Nothing in the script speeds anything up.
    Quote Quote  
  22. English isn't my first language so I might say some wrong things or explain things the wrong way

    What you get after cropping is the proper aspect ratio. It's 1:1 and the television should play it that way. It shouldn't need any aspect ratio flags.
    Compared to the DVDs, the video looks streched

    Why are you using QTGMC? And what's this about a variable framerate? If you're referring to jagabo's comment, then bob it to 50fps, if necessary. Anyway, another way to get it back to the original framerate is QTGMC(FPSDivisor=2)
    As deinterlacer, I'll try both
    I'm not sure if the variable framerate is an issue here, but I read online where that was stated in some threads as an issue with the DVDs.

    Nothing in the script speeds anything up.
    The script doesn't, but the source is sped up about 4% (24->25) compared to the DVDs
    Quote Quote  
  23. Originally Posted by pub View Post
    Compared to the DVDs, the video looks streched
    That I can believe since both the aspect ratio after the cropping and the aspect ratio after your resize are very peculiar. If it's supposed to be 1.33:1, maybe resize to 1440x1080. Unless some of the video has also been cropped. Then you have to do it based on what looks 'normal' to you, or compare it to the DVDs.

    The script doesn't, but the source is sped up about 4% (24->25) compared to the DVDs
    Ahhh, okay, then you slow both the audio and the 25fps video to film speed. AssumeFPS(24) (or 23.976) will do it for the video script. Then you slow the audio to match using eac3to or BeSweet or something.
    Quote Quote  
  24. I think pub's resizing is about right. The video probably started life as ITU 4:3 NTSC and was upscaled without compensating for the 10:11 PAR (1788 * 10 / 11 ~= 1625). If you look at the sun near the end of clip1.mkv it looks pretty round with his resizing. Of course, we can't be sure the sun is supposed to be round so pub should check other shots for objects of known aspect ratio.
    Quote Quote  



Similar Threads

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