VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    I have a HuffYuv file that's a VHS capture and deinterlaced with QTGMC via Avisynth originally to create a 59.94 720p Blu-Ray disk. I need to reinterlace to render the file for a DVD version and don't want to throw away half the video.

    When using this script for reinterlacing should I specify TFF or BFF? I'm under the impression that BFF is "standard" but how do I verify it's correct for this file?

    SetMemoryMax(768)
    SetMTMode(3, 4)
    FFMpegSource2("sourcefile.avi", atrack=-1)
    AssumeTFF() or AssumeBFF()?
    separatefields()
    selectevery(4,1,2)
    weave()

    Thanks for all input
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    1280x720 BluRay disc standard is 59.94p (progressive 16:9). https://www.videohelp.com/hd#tech

    As far as re-interlace goes, Avisynth assumes BFF with SeparateFields() if field order isn't specified. If you do specify a field order with non-interlaced video:
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() -> TFF
    AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave() -> BFF
    AssumeTFF().SeparateFields().SelectEvery(4, 1, 2).Weave() -> BFF
    AssumeBFF().SeparateFields().SelectEvery(4, 1, 2).Weave() -> TFF

    http://forum.doom9.org/showthread.php?p=1110741#post1110741
    Last edited by sanlyn; 21st Mar 2014 at 14:29.
    Quote Quote  
  3. Member Alex_ander's Avatar
    Join Date
    Oct 2006
    Location
    Russian Federation
    Search Comp PM
    The output here is the opposite to your assumed type: if you write TFF, you'll get BBF.
    If you use SelectEvery(4,0,3) instead of your numbers, you'll get the order you write.

    P.S. If your previous deinterlacing was for some reason performed with wrong field order setting (frames in resulting 50p version are out of order), the script will still work, but that will revert output field order one more time.
    Last edited by Alex_ander; 5th Sep 2013 at 07:08.
    Quote Quote  
  4. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by sanlyn View Post
    As far as re-interlace goes, Avisynth assumes BFF with SeparateFields() if field order isn't specified. If you do specify a field order with non-interlaced video:
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() -> TFF
    AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave() -> BFF
    AssumeTFF().SeparateFields().SelectEvery(4, 1, 2).Weave() -> BFF
    AssumeBFF().SeparateFields().SelectEvery(4, 1, 2).Weave() -> TFF
    Thanks for the info. I seem to recall there's a trick for telling with a bob deinterlace filter. If it shows "back and forth"when you frame forward after selecting a particular field order it's wrong if you pick either the same as you have or the opposite one you have....?

    If your original VHS image was 4:3, it seems that 1280x720 16:9 BluRay would be a problem at 4:3.
    I pillarboxed the 4:3 into a 16:9 image when I converted to HuffYuv to guarantee it will display correctly on a 16:9 tv.
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    You should probably tell what you used to do the capture as some devices are known for only doing TFF or BFF. One way to tell if you picked the wrong one is that the motion in your encode looks very wrong with obvious jerks in movement of legs.

    Is "reinterlace" even the right term? I would think that "combine fields" would be a lot less confusing and a lot more accurate.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Then your 4:3 original would be resized to 960x720, then add 160 border pixels to each side to get the 1280x720 frame.

    If you compressed with huffyuv, you had to use an RGB or YUY2 colorspace. BluRay and DVD are encoded as YV12. So there's one more colorspace conversion ahead.
    Last edited by sanlyn; 21st Mar 2014 at 14:29.
    Quote Quote  
  7. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by sanlyn View Post
    Then your 4:3 original would be resized to 960x720, then add 160 border pixels to each side to get the 1280x720 frame.
    In this case I'm prepping for DVD.

    If you use the wrong field order, you'll see back-and-forth motion. That is, if you're dealing with interlaced video.
    Strictly speaking, I'm using an avs file invoking the 59.94 file and stipulates interlacing.
    Last edited by brassplyer; 5th Sep 2013 at 10:00.
    Quote Quote  
  8. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jman98 View Post
    You should probably tell what you used to do the capture as some devices are known for only doing TFF or BFF.
    Originally captured as DV using firewire and my Digital8 camcorder as a passthru box.

    One way to tell if you picked the wrong one is that the motion in your encode looks very wrong with obvious jerks in movement of legs.
    I'm trying to make the determination before going through the DVD creation process.

    Is "reinterlace" even the right term? I would think that "combine fields" would be a lot less confusing and a lot more accurate.
    QTGMC creates 59.94 progessive frames out of the 29.97 interlaced fields, so whatever you would call turning 59.94 progressive video into 29.97 interlaced video.
    Last edited by brassplyer; 5th Sep 2013 at 10:07.
    Quote Quote  
  9. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    You transform 59.94 progressive video into 29.97 video in one of two ways: (a) Discard alternate frames and keep it progressive, (b) re-interlace (which discards half the fields), in which case it's no longer progressive.

    I'm trying to make the determination before going through the DVD creation process.
    I was under the impression you're making a a 1280x720 BluRay, not a DVD. They are not the same thing. Standard 1280x720 Bluray disc is not usually interlaced.

    You might be working under the impression that SeparateFields() simply cuts a video frame in half. That's not the way it works.
    Last edited by sanlyn; 21st Mar 2014 at 14:29.
    Quote Quote  
  10. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by sanlyn View Post
    I'm trying to make the determination before going through the DVD creation process.
    I was under the impression you're making a a 1280x720 BluRay, not a DVD. They are not the same thing. Standard 1280x720 Bluray disc is not usually interlaced.

    "..I have a HuffYuv file that's a VHS capture and deinterlaced with QTGMC via Avisynth originally to create a 59.94 720p Blu-Ray disk. I need to reinterlace to render the file for a DVD version and don't want to throw away half the video.."


    I'm taking the file I originally created for making a 720p BluRay disc and now prepping it for a DVD version, reinterlacing instead of making 29.97 progressive to retain all the motion information.

    You might be working under the impression that SeparateFields() simply cuts a video frame in half.
    No.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Then you're working with the 720x480 original, or 640x480 is that's your source size. You didn't specify.

    AssumeTFF().SelectEvery(4,0,3).Weave() will give you TFF interlaced output.
    Last edited by sanlyn; 21st Mar 2014 at 14:29.
    Quote Quote  
  12. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by sanlyn View Post
    You transform 59.94 progressive video into 29.97 video in one of two ways: (a) Discard alternate frames and keep it progressive, (b) re-interlace (which discards half the fields), in which case it's no longer progressive.
    Yeah, that is exactly why I questioned the use of the term "re-interlace" in the OP's posts. Frankly I'm tired of trying to figure out what he really means given his arrogance so far. You've had nearly infinite patience in the past for bs like this sanlyn, so this one is all yours, buddy.
    Quote Quote  
  13. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Well....I like sticking to standard procedure whenever possible. One can always deviate from the standards. I just don't seem to have much luck doing so.

    to the O.P. : By the way, plain old "DVD" players can usually handle progressive 29.97 as well as interlaced 29.97. Make a small test using both methods described above. The version that gives the smoothest motion will indicate the way to go with it.
    Last edited by sanlyn; 21st Mar 2014 at 14:29.
    Quote Quote  
  14. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jman98 View Post
    Frankly I'm tired of trying to figure out what he really means given his arrogance so far.
    Wtf?

    I have no idea what I said that prompted this. Was not in any way attempting to convey "arrogance".

    As they say, take a pill.

    What was unclear about my original post?

    I have a HuffYuv file that's a VHS capture and deinterlaced with QTGMC via Avisynth originally to create a 59.94 720p Blu-Ray disk.


    What was unclear here? As far as I'm aware all NTSC VHS is 29.97 fps interlaced. If there was any question about this I stated I deinterlaced this to 59.94 which is what you'd expect doubling the 29.97 framerate. I stated I used QTGMC via Avisynth. I assume if you weren't familiar with this filter you'd have said something.

    I need to reinterlace to render the file - i.e. the 59.97 HuffYuv file referenced above - for a DVD version and don't want to throw away half the video.

    I took it as understood that NTSC DVD is either 29.97 progressive or interlaced. I specified that I wanted to reinterlace this 59.94 video. I don't get how any of this was unclear. It was deinterlaced to create 59.94 progressive so I assume it would be called reinterlacing to make it back into 29.97 interlaced. They were complete frames - extrapolated by QTGMC - being combined to re-create interlaced video. Would you call that reinterlacing or recombining fields?

    I suspect Sanlyn missed part of what I initially stated given what he later said but I didn't call him any names, I reiterated what I stated.

    Where are you reading "arrogance" in this?
    Last edited by brassplyer; 5th Sep 2013 at 17:41.
    Quote Quote  
  15. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I didn't see any arrogance, but I do see some confusion with progressive and interlaced.

    Originally Posted by brassplyer View Post
    I need to reinterlace to render the file - i.e. the 59.97 HuffYuv file referenced above - for a DVD version and don't want to throw away half the video.
    I mentioned two ways you can make a 720x480 DVD from the original VHS capture, as (a) and (b) above to get 29.97FPS as either interlaced or progressive -- both of which are acceptable for DVD. The only remaining way is to revert back to your original 29.97FPS interlaced video. You can't re-interlace 59.74FPS progressive video without discarding something. Anyway, it's likely you'll never see the difference, especially after QTGMC has cleaned up the original version somewhat and sharpened it. It's been advised from the beginning that deinterlacing has a purpose, it's not done just because you feel like it. Sometimes it's the only way to repair serious problems. People deinterlace, repair, and reinterlace often; nothing horrible about it when it's done correctly. In this particular case, if you want a 720p BluRay video, you'd have to deinterlace to get progressive video at double the frame rate.
    Last edited by sanlyn; 21st Mar 2014 at 14:29.
    Quote Quote  
  16. Originally Posted by sanlyn View Post
    If you compressed with huffyuv, you had to use an RGB or YUY2 colorspace. BluRay and DVD are encoded as YV12. So there's one more colorspace conversion ahead.
    The ffmpeg variant of huffyuv which is included with ffdshow supports YV12. Apparently so does the huffyuv encoder mplayer uses. Probably if a program uses libavcodec for huffyuv encoding it'll support YV12.

    Hey.... I was looking at the huffyuv page on this site (I didn't know the official encoder still doesn't support YV12). Is that your post there regarding "simmer" produced by multiple re-encodes with huffyuv? I was just curious what the cause of that was.
    Quote Quote  
  17. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Yes, I recall that old post. It might have been caused by some filtration, by starting with YUY2 and not going to RGB correctly and then back again, who knows? I haven't had the same problem since.

    The "thing" with huffyuv is that there are too many versions and compatibility problems between them. I use the old huffyuv only for YUY2 captures, but most of my old captures have been recompressed with Lagarith. Having to mess around with ffmpeg between huffyuv versions is a headache. I try to avoid it.

    I'm making the assumption that the video brassplayer refers to has been through VirtualDub at some point and saved as RGB, but of course that could easily not be the case. So readers can ignore my comment in that regard. Unwarranted assumption and probably unfair to brassplayer !
    Last edited by sanlyn; 21st Mar 2014 at 14:30.
    Quote Quote  
  18. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by sanlyn View Post
    I mentioned two ways you can make a 720x480 DVD from the original VHS capture, as (a) and (b) above to get 29.97FPS as either interlaced or progressive -- both of which are acceptable for DVD. The only remaining way is to revert back to your original 29.97FPS interlaced video. You can't re-interlace 59.74FPS progressive video without discarding something. Anyway, it's likely you'll never see the difference
    There was definitely a difference when I saw the results when going from 59.94 progressive to 29.97 progressive - there's a jerkiness to it which follows since half the motion info is gone compared to 29.97 interlaced or 59.94 progressive.

    The 29.97 interlaced version is definitely smoother than the 29.97 progressive version.

    Anyway, BFF seems to be the way to go for this project.

    I'm making the assumption that the video brassplayer refers to has been through VirtualDub at some point and saved as RGB, but of course that could easily not be the case. So readers can ignore my comment in that regard. Unwarranted assumption and probably unfair to brassplayer !
    Virtualdub/Avisynth for everything except creating the initial mpeg-2 file, for which I use Vegas Pro 8, and then final processing to DVD in DVD Architect studio.
    Last edited by brassplyer; 5th Sep 2013 at 17:46.
    Quote Quote  
  19. There's generally no preference for TFF or BFF when going from 60p to 30i. Except for a few circumstances that come to mind:

    You're creating a DV AVI file. DV should always be BFF.

    You start with at 30i video, Bob() deinterlace, then reinterlace with SeparateFields().SelectEvery(4,0,3).Weave(). In this case you want the output to be the same field order as the input. Because Bob() leaves the top field where it is and interpolates the bottom field to fill out the frame, and conversely, leaves the bottom field where it is and interpolates the top field to fill out the frame. If you keep the same order when re-interlacing you keep the scanlines that correspond to the original fields. But if you re-interlace with the opposite field order you get the interpolated fields -- which are going to look much worse.

    You have a player that can't play one of the field orders properly. That should not be the case for DVD but might with some other formats.
    Quote Quote  
  20. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Yep, I figured interlaced would probably look smoother for DVD.
    Last edited by sanlyn; 21st Mar 2014 at 14:30.
    Quote Quote  
  21. Formerly 'vaporeon800' Brad's Avatar
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Search PM
    How come you're sourcing your DVD version from your Blu-ray workflow instead of a direct 720x480 pipeline?
    Quote Quote  
  22. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by vaporeon800 View Post
    How come you're sourcing your DVD version from your Blu-ray workflow instead of a direct 720x480 pipeline?
    I don't have the original DV file any longer and want to avoid having to recapture it.
    Quote Quote  
  23. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Well it turns out when I actually process to DVD there's something not right. The same file that looks fine when played on Media Player classic has all kind of waviness artifacts when burned to dvd and played on the tv. I've tried both TFF and BFF versions and the same problem appears.
    Quote Quote  
  24. It sounds like you didn't encode interlaced.
    Quote Quote  
  25. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    It sounds like you didn't encode interlaced.
    No, definitely encoded interlaced. Confirmed with Mediainfo.
    Quote Quote  
  26. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Maybe you didn't tell your encoder whether you had BFF or TFF ? ? My TMPGenc encoders like to "guess" about that on input, but they often guess incorrectly and I have to manually change it. I don't know about Vegas, I never cared for its encoders.
    Last edited by sanlyn; 21st Mar 2014 at 14:30.
    Quote Quote  
  27. As usual, post a sample so we don't have to play 20 questions.
    Quote Quote  
  28. Member brassplyer's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    As usual, post a sample so we don't have to play 20 questions.
    Some samples in various stages. I don't have an app that will directly cut and save a sample from the .vob file that DVD Architect Studio rendered.

    For anyone not familiar with Google drive, use the arrow to the upper left to download or click under "file" directly above the arrow. Don't go by the crappy bitrate starved preview player. The 59.97 progressive file is the largest at 40+ megs which is a couple of seconds.

    Name:  download.jpg
Views: 663
Size:  9.4 KB


    Sample of 59.97 progressive file

    https://docs.google.com/file/d/0B0zvAZXgfLgiWnE3YTQteS1sNHM/edit?usp=sharing

    Same reinterlaced

    https://docs.google.com/file/d/0B0zvAZXgfLgiUW9WWDNNNWh3Tk0/edit?usp=sharing

    As an mpeg-2 file as rendered by Vegas Pro 8.

    https://docs.google.com/file/d/0B0zvAZXgfLgiQjNxVEpjVFk0MnM/edit?usp=sharing


    What I find is in Media Player Classic the reinterlaced and mpg files look okay, the only place that reflects the issues I see on the TV is the preview window of Vegas.
    Image Attached Thumbnails Click image for larger version

Name:	artifacts.jpg
Views:	388
Size:	41.3 KB
ID:	19931  

    Last edited by brassplyer; 6th Sep 2013 at 10:01.
    Quote Quote  
  29. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by brassplyer View Post
    I don't have an app that will directly cut and save a sample from the .vob file that DVD Architect Studio rendered.
    The free DGindex utility in DGMPGDec can edit samples directly from VOB or MPG. The reslting video cut will be an .m2v video file.

    The linked videos are flv files. We can't do anything with the reprocessed files, nor with any viewer.

    BTW, they are all too red, with low contrast. Just thought I'd mention.
    Last edited by sanlyn; 21st Mar 2014 at 14:30.
    Quote Quote  
  30. I think Vegas screwed up your video -- bff.mpg has improperly resized fields. But I haven't been able to download the interlaced AVI yet.

    I still can't download either AVI file. But After seeing the FLV video of the interlaced file I don't think Vegas is at fault, I think you resized after interlacing.
    Last edited by jagabo; 6th Sep 2013 at 10:02.
    Quote Quote  



Similar Threads

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