VideoHelp Forum
+ Reply to Thread
Page 2 of 5
FirstFirst 1 2 3 4 ... LastLast
Results 31 to 60 of 137
Thread
  1. MPEG video on NTSC DVD can be encoded progressive at any frame rate from 19.98 to 29.97 fps. But that progressive video must include pulldown flags that tell the player how to produce 59.94 fields per second at the analog output (when the DVD spec was put together it was assumed DVD players would be too stupid to figure that out for themselves). Most programs that produce MPG video only know how to produce pulldown flags for 23.976 fps progressive sources. That's why you must encode progressive (at 25 fps in this case) and use DgPulldown to add the pulldown flags. DgPulldown only works with elementary streams (containerless MPEG video).

    Basically, pulldown is the number of times fields are pulled out of the frames to produce interlaced fields for output. The way the flags are constructed the maximum number of fields that can be produced by a frame is 3. That sets the minimum progressive frame rate to 1/3 of the 59.94 field per second analog field rate, 19.98 frames per second.

    By the way, DgIndex had no problems demuxing the AC3 audio from your sample video. It was a 2.0 track with sound only on the left channel.
    Last edited by jagabo; 26th Jun 2013 at 11:35.
    Quote Quote  
  2. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    People here aren't crazy about Adobe. Should I not use it? Avisynth did a better job than any professional de-interlacer I ever used.
    Quote Quote  
  3. Originally Posted by hizzy7 View Post
    People here aren't crazy about Adobe. Should I not use it? Avisynth did a better job than any professional de-interlacer I ever used.

    Yes, QTGMC is probably the best overall (by far compared to retail plugins and deinterlacers)

    Adobe is great for what it's intended purpose(s) are . eg. premiere is a NLE, and a good one at that. It's primary purpose is editing. Photoshop is awesome for photo manipuations. AE is great for effects, color work , compositing, you get the idea . Try doing a multicam edit with multiple sources and sequences in avisynth... not fun...

    Use the right tool for the job, but often there are multiple ways , filters or tools to achieve similar results
    Quote Quote  
  4. I usually use HCEnc via HCGUI to encode AVS scripts to MPEG 2.
    Quote Quote  
  5. BTW, What is the title of the movie ? Looks like a classic kung fu flick
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Wait a minute, hold the phone. I keep setting up 4:3 and running it that way, but it looks "thin" to me. View it at 704x480, and people don't look squished. I'm positive that whoever made that MPG has screwed up the aspect ratio.

    What is the title of this movie?
    Last edited by sanlyn; 19th Mar 2014 at 06:12.
    Quote Quote  
  7. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    The One Armed Magic Nun!
    Quote Quote  
  8. Originally Posted by hizzy7 View Post
    Well, sanlyn you are right about my encoder re-sizing. Adobe re-sized for PAL.
    Your encoder? You're using some Adobe MPEG-2 encoder? And you allowed it to resize? I mentioned maybe having to turn off some DVD template to be allowed to encode 704/720x480 at 25fps. If it doesn't allow you to do that, or if you don't know how to do that, I'd ditch Adobe for something else. As near as I can tell, you don't need Adobe at all for this project, not for cleanup, not for encoding. HCEnc is free and good.
    ...but would I use DG pulldown after I have made all my corrections in adobe?
    There's no pulldown for PAL 25fps. But, as I said, you should never have changed the resolution to 704/720x576 to make a PAL DVD of it. You live in an NTSC country.
    I am encoding my lagarith AVI in Premiere as NTSC with a frame rate of 29.97. Do you think it will be an abomination?
    As explained after you wrote that, yes.
    Quote Quote  
  9. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    One Armed MAgic Nun. Right, makes perfect sense to me! AKA Single Armed Holy Nun, etc. So without staying up all night on this, it appears to have been issued 1969 on NTSC/VHS. From some online photos, couple of weird vids (one seems to be from VHS), it was apparently filmed in the old "Academy" format. That format isn't 4:3 (which equates to 1:3333:1), but is 1:37:1. So the frame appears to be slightly squished. Instead of playing at 640x480, it would play at 640x468 -- add 6 pixels top and bottom to get 640x480. I'd hate to resize, it's in such bad shape already. I'll just live with it <sob>.
    Last edited by sanlyn; 19th Mar 2014 at 06:12.
    Quote Quote  
  10. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Hi Guys!

    Well, my head is spinning! Right now, I have a lagarith AVI that is PAL at 25 fps. Jagabo says:

    It was made from a PAL source, with field blending. There's nothing unusual about that. Yadif(mode=1).SRestore() restores the original 25 fps progressive frames. Do whatever you want from there.
    I agree with this. The source was PAL and screwed up from there. The 704x480 I am not sure about. I think sanlyn is spot on when they say this:

    So the original would have been NTSC, somebody got hold of a PAL edition I guess, resized it (I hate it when people do that to crummy dirty faded noisy discolored VHS), and somehow got 704x480 and somehow did some other stuff that was far from de regeur, and came up with a disaster.
    Asian films get the most lousy releases. Pan and scan is very common, unfortunately. The original aspect ratio may very well have been widescreen. It is hard to say, and IMDB is not trustworthy.

    Now that I have a lagarith AVI that is 25 FPS progressive and 704x480, what should my next step be? I am not looking for perfection picture quality wise. I have to be realistic. I am amazed at the results I have seen so far. I do want this to be compliant with DVD specifications. What steps should I be taking? I guess I shouldn't be using adobe for encoding to MPEG 2. Can I use it for noise reduction or anything else? I do love magic bullet and neat video.

    Step 1 would be Avisynth with QTGMC & SRestore()

    Would step 2 involve making this 704x576 to comply with PAL standards? Will I be adding the pulldown when encoding to MPEG2? I'm just trying to get the steps down in my head, so that I can wrap my brain around this process.

    Thanks again!
    Quote Quote  
  11. Originally Posted by hizzy7 View Post
    Step 1 would be Avisynth with QTGMC & SRestore()

    Would step 2 involve making this 704x576 to comply with PAL standards? Will I be adding the pulldown when encoding to MPEG2? I'm just trying to get the steps down in my head, so that I can wrap my brain around this process.
    Do any other filtering you need first. Then, if you're going to make an NTSC DVD you have two choices:

    A) Leave the frame rate 25 fps. Encoded as progressive MPEG 2. Use DgPulldown to apply 3:2:3:2:2 pulldown flags (25 fps to 29.97 fps) to the elementray stream. Import that new M2V into your DVD authoring software along with the original audio. Make a DVD.

    B) Change the frame rate to 23.976 fps with AssumeFPS(24000,1001) (or, since you already have an AVI file, AviFrate) and encode with normal 3:2 pulldown flags. Use an audio editor to change the length (running time) of the audio -- to match the new length of the video. Import the new audio and video into an MPEG encoder. Author a DVD from the resulting file.

    If you're going to make a PAL DVD:

    C) Resize the frame to 704x576 (make any AR adjustments you think are required, but in the end you need 704x576 or 720x576). Encode as 25 fps MPEG 2 for DVD. Import the MPEG 2 video and original audio into your DVD authoring software. Make a DVD.
    Quote Quote  
  12. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Thanks Jagabo! What program would you suggest for the encoding? The workflow of this is starting to make sense to me (I hope)!

    And when you say "do any other filtering I need first" you don't mean using adobe premiere pro, I take it.
    Last edited by hizzy7; 26th Jun 2013 at 21:24.
    Quote Quote  
  13. Originally Posted by hizzy7 View Post
    Thanks Jagabo! What program would you suggest for the encoding? The workflow of this is starting to make sense to me (I hope)!
    I use HcEnc via HcGUI. It accepts AviSynth scripts as input and it's a good MPEG 2 encoder.

    Originally Posted by hizzy7 View Post
    And when you say "do any other filtering I need first" you don't mean using adobe premiere pro, I take it.
    I don't use Premiere so I can't give you specific recommendations about it. Use whatever works.
    Quote Quote  
  14. You can use premiere for whatever you want, but be careful about messing up and introducing blends back in . Pay careful attention specifically to the sequence settings, file interpretation settings, and export settings. When something doesn' t match (e.g. framerate) , nasty things happen (by default blends)

    You probably don't want a PAL spec DVD in Canada, go with option A or B (which are perfectly compliant after the pulldown flags are added) - unless this is for somebody else (maybe you're sending it to Hong Kong or something ?)

    IIRC AME won't allow you to do non standard stuff when using the "MPEG 2 DVD profiles", like 720x480 and 25 FPS is non standard - you either have to use the non DVD profiles and hope they work, or frameserve out of premiere , or use a lossless intermediate (e.g. lagarith, ut video codec, etc...) and use another MPEG2 for DVD encoder like HCEnc
    Quote Quote  
  15. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    The first 4 camera shots of the MPG sample, filtered, a few frame repairs, etc. -- . Scene#3 is nearly impossible: The mastering lab apparently used autowhite and autogain, which is an excellent way of ruining many a VHS issue. Color density in Shot#3 expremely poor, gamma and color change 3 times (too green and bright at the start, too red and dark at the end), nothing but noise in the darks, and highlights blown away in the whole MPG. Surely one could find a better print of this movie.

    Ends with a few frames from the next scene (unfiltered), demonstrating that filters for one scene won't work elsewhere. Especially with VHS. 23.976 with 3:2 soft pulldown for 29.972 NTSC, frame resized for 1.37:1 (4:3 display). I don't envy anyone who tries to clean this up. I never did get the audio to make a sound.
    Last edited by sanlyn; 19th Mar 2014 at 06:12. Reason: replaced earlier m2v with Dolby AC3 MPG
    Quote Quote  
  16. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Hi Sanlyn!

    What program do you use to create your m2v file?

    Thanks!
    Quote Quote  
  17. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    TMPGenc Plus 2.5. I could just as easily have used HCenc. I can't see a difference between the outputs. HCenc is newer, has more buttons and matrices, and probably better for lower-bitrate anime. But TMPGenc Plus has very nice color filters (which I didn't use here. I used Avisynth and VirtualDub). I had to leave a little noise in the clip. Any more filtering and it starts falling apart. Not much "video" to work with here.

    I worked each shot separately, with the same filters but with different settings. Far from satisfied with the results. But the source is really fouled up. The last time I worked on a movie with problems like these, it took 17 months.

    If you don't mind, I'm keeping this MPG around to try different ideas. I'll try to clean up one of the scripts I used and will post later -- they're a total mess right now.
    Last edited by sanlyn; 19th Mar 2014 at 06:12.
    Quote Quote  
  18. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Hi

    Still trying to figure out a good workflow. This is my Avisynth script

    Mpeg2Source("VTS_01_2.d2v")
    QTGMC()
    SRestore()

    The source was most likely PAL and that Srestore restores the original 25 fps progressive frames. Is there a way in my script to make the frame size be the PAL standard of 720x576? Would that be done by Spline36Resize? If I want to make an NTSC DVD out of this after making a PAL "master" if you will, would I then use DGPulldown? Does DGpulldown change the frame size to be the NTSC standard?

    Thanks!
    Quote Quote  
  19. Originally Posted by hizzy7 View Post
    Hi

    Still trying to figure out a good workflow. This is my Avisynth script

    Mpeg2Source("VTS_01_2.d2v")
    QTGMC()
    SRestore()

    The source was most likely PAL and that Srestore restores the original 25 fps progressive frames. Is there a way in my script to make the frame size be the PAL standard of 720x576? Would that be done by Spline36Resize? If I want to make an NTSC DVD out of this after making a PAL "master" if you will, would I then use DGPulldown? Does DGpulldown change the frame size to be the NTSC standard?

    Thanks!


    If you were making a PAL DVD, you can resize to 720x576

    e.g
    Spline36Resize(720,576)

    If you were making a NTSC DVD, leave it as 704x480 or 720x480 . Option A would be to leave it as 25fps (then do whatever filtering, color work you need to, and encode a 704x480, or 720x480 25fps mpeg2 for DVD video, then use dgpulldown on the m2v (uses pulldown flags to output 29.97 interlaced) before authoring the DVD . Don't resize it to 720x576, then back to 720x480 or 704x480 . Resizing back and forth causes avoidable quality loss

    If you are using other programs like premiere, use lossless intermediates in between stages to avoid additional quality loss
    Quote Quote  
  20. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by hizzy7 View Post
    Does DGpulldown change the frame size to be the NTSC standard?
    No. Makes no physical change. It adds playback instructions to file header info. File size and frame size remain as before.

    I used a different tack. The "original" wasn't PAL, it was 23.976 film. It appears to me to be speeded up for 25FPS, which is common practise. Then it was further manipulated incorrectly, in different ways. I started with this step:

    Code:
    MPEG2Source("path to d2v\VTS_01_2.d2v")
    AssumeTFF().QTGMC(preset="medium")
    sRestore()
    AssumeFPS(23.976)
    I ran two scripts before going to VirtualDub. I did this to make script changes easier and because color work, noise, etc., was different for each scene. This is script #1 for Scene 2:

    Code:
    AviSource("path to avi\ALL_QT.avi")
    # --- Trim Scene 2 from original, ---
    # --- plus some spare frames. ------- 
    Trim(55,440)
    ColorYUV(off_y=-17,cont_y=15)
    ColorYUV(cont_u=-120,off_u=-5)
    Crop(8,0,0,-4)
    SmoothLevels(14, 1.2, 235, 14, 235,l imiter=0,tvrange=true,smooth=200,dither=100,chroma=200,protect=6)
    SmoothTweak(saturation=1.2)
    AddBorders(8,0,0,4)
    Stab()
    # --- clean up borders after Stab() ----
    Crop(12,4,0,-8).AddBorders(8,4,4,8)
    RemoveSpots()
    # --- Big spots/streaks still survive...these lines replace bad ----
    # --- spot with good patch from same areas of another frame. -------
    a1=last
    a2=a1
    
    b0=a1
    b01=a2.FreezeFrame(0,2,3).Crop(190,110,-232,-364)
    b02=Overlay(b0,b01,x=190,y=110)
    a3a=ReplaceFramesSimple(a1,b02,mappings="0 1 2")
    
    b0=a3a
    b01=a2.FreezeFrame(42,42,41).BadFrames(43,blend=true).Crop(332,28,-360,-446)
    b02=Overlay(b0,b01,x=332,y=28)
    a3b=ReplaceFramesSimple(a3a,b02,mappings="42 43")
    
    b0=a3b
    b01=a2.FreezeFrame(52,52,51).BadFrames(53,blend=true).Crop(396,272,-2,-200)
    b02=Overlay(b0,b01,x=396,y=272)
    a3c=ReplaceFramesSimple(a3b,b02,mappings="52 53")
    
    return a3c
    # ----- Save Output As "Scene2_a" in YV12 -----
    The group of lines at the bottom of script #1 repair bad horizontal rips that the filters missed due to motion in the affected area. The code takes a clean patch of the same area from previous and following frames and overlays it onto the bad frames. In the code below, a similar method is used to overlay a bad white spot.

    Scene 2, Script #2 does more cleanup and prepars the clip for RGB:

    Code:
    AviSource("path to avi\Scene2_a.avi")
    # ---- awarpsharp to reduce chroma bleed ----
    mergechroma(awarpsharp2(depth=30))
    LSFMOD(defaults="slow")
    GradFun3(thr=1.2,mask=0)
    Dither_convert_yuv_to_rgb(matrix="601",interlaced=false,tv_range=true,cplace="MPEG2",lsb_in=false,output="rgb32")
    # ---- center image within the borders ----
    Crop(2,0,0,-2).AddBorders(0,2,2,0)
    
    a1=last
    a2=a1
    
    b0=a1
    b01=a2.BadFrames(22,blend=true).Crop(356,196,-330,-274)
    b02=Overlay(b0,b01,x=356,y=196)
    a3a=ReplaceFramesSimple(a1,b02,mappings="22")
    
    b0=a3a
    b01=a2.BadFrames(34,blend=true).Crop(602,432,-74,-36)
    b02=Overlay(b0,b01,x=602,y=432)
    a3b=ReplaceFramesSimple(a3a,b02,mappings="34")
    return a3b
    # ----- Save Output As "Scene2_b" in RGB -----
    The manual spot remover code produced these results (top image=before, bottom image=after). A pink arrow points to the original spot in the lower right corner:

    Image
    [Attachment 18550 - Click to enlarge]

    Image
    [Attachment 18551 - Click to enlarge]


    You could remove every single spot if you want, but it would take forever.

    After color correction and other work in VirtualDub, I resized the RGB version to restore 1.37:1 original movie aspect ratio before encoding, and added top/bottom border for a 704x480 image to the encoder:

    Code:
    Spline36ReSize(704,468)
    AddBorders(0,6,0,6)
    TMPGEnc accepts RGB. If you use HCenc to encode, you must restore YV12. I used dither() and GradFun3() to do that in Avisynth for the RGB conversion to avoid block noise and banding from the previous low-bitrate encodes of the VHS tape. But you can also use this to get back to YV12 for HCenc:

    Code:
    ConvertToYV12(interlaced=false)
    There are dozens of ways to do the same things.
    Last edited by sanlyn; 19th Mar 2014 at 06:13.
    Quote Quote  
  21. Originally Posted by sanlyn View Post
    Code:
    MPEG2Source("path to d2v\VTS_01_2.d2v")
    AssumeTFF().QTGMC(preset="medium")
    sRestore()
    AssumeFPS(23.976)
    hizzy7: AssmeFPS(23.976) will restore the original ~4 percent longer running time of the movie. You'll have to change the running time of the audio too.
    Last edited by jagabo; 28th Jun 2013 at 08:02.
    Quote Quote  
  22. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Any opinion on this? Does it adhere to the proper standards?

    http://files.videohelp.com/u/183506/NUN.d2v
    Quote Quote  
  23. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Oops, we can't use a d2v because it's not a video file. It's a project file. It refers to a video that's on your computer, not on ours. Open the d2v in Notepad and you'll see these lines refer to the m2v (which will be a very large file):

    DGIndexProjectFile16
    1
    D:\ONE ARMED MAGIC NUN\NUN AVISYNTH FULL FILM VERSION 2_1.m2v
    You can use DGindex to cut a few seconds of sample, then submit the edited m2v, not the project file.
    Last edited by sanlyn; 19th Mar 2014 at 06:13.
    Quote Quote  
  24. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Okay, you're getting there! That's rather a longish "sample", but it was an eye opener to see what the VHS production people did to this poor movie. The big m2v is a much better guide to what this puppy is supposed to look like.

    BTW, I got the audio problem figured out and posted a new Dolby version in the earlier post (#45).

    So, ahem....Many North American DVD players and HDTV's won't play PAL. Very few gringo BD players will accept it. That said, it's a good effort but that blue cast is a problem. People have blue hair. And the horses are purple. You have some bad luma flicker in several scenes (see the swordplay images below). People still look a bit thin and the action looks speeded up. Play the m2v with an eye on the whitish flashes in shots with sky.

    Image
    [Attachment 18565 - Click to enlarge]

    Image
    [Attachment 18566 - Click to enlarge]


    The lower picture is from my post. It looks oversharpened (Hm, I'll have to fix that). Still not satisfied with the color. I cleaned the yellow stain on the right border but never got to work on the magenta flashes along the top. Well...back to the drawing board.
    Last edited by sanlyn; 19th Mar 2014 at 06:14.
    Quote Quote  
  25. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Glad I'm getting closer! Is that in the frame size of 704x468? It looks good!
    Quote Quote  
  26. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    The inner image is 704x468, the encoded frame has 6 pixels top and bottom to get 704x480. Both images that I posted above are the same size: 640x480, too see how they display when played at 4:3. Some viewers probably wouldn't see a difference.

    To resize and fix the borders, look at the code near bottom of my post #49. My side borders are thinner than the m2v.
    Last edited by sanlyn; 19th Mar 2014 at 06:14.
    Quote Quote  
  27. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    I am preparing something new with less blue hair, i hope :P. I will do an encode with VBR.
    Quote Quote  
  28. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    That blue cast is tough. I'm fairly certain it's from improper tape storage. A hot environment will do it.

    You're making good progress. Keep it up.
    Last edited by sanlyn; 19th Mar 2014 at 06:14.
    Quote Quote  
  29. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Is this the code?

    Spline36ReSize(704,468)
    AddBorders(0,6,0,6)

    Can I just add it to this?

    Mpeg2Source("VTS_01_2.d2v")
    QTGMC()
    SRestore()

    Thanks!
    Quote Quote  



Similar Threads

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