VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    It's been a while since I posted, but since "ER" ended for the season, I haven't had much of a chance to experiment with converting 1080i material to 480p DVD with pulldown.

    Now, however, the new season is about to begin in a few weeks. When I last left off, I found that if I was using the standard AVISynth script that has been going around, it took almost four times longer to encode in CCE SP than a 720p conversion.

    So what I was wondering is if the resizing to 720x480 done within the script could be the source of the massive slowdown, and if so, would doing the resize in DGIndex speed things up. And would doing the IVTC in DGIndex go some way towards increasing the speed?

    I have until this Thursday to find the solution because they're re-running the season finale, and I intend to put it on a single disc along with the other three episodes that deal with that storyline.

    BTW, I think I've tweaked the 720p conversion as far as I can. I'm getting a 0.4x speed out of CCE SP, and I can't see how to get it any higher failing a major hardware upgrade--which will be coming eventually, but definitely not in the next two weeks.
    Quote Quote  
  2. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Last time I looked ER was an NBC show (i.e. 1080i). What does 720p have to do with 1080i to 480p conversion?

    1. Edit out the breaks
    2. Inverse telecine each segment to 1920x1080p/23.976
    3. Downsize segments to 720x480p/23.976
    4. Author the DVD as progressive. Set end of segmeet to start next segment.

    The above process will be highly compute intensive.
    Quote Quote  
  3. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    Originally Posted by edDV
    Last time I looked ER was an NBC show (i.e. 1080i). What does 720p have to do with 1080i to 480p conversion?

    1. Edit out the breaks
    2. Inverse telecine each segment to 1920x1080p/23.976
    3. Downsize segments to 720x480p/23.976
    4. Author the DVD as progressive. Set end of segmeet to start next segment.

    The above process will be highly compute intensive.
    I'm using the 1080i and 720p scripts written by Inmatrix.

    What I'm trying to figure out is where to do the IVTC and the resizing: in DGIndex, in the scripts or in CCE SP. The end object is to have a 1080i downconversion that doesn't take much longer than a similar conversion from a 720p source. Right now, a five-minute 1080i segment takes almost three hours to convert, as opposed to 20 minutes for a 720p segment of the same length.
    Quote Quote  
  4. What I'm trying to figure out is where to do the IVTC and the resizing: in DGIndex, in the scripts or in CCE SP.

    In the script, of course.

    I haven't seen the inmatrix script, but he knows his stuff. You might post it here, though, especially if it's old. There is a much faster IVTC than decomb, although if you're an AviSynth rookie, it might take some explaining for you to get it going the first time. You can also speed up Decomb considerably by disabling the Post Processing (the conditional deinterlacer). If it's an easy IVTC, that might be a good idea. If there are lots of cuts, it may not be a good idea.
    Quote Quote  
  5. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    Is there a plugin that's faster than Decomb?

    Anything I could possibly use to speed up the process would be great.

    I'm not at my computer, so I can't post the modified Inmatrix script I'm using, but I will do that later on.

    I did some tinkering the other day, and I was able to speed things up to a .25x rate by stripping out everything out of Telecide except the frame order flag and everything out of Decimate so that it uses whatever default options it has naturally.

    The results are fairly good, but as always, I'm looking for improvement.

    Eventually one of these days I might end up rolling my own script to deal with it. The end result will hopefully be a script that I can use with both 720p and 1080i material that performs at equal speeds (right now the 720p script renders faster in CCE SP).
    Quote Quote  
  6. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by CubDukat
    ...

    Eventually one of these days I might end up rolling my own script to deal with it. The end result will hopefully be a script that I can use with both 720p and 1080i material that performs at equal speeds (right now the 720p script renders faster in CCE SP).

    I may be missing something here but 1280x720p/59.94 is a simple down scale to 720x480p/23.976. The progressive frames already exist.

    1920x1080i/29.97 needs IVTC to 1920x1080p/23.976 and then downscale to 720x480p/23.976.

    It seems the latter should take longer.
    Quote Quote  
  7. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    Actually, after you remove every other frame from the 59.94fps stream, you still end up with 29.97--exactly the same thing you have with the 1080i stream, the only difference being that you have to deinterlace the 1080i stream, but that shouldn't cause that much of a slow-down, especially seeing as that would be the only difference between the two streams.

    I think part of the bottleneck is in Decomb. I've heard that there are faster IVTC plugins out there, but unfortunately the AVISynth site is down, and I'm not sure where else to turn.

    Oh, yeah, here are the scripts that I'm using. Both have only minor alterations from the original Inmatrix scripts.

    720p

    # Modify the path so that it finds your decomb dll file #
    LoadPlugin("c:\program files\AVISynth 2.5\plugins\decomb521.dll")

    # Modify the path so that it finds your MPEG2DEC dll file #
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\DGDecode.dll")
    #LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\BT709ToBT601.dll")

    # Modify the path so that it finds the d2v file you created using dvd2avi #
    MPEG2Source("E:\Video\RawCaptures\Men in Trees (Series Premiere)(Outro).d2v")

    BT709ToBT601()

    # Leave this alone. It will remove every other frame. Since 720p is 60 frames per second, this cuts it down to 30 #
    SelectEven()

    # Leave this alone. This will remove one out of every five frames, converting the fps to 24 fps. #
    Decimate()
    LanczosResize(720,480) #for 16:9 anamorphic DVD
    Sharpen(0.7)


    1080i

    # Modify the path so that it finds your decomb dll file #
    LoadPlugin("c:\program files\AVISynth 2.5\plugins\decomb521.dll")

    # Modify the path so that it finds your MPEG2DEC dll file #
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\DGDecode.dll")

    # Modify the path so that it finds the d2v file you created using dvd2avi #
    MPEG2Source("E:\Video\RawCaptures\ER--Just a Touch (Pt4).d2v")

    # This is the IVTC line. Consult your decomb readme file for tweaking #
    Telecide(1)

    # Leave this alone. This will remove one out of every five frames, converting the fps to 24 fps #
    Decimate()
    LanczosResize(720,480)
    Sharpen(0.42)

    Any recommendations would be most welcome.
    Quote Quote  
  8. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by CubDukat
    Actually, after you remove every other frame from the 59.94fps stream, you still end up with 29.97--exactly the same thing you have with the 1080i stream, the only difference being that you have to deinterlace the 1080i stream, but that shouldn't cause that much of a slow-down, especially seeing as that would be the only difference between the two streams.
    First 720P: Correct anything I'm missing here.

    That works for live action 720p/59.94 since every progressive frame contains camera motion. Decimation on every other frame results in 720p/29.97 as progressive frames but with half the motion resolution. Sports action will be noticably more jerky.

    For DVD encoding and authoring, frame size reduction to 720x480p/29.97 can work but is non-standard in the strict sence. The encoder would extract both fields from the same frame and author it as if interlaced (480i/29.97). Interlace playback would be successive fields at 59.94 rate but motion resolution would be 29.97 rate.

    A more purist approach would be to extract alternate fields from size reduced 480p/59.94 (e.g. even fields from even frames and odd fields from odd frames). That would create true 480i/29.97 for encoding/authoring an interlace DVD.

    If the 720p source was film, there is a basic problem with 2x frame decimation. 23.976 progressive movies get frame repeated in a 3:2:3:2 ... pattern building up to 59.94. For film you would want to author a progressive 480p DVD at 23.976 fps.

    Here is the sequence for 9 film frames:

    11122333445556677788999 <--- 720p/59.94 film source
    1_1_2_3_4_5_5_6_7_8_9_9 <--- 720p/29.97p with studder.
    x_1_2_3_4_x_5_6_7_8_x_9 <--- Still possible to get to 23.976p by dropping repeat frames

    Maybe better to select the correct frames in the first pass using alternate skip 2, skip 1.

    11122333445556677788999 <--- 720p/59.94 film
    1__2_3__4_5__6_7__8_9__ <--- frame decimate to 23.976p

    Then size reduce and encode to 720x480 and you have a 480p/23.976 DVD.

    Edits in the film can screw up a fixed decimation sequence. Adaptive cadence detection is used in internal HDTV cinema IVTC processors to ride over and resync the edits. We must eyeball for cadence breaks.


    Originally Posted by CubDukat
    # Leave this alone. It will remove every other frame. Since 720p is 60 frames per second, this cuts it down to 30 #
    SelectEven()

    # Leave this alone. This will remove one out of every five frames, converting the fps to 24 fps. #
    Decimate()
    LanczosResize(720,480) #for 16:9 anamorphic DVD
    Sharpen(0.7)
    Hmm, That depends which of the five frames is removed. Lets see what they are doing:

    11122333445556677788999 <--- 720p/59.94 film
    1_1_2_3_4_5_5_6_7_8_9_9 <--- 720p/29.97 with studder.
    x_1_2_3_4_x_5_6_7_8_x_9 <--- "remove one out of every five frames"

    Yes that works fine for film, but not for live action.

    123456789ABCDEFGHIJKL <--- 720p/59.94 live frames
    1_3_5_7_9_B_D_F_H_J_L <--- 720p/29.97 live frames
    x_3_5_7_9_x_D_F_H_J_x <--- 720p/23.976 progressive (motion studdered)

    To smooth the motion new frames should be interpolated or use the 480p/29.97 authored as 480i/29.97 trick.
    Quote Quote  
  9. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by CubDukat
    Actually, after you remove every other frame from the 59.94fps stream, you still end up with 29.97--exactly the same thing you have with the 1080i stream, the only difference being that you have to deinterlace the 1080i stream, but that shouldn't cause that much of a slow-down, especially seeing as that would be the only difference between the two streams.

    I think part of the bottleneck is in Decomb. I've heard that there are faster IVTC plugins out there, but unfortunately the AVISynth site is down, and I'm not sure where else to turn.

    Oh, yeah, here are the scripts that I'm using. Both have only minor alterations from the original Inmatrix scripts.
    ....
    1080i

    # Modify the path so that it finds your decomb dll file #
    LoadPlugin("c:\program files\AVISynth 2.5\plugins\decomb521.dll")

    # Modify the path so that it finds your MPEG2DEC dll file #
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\DGDecode.dll")

    # Modify the path so that it finds the d2v file you created using dvd2avi #
    MPEG2Source("E:\Video\RawCaptures\ER--Just a Touch (Pt4).d2v")

    # This is the IVTC line. Consult your decomb readme file for tweaking #
    Telecide(1)

    # Leave this alone. This will remove one out of every five frames, converting the fps to 24 fps #
    Decimate()
    LanczosResize(720,480)
    Sharpen(0.42)
    Next 1080i:

    1080i needs IVTC the same way it is done for 480i. Select fields are reassembled (weaved) into 23.976 fps progressive frames, then downsized to 720x480p/23.976. I don't understand the need for the last decimate step.

    The 1080i/29.97 live action case requires a downsize to 720x480i/29.97.
    Quote Quote  
  10. Hi-

    Actually, after you remove every other frame from the 59.94fps stream, you still end up with 29.97--exactly the same thing you have with the 1080i stream, the only difference being that you have to deinterlace the 1080i stream, but that shouldn't cause that much of a slow-down, especially seeing as that would be the only difference between the two streams.

    As edDV was explaining, that's not entirely correct. With 720p you first remove every other frame, and then remove every 5th frame. The parts of your script that do that are:

    SelectEven()
    Decimate()

    And that goes fairly fast because all you're doing is removing duplicate frames. For 1080i you have to perform a full IVTC, you have to employ Telecide as the field matcher before removing the dupe frames, and that's a much slower process. In addition, 1080i is a higher resolution, and therefore you'll have 2 additional slowdowns when compared to returning 720p to 23.976fps.

    The scripts look OK. One way to speed it up is to remove the post processor from Telecide. By default, it has a deinterlacer on for denterlacing any frames that may slip by the field matcher. You do this like this:

    Telecide(Guide=1,Post=0)

    That can, however, be a bit risky, as you take the chance of getting some interlacing in the result. If you want to give it a try, make sure and check it out before doing the encoding. Without post processing, Decomb is much faster. The fastest IVTC, bar none, is SmartDecimate. It's partly so fast because it has no post processing, and partly faster for other reasons. It's also quite good at handling hybrid material, like a lot of the space shows (Stargate SG-1, for example) with 30fps effects, in amongst the film.

    If you're curious, you can find it, and many other filters, here:

    http://www.avisynth.org/warpenterprises/

    By the way, I'm no colorimetry expert, but I'm not quite sure why you have this in your script:

    BT709ToBT601()

    since CCE is just going to turn it back to BT709. Check out one of your CCE encoded MPV/M2Vs in DGIndex. It may be more useful for AVI encoding. Like I said, I'm not really sure. And Sharpen is a lousy sharpener. Much better is LimitedSharpen(Faster), although it's damn tricky to get going.
    Quote Quote  
  11. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    Well, I downloaded both SmartDecimate and LimitedSharpenFaster, and after a while of figuring things out, I managed to roll my own script.

    First, the 720p-specific version:

    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\avisynth_c.dll")
    LoadCplugin("C:\Program Files\AVISynth 2.5\plugins\SmartDecimate.dll")
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\BT709ToBT601.dll")
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\mt_masktools.dll")
    Import("C:\Documents and Settings\Cubdukat\Desktop\LimitedSharpenFaster.avs ")
    MPEG2Source("E:\Video\RawCaptures\Men In Trees (Series Premiere)(Pt1).d2v",cpu=4,idct=3,moderate_v=20)
    BT709ToBT601()
    assumetff()
    SelectEven()
    SmartDecimate(cpu=4)
    LanczosResize(720,480)
    LimitedSharpenFaster()

    Next, the 1080i one:

    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\avisynth_c.dll")
    LoadCplugin("C:\Program Files\AVISynth 2.5\plugins\SmartDecimate.dll")
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\BT709ToBT601.dll")
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\mt_masktools.dll")
    Import("C:\Documents and Settings\Cubdukat\Desktop\LimitedSharpenFaster.avs ")
    MPEG2Source("E:\Video\RawCaptures\ER--Just A Touch Test.d2v",cpu=4,idct=5,iPP=true)
    assumetff()
    SmartDecimate(cpu=4)
    LanczosResize(720,480)
    LimitedSharpenFaster()

    Any tweaks would be most welcome, because while the quality is somewhat higher than with the other scripts, there is no improvement in rendering speed.
    Quote Quote  
  12. Hi-

    SelectEven()
    SmartDecimate(cpu=4)


    It doesn't really hurt, but IVTC isn't needed with the 720p script. Decimate() would be better for the second line. All you need to do is pull out dupe frames, and not perform IVTC.

    Actually, I don't even recognize the SmartDecimate parameter you're using. I usually load LeakKernelDeint and use it like this:

    B=LeakKernelBob(Order=1)
    SmartDecimate(24,60,B)

    But I think yours does pretty much the same thing. The Sharp filter is very slow, but I don't know whether or not LimitedSharpenFaster is any faster. I do know it's a heck of a lot better. I usually use this for it:

    LimitedSharpenFaster(ss_x=1.25,ss_y=1.25,Smode=4,s trength=150,soft=30)

    And you can raise the strength to suit your tastes. It kind of depends at what point you begin to get artifacts. And you can have it do the resizing for you. I work with DVDs, and don't resize, but there should be something in the documentation about getting down to 720x480 within LSF, without the LanczosResize line. Maybe it'll save encoding time, since you're already at a high resolution, and all you have to do is to sharpen and downsize, where I upsize, sharpen, and then downsize back to where I started.

    If the speed hasn't improved, then I'm out of ideas. Maybe it has to do with memory limitations. You might ask in the AviSynth Forum at Doom9.
    Quote Quote  
  13. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    I'm wondering if it's not something in the system too. When I get back to the computer, I'm going to pull up TaskManager at the same time the render's going on and watch what it does. I don't believe that the version of CCE SP uses HyperThreading, and I'm suspecting that it's a memory issue (I only have 512MB).

    If it turns out it's a memory issue, it'll have to wait until I build the new system. I', looking at putting together a Core 2 Duo-based HTPC/Gaming/Multimedia system, and I'm loading it up with at least 2GB of RAM, possibly more.

    Sadly, the rendering times for the 720p script have actually gone up. It's probably because of some of the things I put in the script. I'm still experimenting with AVSEdit, but it seems fairly easy to use.

    Tonight, I'll have three things to experiment on: two episodes of "My Name is Earl" and the season finale of "ER."
    Quote Quote  
  14. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by CubDukat

    Sadly, the rendering times for the 720p script have actually gone up. It's probably because of some of the things I put in the script. I'm still experimenting with AVSEdit, but it seems fairly easy to use.
    Do you really need the sharpening? That would be time intensive.
    Quote Quote  
  15. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    I suppose I shouldn't, but for some reason the footage looks somewhat soft if I don't use it.

    One other thing I suppose I should mention--I'm using the same matrix that was used in the Normandy sequence in "Saving Private Ryan."

    basically what I did was rip that sequence, have DGIndex spit out a matrix grid and just entered it into CCE SP. So far it's given me great results with shows like "24" and "Lost," but the tradeoff is that I have to do multi-pass VBR in order to keep the bitrate reasonable. If I use one-pass VBR, it mainly wants to stay towards the high end of the bitrate range--which wouldn't bother me so much if dual-layer DVDs were cheaper than they are.

    Next season, though, I'll be putting "24" and "ER" on dual-layer discs so that they can stretch out more.
    Quote Quote  
  16. Member
    Join Date
    Apr 2001
    Location
    United States
    Search Comp PM
    Well, I did some research this weekend and learned a few things:

    It turns out that a good amount of my problems seem to be that my system's not hacking it anymore. I checked it out in Task Manager, and found that the Commit Charge number is higher than physical memory by at least a factor of two. So it would seem that 512MB is not enough. Unfortunately, I'm not throwing any more money into this current system because I'll be building a Core 2 Duo system that will be more than up to the task.

    I also found two new scripts this weekend. Actually, they were the same scripts used in the 1080i/720p to 720p x264 tutorial, modified for use in CCE SP.

    I burnt a clip of each resolution to DVD, and the results are excellent.

    It also turns out the softness I see only happens when I'm playing back through PowerDVD. If I play it through a regular TV, the results are great. I have yet to try them on a progressive-scan TV, though.

    Right now, I'm rendering the season finale of "ER" using the new script, and rendering times are .13--meaning that it probably won't be done before midnight. I'll probably re-render the "Men In Trees" series premiere with the new script tonight to see if there's any improvement over the Inmatrix one I've been using.

    BTW, I'm watching the CPU Usage meter, and I'm noticing that one of the "cores" (it's not really a dual-core, it's Hyper-Threading) is being used more than the other. Is that normal?
    Quote Quote  



Similar Threads

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