VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. I'm becoming mad because I'm sure this should be a common problem, but I didn't manage to fint an AviSynth script to convert a SVCD MPEG-2 (480x480) into a SVCD PAL one (480x576)

    So far, I think I'm able to make a proper 'image' conversion:

    DirectShowSource("C:\mc\Tmp\mov\movie.mpg",fps=29. 97)
    AddBorders( 0,48,0,48 )

    but the result is that I obtain a 480x576 video 29.97 fps!
    The problems are:

    1) Obtain a 25 fps video as CCE output
    2) have an audio in sync with the video

    I have read thousands of pages about 'proressive' or 'interlaced' videos, pages abou DVD conversion, but I still am unable to convert properly my movie.

    How can it be that such a common problem (PAL <--> NTSC) is so hard to solve?

    I will be grateful for any suggestion.
    Quote Quote  
  2. Hi-

    You've got other problems than just your framerates. You don't add borders to get it to 480x576 unless you want bad AR for some reason. Just resize to 480x576. Also, I don't think I'd use DirectShowSource. I'd make a D2V with DGIndex and then use MPEG2Source. Third, how do you know it's native 29.97fps, and not 23.976fps with Pulldown applied afterwards to output 29.97fps? You have "Movie" in the name of the movie, so the framerate is probably 23.976. Is the source really interlaced video?

    So, it could be as easy as:

    MPEG2Source("C:\Path\To\Movie.d2v")
    LanczosResize(480,576)

    Encode it for 23.976fps and then run DGPulldown afterwards for 23.976->25.000. The audio remains untouched and in synch. If it really is interlaced 29.97fps, rather than progressive film, then I've had no experience with that.

    How can it be that such a common problem (PAL <--> NTSC) is so hard to solve?

    It's not, unless it really is 29.97fps interlaced. Then it gets a bit trickier, and the results won't be as good because you'll have to start blending.
    Quote Quote  
  3. I) But if you simply add 'resize', won't the movie get 'stretched'? (stretch = 576/480 - 1 = + 20%). I though that the 'add borders' trick was better.. What wil it be the problem, if I do this?

    II) no Idea. I just 'see', using TMPGenc ot Womble-VCR, that the video type is 'interlaced' and 29.97 fps...

    What can I do then? Am I forced to avoid using CCE + AviSynth? TMPGenc is damn slower, but at least is easy... CCE + AviSynth is too complex and I'm not exactly a newbie.
    Quote Quote  
  4. Hi-

    ) But if you simply add 'resize', won't the movie get 'stretched'?

    No. Both the NTSC and PAL MPEGs will get resized to 1.33:1 upon playback Fill in the before and after in FitCD and you'll see.

    II) no Idea. I just 'see', using TMPGenc ot Womble-VCR, that the video type is 'interlaced' and 29.97 fps...

    Means nothing, although it could be true interlace. Open the MPEG in DGIndex and run the Preview. If it says Progressive Film, then it's 23.976fps with pulldown. Make the D2V with "Forced Film" checked and follow my script above. If it says NTSC Interlaced, then it's either really 29.97fps Interlaced, or it's hard telecined. If it says Interlaced NTSC, then make the D2V with "Honor Pulldown Flags" checked and open it in GKnot, or make the .avs with no filtering and open it in VDubMod. Then go find a section with movement and advance a frame at a time. If they're all interlaced, then it's 29.97fps interlaced video. If you see 3 good progressive frames followed by 2 interlaced frames in every 5 frame cycle, then it's hard telecined (already telecined film encoded as 29.97fps interlaced) and you can IVTC it back to 23.976fps. If it really is a movie, and if the original encoder knew what he was doing, then it should be 23.976fps already, and my original script is good.

    And if it really turns out to be pure interlace, if it were I, I'd delete the whole thing from my hard drive. However, you may not want to do that, and you might want to investigate the guides on this site for automatic NTSC to PAL conversions. I believe that TMPGEnc can do the job. But you'll have a blurry mess when done. Aren't you in PAL land? I thought most of the players and TVs could already play NTSC material.

    If you want, you can follow Xesdeeni's script for NTSC (29.97i Fps)->PAL (25i Fps) (#VII) here:

    http://www.geocities.com/xesdeeni2001/StandardsConversion/#NTSCVideoVCD2PALSVCD

    When using CCE, you add ConvertToYUY2(Interlaced=True) at the bottom of the script, rather than ConvertToRGB32() if using TMPGEnc. And you'll use the SVCD resize I gave you earlier, rather than the DVD resize he's using. Don't use his scripts for NTSC progressive film->PAL. They've been made obsolete with the arrival of DGPulldown.
    Quote Quote  
  5. Running DGIndex's Preview I see 'progressive'. I'll work on this...

    But what about the audio? I'm bacoming crazy. Running BeSweet on the audio, with the OTA preset checked 23.976 -> 25 I obtain an audio stream too different : 56' 21" instead of 58' 46".
    Why? What can I do to have a fixed audio, please?
    Quote Quote  
  6. OK, now we're getting somewhere. Assuming it says Progressive FILM, and not Progressive NTSC, you do what I said way back in my first post. Encode for 23.976fps, and then run DGPulldown for 23.976->25.000 (ticking the "Custom" box before filling in the before and after numbers). Keep the same audio (assuming it's DVD compliant AC3 or MP2). It doesn't need to be stretched. The video will stay the same length as it was originally, and the untouched audio will remain in synch. This is the same thing that Prodater64 said in your Doom9 thread. You don't have to understand it. Just do it.

    Some of the Doom9 guys are talking about speeding up the video to 25fps, which then requires reencoding the audio to speed it up as well. This method is much easier and faster. It also avoids the "PAL Speedup" which gives the audio a higher pitch.
    Quote Quote  
  7. OK, now I'm starting to understand. Sorry, I really must thank you for all you're teaching me, but I still have a couple of questions:

    1) You said: .... run DGPulldown afterwards for 23.976->25.000. The audio remains untouched and in synch...
    But DGPulldown wants an ES file! What should I do? Load the CCE M2V output? Then will I have to mux the DGPulldown output with the original audio stream? (strange that it remains in sync, since BeSweet NTSC --> PAL conversion changes the sound length. Does it mean the movie length will change , if I use DGPulldown or not?)

    2) You said (sorry I can't use the 'quote' command) ... Assuming it says Progressive FILM, and not Progressive NTSC, you do what I said way back in my first post. Encode for 23.976fps, and then run DGPulldown for 23.976->25.000.
    And what should I have done, if DGIndex had said Progressive NTSC?
    Quote Quote  
  8. But DGPulldown wants an ES file! What should I do? Load the CCE M2V output?
    Yes.
    Then will I have to mux the DGPulldown output with the original audio stream?
    Yes. DGPulldown will output with additional extension, so you should rename the file to be recognised from multiplexing programme. (for example input name.m2v become name.m2v.converted as output from DGPulldown).
    (strange that it remains in sync, since BeSweet NTSC --> PAL conversion changes the sound length. Does it mean the movie length will change , if I use DGPulldown or not?)
    Well, it is not strange if you know how DGPulldown works. It changes the way of playback by DVD player, but number of the frames remain intact. Therefore the length is the same.
    And what should I have done, if DGIndex had said Progressive NTSC?
    Pray.
    Well, you can slowdown to 25 and this require changing audio duration. You get to have unnatural movements.
    You can use avisynth to blend every fifth and sixth frame to achieve 25 frames per second, but you also need to work with audio to match the duration and you get blurry blended frames.
    You can delete every sixth frame. You get jerky movement and you must match the audio.
    So in any case you would have some convertion artefacts and it is up to you if you can live with it.
    Quote Quote  
  9. Thanks Abond. It's sometimes difficult to get these PAL guys to understand the Pulldown process. They're lucky in that they don't usually have to mess with it.

    Load the CCE M2V output?

    You should have an MPV file out of CCE, and not an M2V file. Unless you ran Pulldown in CCE. Either way, though, it doesn't matter, as DGPulldown is going to rewrite the flags.

    And what should I have done, if DGIndex had said Progressive NTSC

    As Abond said, "Pray". Hehe. Progressive FILM is 23.976fps. Progressive NTSC is 29.97fps. If it had been Progressive NTSC, you'd have been screwed, as the only way to get it to 25fps would be to blend the hell out of it, and there would be no way to make the result look good. However, Progressive 29.97fps is so rare as to not be worried about, although you do see it often in parts of anime episodes. I was just trying to make sure your base framerate was 23.976fps.

    ...strange that it remains in sync

    Well, not if you understand what's going on. Your base framerate is still 23.976. Flagging (a kind of software added to the MPEG stream by the Pulldown process) is being added by DGPulldown that tells your player to output 25fps, but NOT by speeding up the playback. What it does during playback is to add additional frames, in the form of 2 fields every second, in order to comply with the PAL DVD specs.

    There is a small chance that you'll find the extra duplicate fields annoying when viewed on the TV set. NTSC people are so used to 3:2 Pulldown that we hardly notice it. It will introduce a very slight stutter during playback. PAL people not used to the extra fields may notice and object to it. You'll have to be the judge. If it bothers you, you can always use the AssumeFPS(25) method and speed up the sudio in BeSweet. In my opinion though, the BeSweet AC3 encoder isn't so good, and will noticeably degrade the audio, as well as introducing the PAL Speedup. I've used DGPulldown dozens, if not hundreds, of times and much prefer the results over other methods of getting unusual framerates to 29.97fps (or in your case, 23.976fps to 25fps). I'm an NTSC guy and work with silent films a lot, which often have unusual framerates.
    Quote Quote  
  10. Thanks Abond. smile.gif It's sometimes difficult to get these PAL guys to understand the Pulldown process. They're lucky in that they don't usually have to mess with it.
    Thanks for the kind words, manono. I am actually a PAL guy.
    Much reading and experimenting lead to understanding what is what and what would happen in conversions like this.
    Quote Quote  
  11. Thank, manono! I managed to make the conversion the way I wanted (and the AssumeFPS method wouldn't work for me, because I was, simultaneously, encoding the movie's subtitles).
    You method is really good, DGPulldown is really simple and fast (apart the 'very little bad' feature that it was written mainly for NTSC users, and I'm forced to insert the framerate values manually). I spend few minutes and I have my conversion (the size was just modified by AviSynth; only the fps was missing) working very well!
    My only observation: I prefere to put AddBorders( 0,48,0,48 ) in the script rather than resizing.
    I simply add two small black lines (the bottom one which will contain a line of subtitle) and I avoid any quality loss (or time loss) due to resize feature (even if small) of Lanczos.
    Manono, you really gave me much!
    Only, I think that is absurd that there is so few public information about AviSynth. I considered myself rather expert in dealing with movies (apart that I've ever been an user of AviSynth before, I used to be stick to the great (and slooow!, for SVCD movies) TMPGenc. Even the great people like Doom9's, aren't trained to use the excellent DGPulldown application...
    Again: thanks, thanks, THANKS!
    Quote Quote  
  12. Hi-

    ...apart the 'very little bad' feature that it was written mainly for NTSC users, and I'm forced to insert the framerate values manually

    I laughed when I read that. But you're right. Discrimination! The author (Donald Graft, aka neuron2) is from NTSC land, and it was originally intended (I think) for conversion from PAL 25fps to NTSC 29.97fps. But I started using it for silent film Pulldown, (I also have to use the "Custom" box), and it wasn't long before the PAL people latched onto it for NTSC to PAL conversions.

    Only, I think that is absurd that there is so few public information about AviSynth.

    Ah, but you're wrong:

    http://www.avisynth.org/

    (and the AssumeFPS method wouldn't work for me, because I was, simultaneously, encoding the movie's subtitles).

    Add AssumeFPS(25) to the script after you've added in the subtitles.

    Even the great people like Doom9's, aren't trained to use the excellent DGPulldown application...

    Actually, I was also surprised to find so few of them mentioning it, and most were in favor of the AssumeFPS method. However, AssumeFPS(25) is a very good, and in some ways better, method of doing it. One advantage of the DGPulldown method is that the audio remains untouched. That, and it's easy. The main drawbacks for some are the inserted fields at playback which may produce a noticeable "stutter" in the playback. It doesn't bother me, but it definitely bothers some people. Anyway, I'm glad your project turned out well.

    And the next time you want to do something similar, at the same time adding black to the bottom for the subs, let me give you a crop/resize/addborders that will maintain proper AR. This will be much closer than what you have now (although not 100% accurate):

    LanczosResize(448,528)
    AddBorders(16,0,16,48)

    And don't forget to thank Abond for his help. A PAL guy that gets it. :)
    Quote Quote  
  13. Ahh, resizing keeping aspect ratios.. I've became mad to find a way learn it.
    I'm still taking some 'fixed rules' I found (as the PAL DVD --> SVCD DVD AviSynth scrypt). I became mad searching to learn the 'Letterboxing' (see https://www.videohelp.com/forum/archive/t174200.htm ). I leaned just a 'rule' for the AVI --> SVCD resizing, but not the one which is applied for a DVD --> SVCD.
    AviSynt manual? I downloaded it, I fixed the HTML script so that all the pages can be read from my HD, but reading a book is different from watching lectures.
    For instance, I never used the ConvertToYUY2(Interlaced=True) command, I always leaft ConvertToYUY2() to its default value [and I didn't remember where I found this option, but I found it works well].
    For example, the first time I encoded a SVCD, I used BilinearResize instead of LanczosResize. The result was much worse than the one I got with LanczosResize.

    AssumeFPS after the subtitles? Nice, idea, and again: it didn't came to me automacially (and I'm not a newbie, I assure you).
    For this reason I'm very glad to have found a forum that , even if called 'newbie conversion', speaks of such a such a hard thing like AviSynth.
    Quote Quote  
  14. Hi-

    I've became mad to find a way learn it.

    Unless you're willing to learn the math, and do some figuring on your own, the best and easiest way is through FitCD. It's free and good. There's a small learning curve, but nothing too difficult. You plug in your source resolution and format/attributes (AVI=1:1 Monitor, SVCD, either PAL or not, etc) and make sure the output is correct. Yours was a bit tricky as you wanted to add black at the bottom for the subs. I see no need to add black to the top. I took your source and added 48 pixels to the bottom to make 480x528 (actually I converted it to 640x528 AVI with 1:1 monitor), and then got the PAL SVCD output. I also check the ITU resizing box, although not everyone does. To make it 100% accurate, you'd have to do some cropping. I didn't, and it has an Aspect Error of a bit over 1%, nothing too serious.

    As for ConvertToYUY2(Interlaced=True), you use that if your source is Interlaced. It's pretty necessary. If the source is Progressive, as yours was, you can just add ConvertToYUY2.

    And yes, Bilinear resizing sucks. I recently read a guide on this site somewhere recommending it. Nonsense.
    Quote Quote  
  15. Yes, I use FitCD and I didn't know how to use it.
    Are you saying that I just have to insert the inoput format (e.g. 600x300), the destination format (SVCD 480x576) and I just have to cut and paste the AviSynth script?

    The only problem is that it asks me infos about the source type.

    If I insert, on a NTSC 480x480 file, 'SVCD':
    # -= AviSynth v2.5.5.0 script by FitCD v1.2.4 =-
    DirectShowSource("")
    LanczosResize(448,400,0,2,480,476)
    AddBorders(16,88,16,88 )
    AssumeFPS(25.000, true)
    #Trim(0,-1).FadeOut(150)

    Or '1:1 Monitor':
    # -= AviSynth v2.5.5.0 script by FitCD v1.2.4 =-
    DirectShowSource("")
    LanczosResize(448,544,2,0,476,480)
    AddBorders(16,16,16,16)
    AssumeFPS(25.000, true)
    #Trim(0,-1).FadeOut(150)

    and so on. Must I use SVCD or 1:1 Monitor for an MPEG input, or what?

    Apart this, I know that the DGIndex 'trick' is very nice so I can avoid DirectShowSource("") and the AssumeFPS can be avoided if I accapu to use the nice DGPulldown feature, if I want to keep constant the movie's length

    (I think Trim and FadeOut are not important, since they are put into a remark - # - line)
    Quote Quote  
  16. Hi-

    You had an NTSC SVCD at 480x480 to which you wanted to add 48 pixels at the bottom for the subs. That would be equivalent to :

    MPEG2Source("C:\Path\To\Movie.d2v")#don't forget to make the Force FILM D2V in DGIndex-don't use DirectShowSource
    AddBorders(0,0,0,48)

    So, at that point you have a 480x528 NTSC SVCD. Fill in that resolution in the Input box. Input is SVCD, and as I said, I check the ITU box, and leave the other 2 blank. Destination is PAL SVCD, with Anamorphic and Interlaced left unchecked. And in addition to the 2 lines above, you get:

    LanczosResize(448,576,0,7,480,514)
    AddBorders(16,0,16,0)

    This time I left in the cropping for 100% accuracy, and I didn't convert to AVI 640x528 resolution to make it easier to understand. Should work. Encode at 4:3, and not 16:9.

    Sorry, but I don't know how to upload images, and I don't want to know.
    Quote Quote  



Similar Threads

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