1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Movie going slowly out of sync

Discussion in 'Video - Software discussion' started by Dwayno, Jan 15, 2004.

  1. Dwayno

    Dwayno Member

    Joined:
    Nov 27, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    16
    Hi there,
    I've just encoded an XVID to DVD. On playback, from the beginning of the film it's great but then the sound eventually slowly goes out of sync. If you select one of the last chapters or fast forward then the sync loss is even worse.
    The film is The Two Towers, I've spent the last week encoding the entire film using tMPG, I'm using MP3 as the audio compression. Is there something I can do to improve the sync? If I have to reencode then I'm not going to bother. Encoding takes too long and the results don't seem to be worth it.
    Thanks
     
  2. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    Well Firstly Mp3 is not a Valid Audio compression for DVD only Mp2 ,Wav/LPCM, AC3 and DTS are Valid for DVD,..What sometimes happens for whatever reason if that whenb encodeing the audio and video slowly drift apart so by the end of the movie the audio and Video lengths are different and that is what causes the Sync Problem..What can sometimes be done when the audio and Video Are differant lengths is to stretch or shrink the Audio to the exact same length of the Video and then that should solve the Problem..What you would have to do is Demux your Mpeg file inso a seperate audio and Video file ,Now you are going to have to find out the exact length of the Video file, You can do this by loading the Video File into a Program Like "Virtual-Dub-Mpeg2"
    Virtual-Dub-Mpeg2
    http://fcchandler.home.comcast.net/stable/VirtualDub-MPEG2.zip
    and then go to "file" to "File Information" and it will tell you the exact length of the Video ,If you load the Out of Sync Mpeg file in here it will also tell you the exact length of both the audio and Video so you can see if there is a Differance between them..
    After finding out the exact length of the Video you will need to use a Audio editing Program Like "GoldWave" which has a Feature Called "Time Warp" which is under "Effects" and in here you can put in the Length of the Video File and it will stretch or shrink the Audio to the length of the Video then same the New File and you can Multiplex it together with Tmpgenc"s Mpeg tools to see if it is in sync and then author it to DVD....I have used this method to Fix files that were up to 4 minutes out of Sync and it worked perfectly....
     
  3. Dwayno

    Dwayno Member

    Joined:
    Nov 27, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    16
    Thank you very much for that Minion, I will try that out and let you know how I get on.
    regards
     
  4. Dwayno

    Dwayno Member

    Joined:
    Nov 27, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    16
    Hi Minion,
    Having some problems here, I decided to try out another xvid film I had encoded which was shorter and better quality. This had AC3 in it which I extracted. I then encoded the video to MP2. Authored the DVD with the M2v and Ac3 files. On play back the 5.1 is fine but I'm still having a sync problem as before. But not as bad though.
    I tried what you said by comparing the lengths, and there does seem to be a difference albeit very small. Video is 1:40:33 length and AC3 audio length is 1:40:33.632. However, Goldwave doesn't seem to support AC3 files which is a bit depressing. I don't really want to convert it to anything else. I did manage to load the AC3 file however to check the length out. I can even change the size via the effects > timewarp setting but there's no save option for AC3. Can I save as something else then convert it back or rename it?
    Why am I continually getting sync problems? I thought the AC3 would resolve the problem. Is there another tool I can use to change the AC3 length to match the video?
     
  5. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    Well The Sync problem Might be related to how you are encodeing these Files to DVD...What is the Frame rate of the AVI file you are encodeing to DVD ,And what Frame rate setting did you use in your Encoder?? Tmpgenc is a Little Notorius for Sync problems especially when it comes to 29.97fps NTSC Frame rate..It is because Tmpgenc treats 29.97fps Drop Frame and 29.97fps Non-Drop frame Time codes the same which can cause sync Problems over long movies, and encodeing 23.97fps AVI file to 29.97fps Mpeg files you can get Sync Problems if the Proper 3:2 Pulldown option isn"t enabled...What I would do, well it is actually what I do is if your Source AVI file is 23.97fps NTSC then encode it to DVD Resolution Mpeg 2 but useing the 23.97fps frame rate setting so you have a 23.976fps Mpeg2 DVD File, then to Make it 29.976fps standard DVD Frame rate you use a tool called "DoPulldown" to add the 3:2 Pulldown Flags to the Video file which makes it 29.976fps without changeing the length...I encode all Of my NTSC Film 23.976fps AVI files and even when I do DVD backups I use a simular method...You should try this before you start decodeing and stretching your AC3 audio file....Cheers
     
  6. Dwayno

    Dwayno Member

    Joined:
    Nov 27, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    16
    I'm following the DIVX\XVID to DVD-R guide, which is posted on this site, step by step, word for word:
    http://www.afterdawn.com/guides/archive/convert_avi_to_dvd.cfm

    I used the AVIcodec program to determine what the fps is as the guide says which is: 23.976 so it says to use NTSC. Then I use TMPEnc wizard and select DVD – NTSC as the guide says. The 3:2 pulldown when playback Encode mode is also selected, as per the guide. Are you saying that this guide is not entirely correct?
    A few questions about this Goldwave software. What do I save the edited MP2 file as? There's no option except a whole batch of MP3 options
    You also mentioned that I can decode and stretch the AC3 audio file, how do I do that? What do I decode it to precisely and do I convert it back? If so, would I lose any quality\settings? As far as your previous instructions, am I right in saying that the demuxed M2V and MP2 files which TMPGEnc creates, have to be the same length to avoid sync problems?
     
  7. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    No ,The Guide isn"t wrong it is Just that Tmpgenc has a Few Flaws that they absolutly Refuse to Fix or even agknowlege they even exist ,I had Many problems with them when I used to work for Tmpgenc Tech Support so I quite cuz I was getting the same Question about Problems that the author would not even agknowlege...
    And yes the audio and Video have to be the same length for the files to be in Sync But looking at the Lengths you posted they are the Right length it is Just that one of the Lengths goes into the Milli-seconds so There is No strectching that will fix this Problem...What I would Suggest is to Re-encode the File But encode it to 23.976fps and Make it 29.976fps By adding the 3:2 Pulldown Frags useing something like "DoPulldown" or "Pulldown.exe" Your DVD authoring program also might add the 3:2 Pulldown Flags to the file and make it 29.976fps....Cheers
     
  8. Mattrage

    Mattrage Regular member

    Joined:
    Sep 17, 2003
    Messages:
    193
    Likes Received:
    0
    Trophy Points:
    26
    Another method you can try in relation to the divx/xvid avi with mp3 audio uses VirtualDub. Open the avi in VirtualDub. In the Video menu, select Direct Stream Copy. In the Audio menu, select Full Processing Mode. Again in the Audio menu, select Compression, and in the dialog box that appears, select No Compression PCM. Then select File, Save as AVI, choose a filename for the new file (such as oldfilename-new) and let VirtualDub do its thing. The new file will have an uncompressed PCM stream instead of the VBR mp3 audio, and tmpgenc will handle that fine. This method always works for me, and was brought to my attention by Dela.
     
  9. Dwayno

    Dwayno Member

    Joined:
    Nov 27, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    16
    THanks guys I will try this out.
     
  10. wawilmsn

    wawilmsn Member

    Joined:
    Jan 25, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    I am having some of the same problems, trying to encode one of my NTSC VHS movies to DVD.
    I start with analog video card and Ulead Video Studio. It creates a good 9Mb/s mpeg2 file. Audio and video are perfectly in sync. but file is 8GB.
    I convert to dvd size file using TMPGENC. In order to eliminate horizontal lines during any movement, I found it is best to convert back to a "24" frame mode, since the original came from film. I use TMPGENC's "inverse telecine" function for the conversion. It produces "23.976 fpsstream at 29.97 fps" output. The problem is that the sound is no longer in sync. I can set it to "24 fps stream at 30 fps" output and the PC will play everything in sync perfectly, but it will not be accepted by the dvd authoring tools. They only take normal 29.97 fps video, not 30fps.
    I don't understand what is causing the problem. I have read about the problems with TMPGENC's drop frame/no drop frame, but I thought that drop frame only referred to counters/pointers. If I started with a video at 29.97 fps and related audio, which were the same length and in sync, and converted the video through inverse telecine (4 output frames for every 5 original) which plays back - 5 frames for every 4), the length on actuao playback should be exactly the same (using the standard 23.976, not the 24 fps rate).
    So ... two questions. 1. What did I miss; What is going wrong? and 2. Is there any "easy" way to fix it, through settings in TMPGENC -- or by changing flags in the file (I tried changing the flags in restream but things got worse).
    Thanks.
     
  11. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    Wawilmsn :Well Your Problem is that you can not Capture Interlaced Video at 29.97fps and do IVTC to 23.97fps, IVTC only works on Video Material That was Originally Film Material that has been Previusly Teliclined which your Captured Mpeg2 files are definately Not...If you are going to have to re-encode the Captured File anyways then Try captureing at the Highest Bitrate Possible Like 15,000kbs or 20,000kbs if possible and then re-encode so the File is Small enough to author to DVD ,This way you will have a Much Higher Quality file..And to get Rid of any Interlace artifacts(Which shouldn"t show up on TV anyways) Then use One of Tmpgenc"s 16 Different Deinterlace Filters...If you go into the Tmpgenc settings to the "Advanced settings" and look for the Deinterlace Filter in the List then Double Click It and then a window will pop up with your Video displayed in it and a Dropdown menu with your choice of 16 different Deinterlace Filters..If you Interlaced Video is Top Field first then the "Even field" Filter will Probably look Bast of the video is Bottom Field First the the "Odd Field" filter will probably look best...If you can you can also Capture your Video at 23.976fps But it will be Interlaced but when you re-encode it you can use a Avisynth Filter called "Smart Bob" which will turn each Interlaced frame into a true Progressive Frame then you could use the 3:2 Pulldown when Playback Frame rate setting but I think you would still get better results at 29.97fps ...If you used WinDVR 3.0 to capture you can adjust the Bitrate and Framerate settings more so you wouldn"t need to Re-encode ,and if you were going to you can set the Bitrate in WinDVR 3.0 all the way up to 20,000kbs and it will also capture the audio directly to Dolby digital AC3 Plus it is Probably the best Quality Mpeg2 capture Program there is......Cheers
     
  12. wawilmsn

    wawilmsn Member

    Joined:
    Jan 25, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    Minion: Thanks for the advice. I will look into WinDVR 3.0. Sounds like a winner.
    I understood much (most) of what you said, want to research some of it (options on re-encoding, etc. I don't want to drag this out, but let me make one clarification: The original source was a movie put on a professional VHS tape (Star Wars). Capturing the VHS video output through a video capture card to an MPEG2 file, and then looking at the MPEG2 frames, it seemed obvious to me that I was looking at the fields in the frame that had originally been created via a telecine process (some are clear, some are made up of two adjacent frames from the 24 fps movie. Doing the inverse telecine resulted in a "perfect" video in mpeg2 format. Perfect in that the video can be looked at frame by frame and each frame is complete, has no smearing, and is a single complete picture. The problem is in the sound/sync. The link to IVTC indicated that the inverse process gave 24 fps. Is that true or is the actual number 23.976 (or something close to that). If that information gives you insight into another solution please let me know. Otherwise, I may try the windvr 3.0 option ... and may do so anyway.
    Thanks again for your help.
     
  13. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    The Frame rates are dependant on the Video before IVTC if the Video is a True Non-drop Frame 30fps then after IVTC it would be 24fps But if the Video is 29.976fps then after IVTC it will be 23.976fps...The reason I said that you can"t use IVTC on your Captured Files is Because Most Analoge Capture Cards usually Capture Video in Fields No matter what the Source is ,Even DV Does this ,So if you capture at 30fps 60 fields per second you can not make up 24 Progressive frames per second from 60 fields...Maybe the IVTC Feature in tmpgenc can compensate for this or your Capture Card Captures Video dependant on the source material....If your PC is Fast enough you can Try Captureing directly to DV AVI useing a VFW DV Codec ,I have done this and the Quality was Very Good, and there is this program Called "DVFilm Maker" that Takes 29.97fps Interlaced DV AVI files and converts them into True Progressive 23.97fps files useing some form of interpolation to make the Progressive Frames and the Files converted to 23.97fps Look Just Like Film Material with no Artifacts what so ever, If you also wanted this try this method I could send you the Program and a VFW DV Codec to capture to, The codec is freeware and DVFilm Maker is not available anymore because the Company does not exist anymore so it is Basicly public domain ...Cheers
     

Share This Page