VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 37
Thread
  1. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    I'm trying to edit 60i VHS footage and I usually use QTGMC deinterlacing but I'm curious and I wanted to try having the video output as 60i, not 60p. Why? I don't know.

    I've tried
    SeparateFields()
    Weave()

    but it seems to give me a 30p image with combing artifacts.

    I also tried DoubleWeave() but does give me a 60p output, also with combing artifacts.

    Is there any way to output 60i with Avisynth or FFMpeg or something? Thanks!
    Quote Quote  
  2. (assuming the content is interlaced and not telecined)
    If your footage is already 60i and you don't deinterlace it, your output should also be 60i when using avisynth.
    Also just using:
    Code:
    SeparateFields()
    Weave()
    isn't right, at least normally you should also use a SelectEvery-call
    Code:
    AssumeBFF()
    SeparateFields()
    SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first
    Weave()
    Iirc using ffmpg using '-r 60 -flags +ilme+ildct -top 1'/'-r 60 -flags +ilme+ildct -top 0' should produce 60i content.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. 60i and 30i are the same thing: 30 interlaced frames per second, to be viewed as 60 fields per second. Marketing just gave it a new name.
    Quote Quote  
  4. How do you differentiate '15p -> interlaced', '30p -> interlaced' and '60p -> interlaced' if they are the same to you?
    I know that some folks call 30i what others call 60i, but shouldn't they still differ if you either use one of the other way ? (30i: some define it as 30 fields per seconds and others define it as 30 frames per second interlaced)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by Selur View Post
    If your footage is already 60i and you don't deinterlace it, your output should also be 60i when using avisynth.
    It's not for some reason. I'm using AVSPmod so I don't know if thats the issue.

    Originally Posted by Selur View Post
    Iirc using ffmpg using '-r 60 -flags +ilme+ildct -top 1'/'-r 60 -flags +ilme+ildct -top 0' should produce 60i content.
    both didn't work. it's outputting a 15fps file. output file and what its supposed to look like are attached.

    Here's my script.
    Code:
     AVISource("D:\virtualdub\tape transfers\old tony hawk gameplay from 2014-1.avi", atrack=0)
        AssumeTFF()
    SeparateFields()
    SelectEvery(4,1,2)
    Weave()
        Crop(43, 3, -38, -4)
        Spline64Resize(640,480)
            Deblock
        SMDegrain
    Trim(508, 26136)
    Trim(0, 219)
    Originally Posted by jagabo View Post
    60i and 30i are the same thing: 30 interlaced frames per second, to be viewed as 60 fields per second. Marketing just gave it a new name.
    ah
    Image Attached Files
    Quote Quote  
  6. Originally Posted by ENunn View Post
    I'm trying to edit 60i VHS footage...
    You're trying to edit 30i VHS footage. You're just confusing yourself. Why would the number used (30 in this case) have referred to frames for decades and all of a sudden refer to fields when the footage is interlaced? By your way of thinking 30p is 30 progressive frames per second but 60i is 60 interlaced fields per second? But fields aren't even interlaced so how can it be 60i? Non-intuitive and inconsistent. And very confusing. And a waste of a thread.
    Quote Quote  
  7. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by manono View Post
    Originally Posted by ENunn View Post
    I'm trying to edit 60i VHS footage...
    You're trying to edit 30i VHS footage. You're just confusing yourself. Why would the number used (30 in this case) have referred to frames for decades and all of a sudden refer to fields when the footage is interlaced? By your way of thinking 30p is 30 progressive frames per second but 60i is 60 interlaced fields per second? But fields aren't even interlaced so how can it be 60i? Non-intuitive and inconsistent. And very confusing. And a waste of a thread.
    I've always considered interlaced footage as 50/60i. My apologies.

    If that's the case then I'm trying to edit 30i VHS footage and want to output 30i with Avisynth/AVSPmod/FFMpeg I guess? Or let's just say I'm editing interlaced VHS footage and I want to output interlaced. Hope it makes it sound a bit simpler.
    Last edited by ENunn; 15th Aug 2019 at 23:32.
    Quote Quote  
  8. If it's already interlaced, how is what you want to accomplish any different? Are you saying you want to filter this interlaced footage and have it remain interlaced afterwards, realizing that a lot of filtering can't be done with interlaced footage? If so, bob it, filter it, reinterlace it. Maybe something like this:

    AssumeTFF()
    Yadif(Mode=1)###or QTGMC or whatever bobber you like
    ####Filter(s) here###
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()


    If BFF, some of the lines change.
    Quote Quote  
  9. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by manono View Post
    If it's already interlaced, how is what you want to accomplish any different? Are you saying you want to filter this interlaced footage and have it remain interlaced afterwards, realizing that a lot of filtering can't be done with interlaced footage? If so, bob it, filter it, reinterlace it. Maybe something like this:

    AssumeTFF()
    Yadif(Mode=1)###or QTGMC or whatever bobber you like
    ####Filter(s) here###
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()


    If BFF, some of the lines change.
    I was wondering if that would make the quality worse because its reinterlacing something thats been deinterlaced but I didn't notice anything.

    Nevertheless, it's still not playing back right even if I force deinterlacing on MPC-HC.

    I'm not too stressed out about it. Just wanted to see if I could output a file that maintains smoothness while keeping the video interlaced.
    Quote Quote  
  10. If your source is interlaced content, just using AVISource only should work . Provided your VFW decoder (used with AVISource) isn't deinterlacing .

    If it doesn't playback correctly - It might be that you're not encoding it interlaced correctly, or not flagging field order correctly

    It should be 29.97i . The frame rate is 29.97. The field rate is 59.94 . When it's deinterlaced upon playback by your media player , or display, you get 59.94p

    "dc-correct framerate.mp4 " looks correct for 480p59.94 - so your source is probably ok . I "reversed" the process and made it interlaced, then encoded it interlaced TFF . That's what you should be getting with AVISource() directly from a NTSC interlaced source. If you playback tff.mp4 and activate yadif2x or bob in VLC, or MPCHC, it should look like 60p, even though it's 29.97i

    Originally Posted by ENunn View Post
    I'm trying to edit 60i VHS footage and I usually use QTGMC deinterlacing but I'm curious and I wanted to try having the video output as 60i, not 60p. Why? I don't know.

    I've tried
    SeparateFields()
    Weave()

    but it seems to give me a 30p image with combing artifacts.
    That's correct if you were previewing the image in avspmod . You're supposed to see combing if there is motion, and the framerate should be 29.97 . It's 2 fields, taken at different points in time, superimposed but offset into 1 frame.
    Image Attached Files
    Quote Quote  
  11. Originally Posted by ENunn View Post
    Nevertheless, it's still not playing back right even if I force deinterlacing on MPC-HC.
    In what way is it not playing back right? Not playing smoothly? You're getting the herky-jerky back-and-forth movement? Then change the SelectEvery(4,0,3) from the previous script to SelectEvery(4,1,2) and try again.
    Quote Quote  
  12. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by poisondeathray View Post
    "dc-correct framerate.mp4 " looks correct for 480p59.94 - so your source is probably ok . I "reversed" the process and made it interlaced, then encoded it interlaced TFF . That's what you should be getting with AVISource() directly from a NTSC interlaced source. If you playback tff.mp4 and activate yadif2x or bob in VLC, or MPCHC, it should look like 60p, even though it's 29.97i
    What flags did you set for ffmpeg? I tried using "-r 59.94 -flags +ilme+ildct -top 0", "-r 59.94 -flags +ilme+ildct -top 1", and "-r 59.94 -flags +ilme+ildct -top -1" plus the SelectEvery changes that manono recommended for Avisynth and it's still not playing back right.

    Originally Posted by manono View Post
    In what way is it not playing back right? Not playing smoothly? You're getting the herky-jerky back-and-forth movement?
    I'm having that herky-jerky back-and-forth stuff.
    Quote Quote  
  13. Originally Posted by ENunn View Post
    Originally Posted by poisondeathray View Post
    "dc-correct framerate.mp4 " looks correct for 480p59.94 - so your source is probably ok . I "reversed" the process and made it interlaced, then encoded it interlaced TFF . That's what you should be getting with AVISource() directly from a NTSC interlaced source. If you playback tff.mp4 and activate yadif2x or bob in VLC, or MPCHC, it should look like 60p, even though it's 29.97i
    What flags did you set for ffmpeg? I tried using "-r 59.94 -flags +ilme+ildct -top 0", "-r 59.94 -flags +ilme+ildct -top 1", and "-r 59.94 -flags +ilme+ildct -top -1" plus the SelectEvery changes that manono recommended for Avisynth and it's still not playing back right.

    Originally Posted by manono View Post
    In what way is it not playing back right? Not playing smoothly? You're getting the herky-jerky back-and-forth movement?
    I'm having that herky-jerky back-and-forth stuff.




    I used x264 there, but it's really the same thing

    -r 60 is incorrect in ffmpeg . You want 29.97

    If your avisynth script is correct (just AVISource only, and it's decoding correctly), it should already be sending 29.97 fps . Forcing -r in ffmpeg just causes problems if there is a discrepancy in declared input frame rate

    Code:
    AVISource("your avi file...")
    You have to set the correct field order for your example (BFF or TFF) in ffmpeg (or whatever encoder) . In avisynth , you can check this using AssumeTFF().SeparateFields() and if frame advancing looks correct it's TFF. If it's forward/back jerky, it's probably BFF. Double check with AssumeBFF().SeparateFields() . If field order doesn't matter, you get the same thing - it's progressive content. If there are duplicates it's "29.97p" content . If there are 3:2 repeats, it's "23.976p" content . There are other combinations and cases, but those are the most common

    The equivalent ffmpeg command would be (no audio in this example) for TFF (change it to bff=1 if it's BFF)
    Code:
    ffmpeg -i input.avs -vf setsar=sar=10/11 -c:v libx264 -crf 18 -flags +ildct+ilme -x264opts tff=1 -an output.mp4
    Quote Quote  
  14. Originally Posted by ENunn View Post
    the SelectEvery changes that manono recommended for Avisynth... I'm having that herky-jerky back-and-forth stuff.
    You have the wrong field order before deinterlacing. Change AssumeTFF() to AssumeBFF(). An interlaced frame of video contains two fields (two separate half pictures) that are supposed to be separately and sequentially. If you view them in the wrong temporal order you get fast-jerky video -- two steps forward, one step back, two steps forward, one step back...

    In your original script the first part, SeparateFields().SelectEvery(4,1,2).Weave(), reduced the frame rate of your source by half. So a 30 interlaced frames per second video became 15 interlaced frames per second. Then the video had every frame repeated for a total of four times to make it 60 fps.

    Also note that editiors/encoders/players generally can't tell if the output of an AviSynth script is progressive or interlaced, they assume progressive. You have to tell the program the frames are interlaced if you want it handled properly.
    Last edited by jagabo; 16th Aug 2019 at 09:08.
    Quote Quote  
  15. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by poisondeathray View Post
    -r 60 is incorrect in ffmpeg . You want 29.97
    Got that.

    Originally Posted by poisondeathray View Post
    If your avisynth script is correct (just AVISource only, and it's decoding correctly), it should already be sending 29.97 fps . Forcing -r in ffmpeg just causes problems if there is a discrepancy in declared input frame rate
    Alright, got that taken out.

    Originally Posted by poisondeathray View Post
    Code:
    AVISource("your avi file...")
    You have to set the correct field order for your example (BFF or TFF) in ffmpeg (or whatever encoder) . In avisynth , you can check this using AssumeTFF().SeparateFields() and if frame advancing looks correct it's TFF. If it's forward/back jerky, it's probably BFF. Double check with AssumeBFF().SeparateFields() . If field order doesn't matter, you get the same thing - it's progressive content. If there are duplicates it's "29.97p" content . If there are 3:2 repeats, it's "23.976p" content . There are other combinations and cases, but those are the most common
    I know my source is top field first so I had AssumeTFF() and changed the SelectEvery() to 4,0,9.

    Originally Posted by poisondeathray View Post
    The equivalent ffmpeg command would be (no audio in this example) for TFF (change it to bff=1 if it's BFF)
    Code:
    ffmpeg -i input.avs -vf setsar=sar=10/11 -c:v libx264 -crf 18 -flags +ildct+ilme -x264opts tff=1 -an output.mp4
    It's still jumpy but its a bit better than before. No combing artifacts.

    Here's my ffmpeg command
    Code:
    ffmpeg -i "D:\AviSynth+ Deinterlace\Scripts\avisource\interlace test.avs" -c:v libx264 -preset ultrafast -crf 14 -flags +ilme+ildct -x264opts tff=1 "D:\AviSynth+ Deinterlace\output\output-interlace test.mp4"
    Originally Posted by jagabo View Post
    You have the wrong field order before deinterlacing. Change AssumeTFF() to AssumeBFF(). An interlaced frame of video contains two fields (two separate half pictures) that are supposed to be separately and sequentially. If you view them in the wrong temporal order you get fast-jerky video -- two steps forward, one step back, two steps forward, one step back...
    My source is TFF and it's still jumpy in the output file. Avisynth looks fine.
    Quote Quote  
  16. Originally Posted by ENunn View Post
    It's still jumpy but its a bit better than before. No combing artifacts.
    It should be as "jumpy" as your original . Maybe you do have source problems ? Or some other playback issue ?

    If you skip avisynth and encode source directly you should get the same thing if your script was just AVISourcce()
    Quote Quote  
  17. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by poisondeathray View Post
    It should be as "jumpy" as your original . Maybe you do have source problems ? Or some other playback issue ?
    There's no issues with the original file as far as I know. Plays back fine in VLC and MPC-HC. I would send the full file but its about 13GB :P
    Quote Quote  
  18. Originally Posted by ENunn View Post
    I would send the full file but its about 13GB :P
    You can trim out a section without reencoding. Open the source in VirtualDub. Set Video -> Direct Stream Copy. Mark-in, Mark-out (select about 5 seconds with constant motion -- a panning shot, for example). Then File -> Save As AVI.
    Quote Quote  
  19. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by jagabo View Post
    You can trim out a section without reencoding. Open the source in VirtualDub. Set Video -> Direct Stream Copy. Mark-in, Mark-out (select about 5 seconds with constant motion -- a panning shot, for example). Then File -> Save As AVI.

    Ah I forgot all about that! File is attached.
    Image Attached Files
    Quote Quote  
  20. The video is definitely TFF. The script given by manono in post #8 outputs a TFF video. Note that using SelectEvery(4,1,2) instead would reverse the field order. The last ffmpeg command line in post #14 delivers an mp4 file that's flagged interlaced TFF, and contains interlaced TFF frames, but plays oddly in MPCBE. On the monitor I'm using here it looks like double exposures but it's probably fast-jerky. If I use the x264 CLI encoder (mkv file attached, video only) it looks fine -- glassy smooth motion.

    x264 options:
    Code:
    --preset=ultrafast --tff --crf=18 --keyint=60 --sar=10:11 --colormatrix=smpte170m
    Image Attached Files
    Last edited by jagabo; 16th Aug 2019 at 12:59.
    Quote Quote  
  21. I think I got it: add "-top 1" to the flags.

    Code:
    ffmpeg -i "D:\AviSynth+ Deinterlace\Scripts\avisource\interlace test.avs" -c:v libx264 -preset ultrafast -crf 14 -flags +ilme+ildct -top 1 -x264opts tff=1 "D:\AviSynth+ Deinterlace\output\output-interlace test.mp4"
    Quote Quote  
  22. Originally Posted by jagabo View Post
    I think I got it: add "-top 1" to the flags.

    Code:
    ffmpeg -i "D:\AviSynth+ Deinterlace\Scripts\avisource\interlace test.avs" -c:v libx264 -preset ultrafast -crf 14 -flags +ilme+ildct -top 1 -x264opts tff=1 "D:\AviSynth+ Deinterlace\output\output-interlace test.mp4"

    Interesting - I can reproduce the playback issue in mpchc with lav . But the frames/fields look encoded correctly looking at it field by field but for some reason do not playback correctly in realtime in some players (plays ok in potplayer). The -x264opts tff=1 setting isn't even required . The important flag for ffmpeg here is -top 1 . There is actually a filesize difference (few bytes) . I assumed it was a direct translation of x264 cli , but it's not
    Quote Quote  
  23. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Thanks for the suggestions but it's still jerky. I really don't know how. I have AssumeTFF(), SelectEvery set to (4,0,9) and used the exact command line that jagabo (with and without -x263opts tff=1) posted but it's still not working well. File is attached. Not sure what I'm doing wrong. Could it be the mp4 container?
    Image Attached Files
    Quote Quote  
  24. Originally Posted by ENunn View Post
    SelectEvery set to (4,0,9)
    No.
    Quote Quote  
  25. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    I must be losing my mind lol

    I changed it to (4,0,3). That's what I should use, right?

    Output's still jerky.
    Quote Quote  
  26. Don't use SelectEvery at all

    Just the source filter

    (and if encoding with ffmpeg , use -top 1)
    Quote Quote  
  27. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by poisondeathray View Post
    Don't use SelectEvery at all
    This does output a smooth video (which is the goal), but when I drop the file into Mediainfo it shows me this:


    Is this normal? Should I include SeparateFields() and Weave()?
    Quote Quote  
  28. Post your entire script whenever you have problems. And your ffmpeg command line.
    Quote Quote  
  29. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by jagabo View Post
    Post your entire script whenever you have problems.
    Here you go. Since poison said to not use SeparateEvery(), I've also removed QTGMC, not sure if that makes a difference.

    Code:
     AVISource("D:\virtualdub\tape transfers\old tony hawk gameplay from 2014-1.avi", atrack=0)
    AssumeTFF()
        Crop(43, 3, -38, -4)
        Spline64Resize(640,480)
            Deblock()
        SMDegrain()
        SeparateFields()
        Weave()
    Trim(0, 1453)
    Trim(1015, 1453)
    ffmpeg script:
    Code:
    ffmpeg -i "D:\AviSynth+ Deinterlace\Scripts\avisource\interlace test.avs" -c:v libx264 -preset ultrafast -crf 14 -flags +ilme+ildct -top 1 "D:\AviSynth+ Deinterlace\output\output-interlace test.mp4"
    Output's still jerky yet at the same time it looks smooth? It's super weird. It's attached.
    Image Attached Files
    Quote Quote  
  30. The weirdness is form applying SMDegrain (temporal denoising, a progressive filter) while you are still in fields

    You can bob deinterlace (like QTGMC) then apply progressive filter, then re-interlace . Or use interlaced aware filters. Or separate fields, and group even/odd fields, then reweave (but you don't get denoising between even/odd). But if you don't group even/odd fields, there will be slight errors because of the field offset

    What is your avi ? The one you uploaded is 4:2:2, but cropping by 43 left, top 3 suggest you have RGB or 4:4:4 source . Or maybe your source filter is not deocding correctly ? Also there are interlaced cropping restrictions for 4:2:2
    Quote Quote  



Similar Threads