VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 35
  1. Hi everybody!
    I have an .avi video file (608x272, 23.976 fps) which I want to convert to a 720x576 25 fps .m2v file to be authored with IfoEdit (muxing back with audiotracks at 25 fps, then create a PAL dvd).
    I'm trying to use Avisynth+Henc since I just want to go free.
    Can somebody give me some hints on how to set up properly the Avisynth script (or at least point me to some guide here on videohelp)?
    Thanks.
    Quote Quote  
  2. Use FitCD to make an AVS script with all the right resizing commands. Make a 23.976 fps progressive 720x576 MPEG2 file, use DgPulldown to add 23.976 -> 25 fps pulldown flags, burn as PAL DVD. This will have two little jerks every second.

    If you speed the frame rate up to 25 fps you will have to speed the audio up too.
    Quote Quote  
  3. Hi jagabo and thanks for your reply.
    FitCD seems to be a nice piece of software, I'm gonna try and let you know.

    About the audio track, it comes from another avi which is 25fps already so I think I won't need to speed it up.
    Quote Quote  
  4. I have managed to do the conversion, I had to modify the FitCD script a little, but it seems to work. The only thing is a jerky movement during camera pans, but it is unavoidable, isn't it?
    The real issue is in the a/v sync: I tested the video and the audio (which is taken from another file) in VirtualDubMod, they appear to be in sync at the beginning but during the playback they go out of sync.
    Any advice?
    Quote Quote  
  5. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Using the Pulldown method is necessary when you want to change the playback framerate without affecting audio. In your case, however, the audio comes from a different format video, so you do need to adjust the playback speed of the video to match the audio, or you will have to change the audio track to match the video.

    Use the FitCD script, but include an AssumeFPS(25) statement in it, and encode for PAL 25 fps. This will actually speed up the video slightly to match the audio, and should get you back in sync.
    Read my blog here.
    Quote Quote  
  6. As for the jerky movement, since you said you modified the script, you might post it so we can see what you did. A small sample of the result - a sample showing movement - might help as well.
    Quote Quote  
  7. Hi to you too and thanks for helping.

    I made some minor changes to the borders values.
    This is the script I used for the 23fps encoding:

    # -= AviSynth v2.5.8.5 script by FitCD v1.2.8 =-
    AVISource("C:\Documents and Settings\User\...\video.avi")
    BicubicResize(720,352,0,0,0,0,0,0)
    AddBorders(0,112,0,112)
    #Trim(0,3047).FadeOut(150)

    (then I gave it to DGPulldown).
    For the 25fps encoding I just added:

    AssumeFPS(25.000, true)

    after the AddBorders line.
    It seems however that the sync issue exists even with the 25fps (second script) file.
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    What sort of sync problem ?

    The issue with taking audio from one version and video from another is you cannot be sure that the two versions come from the same source, and how they were created.

    If the sync is out the same distance all the way through then it is simply a matter of adding or subtracting a delay.

    If you are out progressively then you need to work out why. It could be because the original wasn't sped up from 24 fps to 25 fps, but had extra frames added. It could be because the edit is slightly different, or there are different production or distribution logos at the start.

    You have some homework still to do.
    Read my blog here.
    Quote Quote  
  9. Let me tell you what I exactly did:

    I took the 3 audio tracks from a DVD. This is the MediaInfo output for the two files that form the video:
    ----------------------------------------------------------------------------------------------------
    Complete name : C:\Documents and Settings\...\VTS_01_1.VOB
    Format : MPEG-PS
    File size : 1 024 MiB
    Duration : 25mn 10s
    Overall bit rate : 5 685 Kbps

    Video
    ID : 224 (0xE0)
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, Matrix : Default
    Duration : 25mn 10s
    Bit rate mode : Variable
    Bit rate : 3 947 Kbps
    Nominal bit rate : 4 800 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 4/3
    Frame rate : 25.000 fps
    Standard : PAL
    Colorimetry : 4:2:0
    Scan type : Interlaced
    Scan order : Bottom Field First
    Bits/(Pixel*Frame) : 0.381

    Audio #1
    ID : 128 (0x80)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 25mn 10s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz

    Audio #2
    ID : 129 (0x81)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 25mn 10s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz

    Audio #3
    ID : 130 (0x82)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 25mn 10s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz

    Menu
    Format : DVD-Video
    -----------------------------------------------------------------------------------------------------

    Complete name : C:\Documents and Settings\...\VTS_01_2.VOB
    Format : MPEG-PS
    File size : 693 MiB
    Duration : 17mn 27s
    Overall bit rate : 5 548 Kbps

    Video
    ID : 224 (0xE0)
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, Matrix : Default
    Duration : 17mn 27s
    Bit rate mode : Variable
    Bit rate : 3 819 Kbps
    Nominal bit rate : 4 800 Kbps
    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 4/3
    Frame rate : 25.000 fps
    Standard : PAL
    Colorimetry : 4:2:0
    Scan type : Interlaced
    Scan order : Bottom Field First
    Bits/(Pixel*Frame) : 0.368

    Audio #1
    ID : 128 (0x80)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 17mn 27s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Video delay : -480ms

    Audio #2
    ID : 129 (0x81)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 17mn 27s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Video delay : -480ms

    Audio #3
    ID : 130 (0x82)
    Format : AC-3
    Format/Info : Audio Coding 3
    Duration : 17mn 27s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : L R
    Sampling rate : 48.0 KHz
    Video delay : -480ms

    Menu
    Format : DVD-Video
    --------------------------------------------------------------------------------------------------------

    This is the output for the avi I took the video from:
    --------------------------------------------------------------------------------------------------------


    Complete name : C:\Documents and Settings\...\video.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 664 MiB
    Duration : 42mn 41s
    Overall bit rate : 2 174 Kbps
    Writing application : VirtualDubMod 1.5.4.1 (build 2066/release)
    Writing library : VirtualDubMod build 2066/release

    Video
    Format : MPEG-4 Visual
    Format settings, BVOP : Yes
    Format settings, QPel : No
    Format settings, GMC : 2 warppoints
    Format settings, Matrix : Default
    Muxing mode : Packed bitstream
    Codec ID : DX50
    Codec ID/Hint : DivX 5
    Duration : 42mn 41s
    Bit rate : 1 741 Kbps
    Width : 608 pixels
    Height : 272 pixels
    Display aspect ratio : 2.25
    Frame rate : 23.976 fps
    Resolution : 24 bits
    Colorimetry : 4:2:0
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.439
    Stream size : 531 MiB (80%)
    Writing library : DivX 5.1.0 (UTC 2003-09-02)

    Audio #1
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Codec ID : 55
    Codec ID/Hint : MP3
    Duration : 42mn 41s
    Bit rate mode : Constant
    Bit rate : 160 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Resolution : 16 bits
    Video delay : 24ms
    Stream size : 48.8 MiB (7%)
    Alignment : Aligned on interleaves
    Interleave, duration : 42 ms (1.00 video frame)
    Interleave, preload duration : 504 ms

    Audio #2
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Codec ID : 55
    Codec ID/Hint : MP3
    Duration : 42mn 29s
    Bit rate mode : Constant
    Bit rate : 128 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Resolution : 16 bits
    Video delay : 4ms
    Stream size : 38.9 MiB (6%)
    Alignment : Split accross interleaves
    Interleave, duration : 42 ms (1.00 video frame)
    Interleave, preload duration : 500 ms

    Audio #3
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Codec ID : 55
    Codec ID/Hint : MP3
    Duration : 42mn 26s
    Bit rate mode : Constant
    Bit rate : 128 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Resolution : 16 bits
    Video delay : 20ms
    Stream size : 38.9 MiB (6%)
    Alignment : Split accross interleaves
    Interleave, duration : 42 ms (1.01 video frame)
    Interleave, preload duration : 500 ms

    -----------------------------------------------------------------------------------------

    The edit is the same and there is no logo at the beginning.
    When I test the encoded file with the audio they seems to be in sync at the start but progressively they go out.
    I'm trying to fix it in VirtualDubMod saving the audio one portion at a time and then resync the rest changing the delay but is a PITA.
    Quote Quote  
  10. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    There is something screwy going on.

    The PAL version has a running time of 42 minutes 37 second, at 25 fps.

    The NTSC version has a running time of 42 minutes 41 seconds, at 23.976 fps.

    The NTSC version is only 4 seconds longer. If the edits are the same then the NTSC version should run 44 minutes 26 seconds (approx).

    Add to the fun that all three NTSC audio tracks run at different lengths.

    If these videos have exactly the same edit, then you should find that the PAL audio, and the NTSC video match up almost exactly without conversion.
    Read my blog here.
    Quote Quote  
  11. Uhm, I see your point.
    I don't know where the trick is.
    BTW, the segment-by-segment method doesn't work.
    Quote Quote  
  12. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    If the edits are the same then you should not have to segment it. Worst case you should be able to load the audio into Audacity, time stretch it to fit, and save a new version.
    Read my blog here.
    Quote Quote  
  13. How do I do that into Audacity?
    Quote Quote  
  14. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Effect -> Change Temp. Enter a new duration and click OK
    Read my blog here.
    Quote Quote  
  15. Ok, I will try tomorrow (it's 3 a.m. here).
    Thanks.
    Quote Quote  
  16. Yeah, with the PAL version about the same length as the NTSC version, it looks as if the PAL version may be field blended from being created from the NTSC master, with the only differences being (perhaps) the logo(s) shown before the video starts, the credits at the end, or the amount of black frames at the beginning and/or end. Among other things, this means you don't need the AssumeFPS line. And, personally, I'd handle the audio outside of AviSynth.

    As for the jerkiness, it wasn't created by the script so it's either from the source AVI or from the encode.

    Is the PAL version really about the same length as the NTSC version? If so, what's this represent:
    Duration : 25mn 10s
    And if this is the same video, why is it considerable longer than the 23.976fps AVI? And why is a PAL DVD being used when you specifically said earlier (I think) that the audio was coming from a different AVI? I'm confused.

    This kind of begs the question, though, and that's why mess with the NTSC AVI version at all, if you have a working PAL AVI (and DVD?) version? Is that 25fps AVI so bad?
    Quote Quote  
  17. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    The PAL running times are shown across two VOBs. One runs 25mn 10 s, the other 17 mn 27s, giving a combined running time of 42 mn 37s.
    Read my blog here.
    Quote Quote  
  18. Thanks, I had it all wrong there. But the other question still stands (unless I messed up something there as well), and that's why is he messing with an NTSC derived 23.976fps AVI at all if he also has a PAL derived 25fps AVI (and a PAL DVD?) source to use? Is he switching or adding languages that the PAL one doesn't have? Is there something wrong with the PAL video?
    Quote Quote  
  19. I see I have to be more clear.
    This is the story: I have this PAL DVD with a series of anime episodes, two of them have the video screwed up (maybe for a NTSC-PAL conversion not done properly). I have this two episodes in avi format but they are 608x272 23.976fps. The idea was to take the 25fps audio tracks from the DVD (which are better than the audio tracks from the avi) and the video from the avi files, re-encode to PAL DVD standard, remux with the audiotracks and replace the messy episodes in the original DVD structure (in order to keep menus etc...).
    But now I am not able to perfectly match the video and audio to keep them in sync for the entire running time.
    Now I'm gonna try to work the audio with Audacity and see if it works.
    Quote Quote  
  20. Unless there's something really bad about the audio in the 23.976fps AVIs, it sounds to me like it would a heck of a lot easier to just use the audio from the AVI, converting it to AC3 audio if it's MP3. It'll save you beating your head against a wall trying to get the audio from the PAL DVD to fit.

    Either that or reencode the bad PAL video. If you have a small sample you'd like to upload somewhere, we can tell you if it can be fixed.
    Quote Quote  
  21. Thanks manono for your advice but I've worked the audio from the DVD with Audacity (stretched it of about 2 sec), then tested it with the video and they appear in sync (at least at an acceptable degree) so I think I'm going that way.
    Maybe I'm missing something but shouldn't I to speed up the audio (23.976->25fps) in your scenario ?
    Because if that is the case the speed change is clearly audible (I've tested it).
    One thing I don't get is why the 23.976fps avi has almost the same running time of the 25fps audio from the DVD.
    Anyway, now I'm gonna put my hands on the other episode, hoping everything works fine.
    Quote Quote  
  22. Originally Posted by Instant Martian
    Maybe I'm missing something but shouldn't I to speed up the audio (23.976->25fps) in your scenario ?
    Not if you use the pulldown method.
    Quote Quote  
  23. Originally Posted by Instant Martian
    Maybe I'm missing something but shouldn't I to speed up the audio (23.976->25fps) in your scenario ?
    jagabo answered that one. You can keep both the video and audio (from the AVI, not from the PAL DVD) unchanged in length by applying DGPulldown for 23.976->25fps after encoding the 720x576 resolution video at 23.976fps. Or apply pulldown for 24->25fps and use the PAL audio unchanged (read below for the reason why that will work (maybe)).
    Originally Posted by Instant Martian
    One thing I don't get is why the 23.976fps avi has almost the same running time of the 25fps audio from the DVD.
    Because your PAL DVD was created from an NTSC master, and has the same length as it. But not the same length as the 23.976fps AVI, the same length as the 24fps source for the PAL DVD. That is, assuming the exact same content (frame count, mainly), if you stretch/lengthen the PAL audio by a factor of 24/23.976=1.001, it should synch up perfectly with the 23.976fps AVI video. Or, as I mentioned above, if you shorten the NTSC video slightly to 24fps speed, with any luck you can use the PAL audio unchanged. Now, you said you lengthened the audio by about 2 seconds, while guns1inger's figures earlier showed there to be a 4 second difference between the 2 (which is what I used when confirming my own figures). So...

    And as I mentioned before, to be sure of what was done to create that PAL DVD a sample would be needed.
    Quote Quote  
  24. Not knowing what hardware the OP has, my way would be play it on a Philips dvd player and set output to PAL, and record onto a dvd recorder or even capture to a computer.

    Why is it I find all the solutions to ntsc<>pal so complicated?
    PAL/NTSC problem solver.
    USED TO BE A UK Equipment owner., NOW FINISHED WITH VHS CONVERSIONS-THANKS
    Quote Quote  
  25. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Because we try to avoid needless analogue processes in a digital chain where ever possible.
    Read my blog here.
    Quote Quote  
  26. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Some of the information on this guide may help you with PAL>NTSC and NTSC>PAL work. In this exact case, not all of it will apply, but some of the basic concepts should help you understand the process better, with some suggestions on software that can achieve your goals.

    Guide at http://www.digitalfaq.com/dvdguides/convert/standards/standards.htm
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  27. Thanks to all of you guys for your time!

    Originally Posted by jagabo
    Originally Posted by Instant Martian
    Maybe I'm missing something but shouldn't I to speed up the audio (23.976->25fps) in your scenario ?
    Not if you use the pulldown method.
    Maybe this is a silly question but since I'm a newbie you will forgive me: what does pulldown do exactly?

    Originally Posted by manono
    Now, you said you lengthened the audio by about 2 seconds, while guns1inger's figures earlier showed there to be a 4 second difference between the 2 (which is what I used when confirming my own figures). So...
    I checked the lenght of the encode "pulldowned" video (42m 40.88s) and of the PAL DVD audio track (42m 38.44s). The difference appears to be 2.44s. Doing so the video goes in sync with audio (even if I don't know exactly why

    Originally Posted by lordsmurf
    Some of the information on this guide may help you with PAL>NTSC and NTSC>PAL work.
    Thanks for the guide.
    Quote Quote  
  28. Originally Posted by Instant Martian
    what does pulldown do exactly?
    http://en.wikipedia.org/wiki/Telecine

    Interlaced PAL TV runs at 50 fields per second, NTSC at 59.94 fields per second. There are no frames in the analog interlaced signal -- it's always a series of fields. You see only one field at a time on an interlaced TV screen. Each frame of digital video has to be sent to the TV as a series of fields. Each frame consists of two fields, all the even numbered scanlines in one field, all the odd numbered scanlines in the other. The signal always atlernates between even and odd fields. Pulldown flags tell the DVD player how to output the fields from the frames.

    Pulldown flags are most often used to display 23.976 frame per second video as 59.94 fields per second for TV. 3:2 pulldown is the usual pattern. Half the frames are displayed for 3 fields, half for 2 fields. The result is an average of 2.5 fields per frame. 23.976 * 2.5 = 59.94.

    film frames: 1 2 3 4...
    3:2 pulldown: 1e 1o 1e 2o 2e 3o 3e 3o 4e 4o

    The end result is 59.94 fields per second with exactly the same running time as the original 23.976 frames per second video. This is comparable to increasing the frame rate by displaying frames faster but duplicating occasional frames (1 out of every 4 for 23.976 to 29.97 fps). Except fields are duplicated not frames. The result less obvious jerks from the duplicates.

    When using pulldown flags to display 23.976 frame per second video at 50 fields per second an extra frame worth of video has to be created every second (plus 1 extra frame every 1000 frames to make up for the difference between 23.976 and 24 fps). This is done by sending one extra field every 12 frames.

    first 12 frames: 1 2 3 4 5 6 7 8 9 10 11 12
    pulldown: 1e 1o 2e 2o 3e 3o 4e 4o 5e 5o 6e 6o 7e 7o 8e 8o 9e 9o 10e 10o 11e 11o 12e 12o 12e

    second 12 frames: 13 14 15 16 17 18 19 20 21 22 23 24
    pulldown 13o 13e 14o 14e 15o 15e 16o 16e 17o 17e 18o 18e 19o 19e 20o 20e 21o 21e 22o 22e 23o 23e 24o 24e 24o

    The end result is that 23.976 frames per second is displayed as 50 fields per second without changing the running time.
    Quote Quote  
  29. It's a little technical
    The bad news is that the method that worked for the first episode doesn't for the second one.
    I can't get the sync, even with the audio from the same avi I took the video from
    Quote Quote  
  30. Originally Posted by Instant Martian
    It's a little technical
    Just think of it as repeating fields instead of repeating frames. That's all it is.

    There are basically two ways you can change frame rate:

    1) Simply display each frame for a longer or shorter period of time. The video will play smoothly but the running time will change. For example, if you simply flip through a 24 fps video at 25 fps the running time will be shorter by 4 percent.

    2) Display each frame for a longer or shorter period of time but remove or duplicate frames to maintain the same running time. For example, you flip through a 24 fps video at 25 fps but display every 24 frame twice. The overall running time is the same but you get a little jerk every second.

    With video you can do these on a field basis rather than a frame basis.

    Your problem isn't one of simple frame rate conversion. You have files of unknown and questionable pedigree. So there's no way of knowing how they were mistreated previously.
    Quote Quote  



Similar Threads

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