VideoHelp Forum




+ Reply to Thread
Results 1 to 20 of 20
  1. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    OK, my goal is stated in the subject heading. Researched and this is what I came up with last night. I intend to do the encoding tonight but was hoping someone would confirm or correct and improve my process:

    1. Threw avi into Virtualdub, cropped black borders away at 68 top and 68 bottom; ended up with 344 actual video height.

    2. Figured out original video aspect ratio by 640/344 = 1.85:1. (since original was 720x480 (480 x 4/3 = 640)).

    3. Since display aspect ratio I want is 16:9 (or 1.78:1): 480 x 1.78 = ~852 width on 16:9 TV.

    4. Then I took new width (852) and divided by original video aspect ratio of 1.85 to get new video height, or: 852/1.85 = 460 (need to add black borders at 10 top, 10 bottom to get 480??).

    Issue: DGMPGDec will not accept my avi. It just crashes. Does anyone have a fix?

    Regardless, I then created this avisynth script (source is IVTC, 2:3 confirmed by frame-frame viewing in vdub):

    loadplugin("path to dgmpegdec.dll")
    loadplugin("path to decomb.dll")
    avisource("path to movie.d2v")
    assumetff()
    telecide(guide=1))
    decimate(cycle=5)
    crop(0,68,0,-68)
    addborders(0,10,0,10)
    lanczosresize(720,480)
    converttoyuy2()

    Will use CCE to re-encode. Thanks for helping.
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Couple of things:

    #1 Maybe I'm missing something here, but if your source is actually an AVI (since you were able to use in Vdub), you don't want to be using DGMPGDec, because that's for MPEG decoding, not AVI decoding. You should probably use "AVISource" or "Directshow Source" with the actual "MyMovie###.AVI" in your AVISynth script instead...

    Are you still wanting to use the original VOB/MPEG as source?

    #2 640x344 (square pixels) is ~1.85:1. 640x360 is ~1.78:1 (aka 16:9). The difference is 16 pixels (8 on top, 8 on bottom). So you want to pad 8 before resizing, not 10.

    -OR-

    Resize FIRST from 344 to 458 (or 460 if you prefer), then pad out to 480. This way you're resizing ONLY the active picture (not the black nor the border between black and the active picture). Your picture isn't muddied with black and your black is SOLID and thus better for compression.

    Scott
    Quote Quote  
  3. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Thanks, Cornucopia. Gotcha, I think.

    #1 I do not want to use original mpeg/vob source. Want to use the large avi. So I will subtitute the actual "movie.avi" into the avisynth script. (so accustomed to using mpeg2 source to demux audio and create d2v file to frameserve).

    #2 Little confused. So when converting from 4:3 LB to 16:9 Anam. W/S, the width will always be 360 for NTSC?? So if the original source was 2.35:1, it would be: 640x272(sq.pix) ~2.35:1; 640x360 ~1.78 --> Difference being 88 pixels; add 44 top, 44 bottom. ??

    If so, is this what my script should be:

    loadplugin("path to decomb.dll")
    avisource("path to movie.avi")
    assumetff()
    telecide(guide=1))
    decimate(cycle=5)
    crop(0,68,0,-68)
    addborders(0,8,0,8)
    lanczosresize(720,480)
    converttoyuy2()

    --OR-- (trying to follow your resize FIRST method. Somehthing like this?:

    loadplugin("path to decomb.dll")
    avisource("path to movie.avi")
    assumetff()
    telecide(guide=1))
    decimate(cycle=5)
    crop(0,68,0,-68)
    lanczosresize(720,480)
    addborders(0,10,0,10)
    converttoyuy2()

    Thanks for the help. (Edit: what the heck is it with those emoticons in the script?!).

    Also, if the audio is PCM, do I still need to convert to AC3? I thought PCM was dvd compliant (?).
    Quote Quote  
  4. Member
    Join Date
    Aug 2004
    Location
    United States
    Search Comp PM
    Originally Posted by rbatty11
    #2 Little confused. So when converting from 4:3 LB to 16:9 Anam. W/S, the width will always be 360 for NTSC?? So if the original source was 2.35:1, it would be: 640x272(sq.pix) ~2.35:1; 640x360 ~1.78 --> Difference being 88 pixels; add 44 top, 44 bottom. ??
    No the height of the frame is 480. You were right in your original calculations before for a 16:9 frame, 852(actually 854)x480. These dimensions should just be strictly for calculating the border numbers to add to top n bottom. I got the same border numbers as you, add 10 to the top and 10 to the bottom(this is for 1.85:1 source AR in your original post).



    Originally Posted by rbatty11
    Thanks for the help. (Edit: what the heck is it with those emoticons in the script?!).
    it's the combo of 8 and the end parenthesis that's making those emoticons. Putting the script in code won't give you the emoticons

    Code:
    loadplugin("path to decomb.dll")
    avisource("path to movie.avi")
    assumetff()
    telecide(guide=1)
    decimate(cycle=5)
    crop(0,68,0,-68)
    lanczosresize(720,460)
    addborders(0,10,0,10)
    converttoyuy2()
    You should change it to 460 when you resize since you're adding the borders. 460+10+10=480

    Originally Posted by rbatty11
    Also, if the audio is PCM, do I still need to convert to AC3? I thought PCM was dvd compliant (?).
    Well PCM is uncompressed so the filesize of the audio will be a lot bigger than if it is AC3. So if you can live with lower bitrate for the video, or if you have bitrate to spare then leaving it as PCM should be no problem.
    Quote Quote  
  5. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Thanks, pinstripes. Now I've heard couple of different methods.. just need to find which is more efficient and works 'better'.

    Also, my script won't work in Media Player.. keep getting this error for line 4:

    "Telecide: YV12 or YUY2 data only"

    And I tried converting PCM to AC3 using AftenGUY but it does nothing.. gives me a msg saying conversion completed after a second (literally)??
    Quote Quote  
  6. Hi-

    Telecide: YV12 or YUY2 data only

    Your AVI is probably RGB. Add this line before Telecide:

    ConvertToYUY2(Interlaced=True)

    And you're sure you can IVTC this thing, right? It's unresized 720x480 and hard telecined 29.97fps?

    Someone else can answer the Aften question. I don't know anything about it.
    Quote Quote  
  7. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Here is a link to a guide I wrote on using Aften: CLICK HERE

    Make sure your PCM audio is 16-bit 2 channel 48k PCM WAV audio format first. If it isn't then you can use GoldWave or maybe even Audacity to make it so.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  8. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Hi again, manono and Fulci. Source is a NTSC laserdisc that I captured via Canopus advc100. So yes, it was originally 720x480 unresized and hard telecined (fingers crossed). I used your ConvertToYUY2(Interlaced=True) line. It worked but as the attached image show, I keep getting this intermittently with 'sparking' sounds (~few seconds) through the entire movie.

    Will check out Aften guide tonight.. on way to work.. aargh (feel like playing hooky and just working on this stuff all day .

    doc1.doc

    Also, which of the scripts above is 'correct' or better to use?
    Quote Quote  
  9. Pinstripes23 gave you the script. I can't see anything in that .doc thing. It says something about needing a graphics conversion filter.
    Quote Quote  
  10. Banned
    Join Date
    Aug 2002
    Location
    beautiful
    Search Comp PM
    I think it ought to read:

    Code:
    loadplugin("path to decomb.dll")
    avisource("path to movie.avi")
    assumetff()
    crop(0,68,0,-68)
    lanczosresize(720,460)
    addborders(0,10,0,10)
    converttoyuy2()
    (since OP had it deinterlaced and TC'd)
    ?
    Quote Quote  
  11. Member
    Join Date
    Aug 2004
    Location
    United States
    Search Comp PM
    Originally Posted by DereX888
    I think it ought to read:

    Code:
    loadplugin("path to decomb.dll")
    avisource("path to movie.avi")
    assumetff()
    crop(0,68,0,-68)
    lanczosresize(720,460)
    addborders(0,10,0,10)
    converttoyuy2()
    (since OP had it deinterlaced and TC'd)
    ?
    I didn't see where he deinterlaced it in any of his posts? Anyway the script is to IVTC assuming his source is hard-telecined to 29.97fps from 23.976fps....which means interlaced frames are mixed in with progressive frames in the encode itself. So telecide will deinterlace and decimate will eliminate the dupe frames, bringing the fps down to 23.976. Then he can just run dgpulldown on the .mpv for ntsc playback.

    Originally Posted by rbatty11
    It worked but as the attached image show, I keep getting this intermittently with 'sparking' sounds (~few seconds) through the entire movie.
    I was able to see your image, and I have no idea why you are getting that and if it is related to changing the colorspace within your script. It looks like what happens when there is a corrupted frame. But here is image, maybe manono or someone else can help with the problem:


    Quote Quote  
  12. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Sorry about the attachment. I did a print screen instead of image capture and pasted it into a new Microsoft Word doc. The image is basicall a screen shot of a frame in Media Player that shows nothing but the whole screen filled with pixelation (in all spectrum of colors). I modified script to reflect all options posted (except DereX's) and same thing.. it wouldn't work in Media Player or I got the same result of pixelation.

    DereX, since the source is hard telecined, why did you not IVTC in your script? And I don't think I deinterlaced in any of my scripts.

    manono, in your suggestion to add: ConvertToYUY2(Interlaced=True). 'We' didn't deinterlace because we never want to with NTSC interlaced sources, yes?
    Quote Quote  
  13. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Thank you, Pinstripes. And yes, it happened after I added the converttoyuy2(deinterlace=true). But then again, I wasn't getting any video before adding that line.

    After capturing the LD via ADVC100 (using ScenalizyerLive), there were no dropped frames and no indication of corruption of files.
    Quote Quote  
  14. Hi-

    manono, in your suggestion to add: ConvertToYUY2(Interlaced=True). 'We' didn't deinterlace because we never want to with NTSC interlaced sources, yes?

    You have to add it that way because at that point in the script, before the IVTC, the source is interlaced. You can try leaving off the Interlaced=True, but I don't think it'll be any better. No, about the only thing I can suggest is to use DirectShowSource on it, rather than AVISource. What kind of an AVI is this? And you have some kind of a codec installed for it?
    Quote Quote  
  15. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    manono, I tried this:

    loadplugin("D:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
    directshowsource("C:\NORTH\AVI2\north_final.avi")
    assumetff()
    converttoyuy2(interlaced=true)
    telecide(guide=1)
    decimate(cycle=5)
    crop(0,68,0,-68)
    lanczosresize(720,460)
    addborders(0,10,0,10)

    The pixelation in the above image stopped in Media Player Classic. But why does it stutter in Media Player? I throw it into vdub and plays fine. Which will give me more accurate results? Is there a reason why directshowsource worked and avisource did not?

    Oh, since I have the converttoyuy2 above telecide, I don't need it at the end, correct?
    Quote Quote  
  16. But why does it stutter in Media Player?

    I don't know. Maybe your player is having trouble decoding it, more than with AVISource.

    Which will give me more accurate results?

    If you also saw that pixelation in VDub before (did you?), then I guess DirectShowSource will be better.

    Is there a reason why directshowsource worked and avisource did not?

    Dunno. I've never had to use DirectShowSource in my life. It's a "last resort" kind of thing. I'll bet jagabo or guns1inger know. And maybe others. It probably has something to do with some sort of unusual AVI format you're using.

    Oh, since I have the converttoyuy2 above telecide, I don't need it at the end, correct?

    Something else of which I am not sure. I don't cap, and have never had to learn or do the things you're doing. Don't hold me to this, but I think you're OK with the script as it is. But I'll welcome the correction if I'm wrong.

    Geez, 4 questions, and I didn't know the answer to any of them. But your script works now, eh?

    Oh, to make your 8's show up as 8's, either disable smilies in your post, or, as suggested earlier, hit the code button for your scripts.
    Quote Quote  
  17. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Thank you for all the help. As to whether it did the pixelation in vdub, no, it did not. Will give it a shot with this and see..

    Now on to another problem with this pcm to ac3 conversion. AftenGUI won't work.. and yes, I used Fulci's guide.. damned thing just says 'Encoding finished successfully!' after literally one second and no new file, nothing.. I tried re-installing and still nothing. So if anyone knows how to fix, I'd appreciate it.
    Quote Quote  
  18. As to whether it did the pixelation in vdub, no, it did not.

    Oh, well then. I'd definitely recommend the use of AVISource. You might make a test encode first to see if you get those artifacts. Probably WMP was having trouble decoding it. To encode 5% of the video, all scattered around, add this at the end:

    SelectRangeEvery(280,14)

    To do an encode of just a part of the video:

    Trim(10000,20000)

    That will encode between frames 10001 and 20001.

    I think FulciLives will see this soon and come to help with the Aften problem.
    Quote Quote  
  19. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Originally Posted by rbatty11
    Now on to another problem with this pcm to ac3 conversion. AftenGUI won't work.. and yes, I used Fulci's guide.. damned thing just says 'Encoding finished successfully!' after literally one second and no new file, nothing.. I tried re-installing and still nothing. So if anyone knows how to fix, I'd appreciate it.
    That's odd ... hmmm ???

    OK I admit ... I have no idea why it is not working

    Have you tried another AC-3 encoder at all? I know ffmpegGUI is the other BIG freeware AC-3 encoder but it does lack the control that Aften offers.

    Maybe give ffmpegGUI a try and see if it works or not ...

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  20. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Darn.. just read the update. Already encoding the whole thing (almost done). Hopefully it will have been worth it on the 1st go. But will write down the script command for next time. Thanks.

    Fulci, will give it a go with..... um.. ffmpeggui. Will look for a guide. Hopefully won't have to come back with umpteen ?'s. Many thanks.
    Quote Quote  



Similar Threads

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