VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    I'm sorry to possibly contravene the forum rules a bit here but I honestly can't explain this problem without identifying the file source. I'm no newbie when it comes to converting AVI files to SVCD but in this instance I just can't get it to work no matter what I try. The files I'm trying to convert are the XviD AVIs of the TV show 'The O.C.' which are slowly being released on buckTV.

    No matter what I try I simply cannot get the audio to sync up and stay synced with the video once converted to SVCD. If I play the straight AVI in Media Player Classic, there is a 1 second out of sync with the audio earlier than the video. Playing the file in PowerDVD however is perfect. Conversion to SVCD results in the same problem as seen in MPC. If I manually insert a 1 second silence in the audio track, then it starts out synced but quickly becomes out of sync again.

    I'm out of ideas and getting desperate here as I don't have a TV-out socket on my computer, so conversion is an absolute must. I can't help but think that these particular encodes have been done with a very new XviD version and done in some special way that makes them of high quality but with the downside of being very very difficult to convert to anything else.

    This appears when I try to play them in MPC.



    I don't know whether this is related to the problem or not, but I've never seen it before with any other file I've played in MPC and I don't know what it means either. If anyone has had any success converting these particular AVI files then I would really appreciate knowing how you did it.
    Quote Quote  
  2. Have you tried opening up those xvid files in VirtualDub (the original version, not that VirtualDubMod or NanDub crap which let you throw everything but the kitchen sink at them). If VirtualDub complains about "improper VBR audio" then that is mose likely the source of your sync issues.

    A lot of these TV rips being released to Xvid use VBR mp3 for audio, which is what I think the problem is. My brief experience with VBR mp3 audio in xvid files [ 24, smallville, csi ] has shown that the easiest way would be to save the audio to WAV and use the WAV file as the audio source. You can do this in either TMPGEnc or VirtualDub. Now I haven't gotten a proper WAV from Vdub straight up (just passing the AVI file as is), I've always had to use an AVS script with:

    Code:
    AVISource("NameOfAVIfile.avi")
    EnsureVBRMP3Sync()
    before VirtualDub would spit out a WAV file that is still in sync with the original AVI. TMPGEnc should export to WAV no problem without having to use a AVISynth script; but on those rare occasions where TMPGEnc won't work then the above AVS script passed to VirtualDub before "Save WAV..." should do the trick.

    Funny thing about MPC is that I cannot get any divx/xvid w/vbr mp3 audio to play in sync, but Media Player 6.4.xxx and even MediaPlayer9 play those exact same files with no audio/video sync issues. But I haven't played around enough with MPC's settings so I don't think MPC is the problem.
    Quote Quote  
  3. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Thanks for your reply

    Originally Posted by deadpac
    Have you tried opening up those xvid files in VirtualDub
    Yes I have. Like I said, I not a newbie to doing these conversions, so for sure I am an experienced user of VDub and yes you are right, the included audio stream is VBR MP3 @ 48kHz. I have used GoldWave to extract the audio as WAV, downsampled it to 44.1kHz, time warped it (when I was trying a PAL conversion as one thing to try and get around the problems I am having), and maxmise the volume. I have then used that resulting WAV as the audio input to TMPGEnc for the conversion.

    If VirtualDub complains about "improper VBR audio" then that is mose likely the source of your sync issues.
    I have tried doing the conversion in one step with AVI video input & WAV audio input with TMPGEnc, then I tried it as separate elementary stream which I then multiplexed together with both TMPGEnc & Womble and (just to make sure) I tried the - not recommended - method of using the AVI for both video and audio inputs. Nothing works. They all end up with the same massive audio sync problem. I can't understand what's so special about these particular files because the methods I use work perfectly for every other AVI file I've ever had reason to want to convert to SVCD, and I've converted many, many AVI files I assure you with a great variety of different audio & video codecs in use.


    Funny thing about MPC is that I cannot get any divx/xvid w/vbr mp3 audio to play in sync, but Media Player 6.4.xxx and even MediaPlayer9 play those exact same files with no audio/video sync issues. But I haven't played around enough with MPC's settings so I don't think MPC is the problem.
    Yes I agree this is strange. This is the only other consistent thing that I'm finding with these files. To date, MPC has been able to play everything I've thrown at it perfectly - and TMPGEnc has been the same in that it has converted everything I've thrown at it no problem. Now all of a sudden, I've got these O.C. episodes which both MPC & TMPGEnc are having huge difficulties with. PowerDVD is the only thing I can get so far to play them properly. If there was a way to frameserve to TMPGEnc through PowerDVD, I might have a solution.
    Quote Quote  
  4. It could be a framerate issue. Most if not all of those horrible Xvid TV shows have a 23.976 NTSCfilm framerate. If the audio is not converted at the right framerate then you're going to end up with sync issues.

    A framerate conversion of the AVI could help. And to prevent sync issues why not also use AVISynths high quality audio sampling rate conversion.

    Code:
    AVISource("NameOfFile.avi")
    ConvertToYUY2()
    ConvertFPS(29.970)
    ResampleAudio(44100)
    ConvertToRGB24()
    #24 fps if your target was for PAL SVCD
    #and if you're not worried about dropped/inserted frames then use
    #ChangeFPS(29.970)
    #instead of ConvertFPS
    I find a AVS script is the simplest way to change the fps of an avi without having to re-encode and save an entirely new AVI.

    I converted to YUY2 colorspace because I think ConvertFPS only works in that colorspace and not RGB, but I convert back to RGB24 for compatability with TMPGEnc.

    I usually choose AVISynth for things like this but you could easily do all of this in VirtualDub. I just don't like having to encode/save a new avi or use vdub's frameserver; with AVS just punch out a couple of lines and pass to TMPGEnc.
    Quote Quote  
  5. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Originally Posted by deadpac
    It could be a framerate issue. Most if not all of those horrible Xvid TV shows have a 23.976 NTSCfilm framerate. If the audio is not converted at the right framerate then you're going to end up with sync issues.

    A framerate conversion of the AVI could help. And to prevent sync issues why not also use AVISynths high quality audio sampling rate conversion.

    Code:
    AVISource("NameOfFile.avi")
    ConvertToYUY2()
    ConvertFPS(29.970)
    ResampleAudio(44100)
    ConvertToRGB24()
    #24 fps if your target was for PAL SVCD
    #and if you're not worried about dropped/inserted frames then use
    #ChangeFPS(29.970)
    #instead of ConvertFPS
    I find a AVS script is the simplest way to change the fps of an avi without having to re-encode and save an entirely new AVI.

    Thanks for your help and suggestions. I'm afraid however that I'm gonna need a lot of help with the AVIsynth issue though. I'm very new to AVIsynth and haven't really got a handle on what it does or how to make it work.

    With the help of someone else I have managed to do the following:

    I used the following AVI script...

    Code:
    AVISource("D:\The O.C.\The O.C. S1E05 23.976.avi") 
    EnsureVBRMP3Sync()
    ...to frameserve into TMPGEnc the file I wanted to convert. I then instructed TMPG to perform the telecine and output an MPG at 29.97. To my amazement this actually worked! The audio stayed in sync and the end result plays just fine. I don't know why this worked whilst everything else I tried before AVIsynth didn't, but I don't really care as long as I can eventually get it to work.

    Whilst I'm happy that I appear to have found a solution to the audio sync problem, the end result is not exactly what I was after. I was hoping to be able to do a framerate conversion at the same time to output a PAL MPG instead of an NTSC one. As you said the source of this TV encode is a 23.976fps AVI file so there are no IVTC issues involved here - it's just a straight speed-up that's required to get it to 25fps.

    Can you help me with modifying the above simple script to include a framerate conversion from 23.976 -> 25fps for me? As I said, I'm very green to AVIsynth so I'd like to keep it as simple as possible for the time being and just get AVIsynth to do the bare minimum for me and I'll get TMPG to do whatever else I need like cropping/resizing etc. after the frameserve.

    I have tried using AVIFrate to change the frame rate flag of the AVI to 25fps, but this didn't work (audio out of sync again). I also tried using a GoldWave modified 25fps WAV version of the audio stream from the original D/L'd AVI file as the input for the audio into TMPG instead of the AVI file but this resulted in the dreaded audio sync problem again as well.

    Thanks.
    Quote Quote  
  6. With the help of someone else I have managed to do the following:

    I used the following AVI script...

    Code:
    AVISource("D:\The O.C.\The O.C. S1E05 23.976.avi") 
    EnsureVBRMP3Sync()
    I'm pretty sure that someone else was me
    Deadpac wrote:
    I've always had to use an AVS script with:

    Code:
     
    AVISource("NameOfAVIfile.avi") 
    EnsureVBRMP3Sync()
    "How quickly they forget!"

    No but seriously as per you request here is what I would do to accomplish what you asked

    Code:
    AVISource("D:\The O.C.\The O.C. S1E05 23.976.avi")
    ConvertToYUY2()
    ConvertFPS(25)
    EnsureVBRMP3Sync()
    ResampleAudio(44100)
    ConvertToRGB24()
    #deadpac did this script for you, don't forget :)
    The last line in the code is meant as a joke, don't take that too seriously. I mean because I've been the only one who's posted in your thread and while it is possible somebody else helped you in some other avenue, the code I posted immediately after you initial post is an exact equivelant to the code you say "somebody" else helped you on. As always with text it's a little bit harder to convey emotion and you're saying that "somebody" else helped you kind of took me for a quick loop and I didn't know wether to laugh or be mad. But more likely than not is was just an honest mistake on your part that I overreacted to by inserting that stupid last line in the script. "no worries though mate, hopefully " Anyways...

    If you just want to simply insert frames to go from 23.976 to 25 then you could use ChangeFPS(25) instead of ConvertFPS(25). I just have a preference to ConvertFPS because no frames are dropped or inserted; but that's just my preference no kind of technical proof other than my videos come out clean with no sync issues .

    I myself have never used "EnsureVBRMP3Sync()" in an AVS script that I was going to convert to video because I've always saved out to WAV for the audio source so I couldn't tell you what would happen if you just used that script for the video and audio source. I've only used that function of AVISynth for playback purposes. More likely than not that line in the code is not going to affect the outcome of the video/audio sync but just to be safe. My advice would be to encode 2 small one minute clips with that script; the first encode keeping the "EnsureVBRMP3Sync()" active and then the 2nd encode just comment out "EnsureVBRMP3Sync()" with the pound symbol "#" like so. Whichever version kept video/audio in sync is the one you should use, but it may also come out that both scripts work perfectly in which case I worried for no reason; I only mention this cause with my experience with TMPGEnc is that it handles VBR mp3 audio very well without having to use "EnsureVBRMP3Sync()"; your experience might be different from mines so the only way to know would be to try for yourself and see what happens.

    Code:
    #encode number 2
    #EnsureVBRMP3Sync()
    #disabled
    Good luck with your conversion, hopefully you don't have anymore sync issues!!
    Quote Quote  
  7. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Originally Posted by deadpac
    With the help of someone else I have managed to do the following:

    I used the following AVI script...

    Code:
    AVISource("D:\The O.C.\The O.C. S1E05 23.976.avi") 
    EnsureVBRMP3Sync()
    I'm pretty sure that someone else was me
    Deadpac wrote:
    I've always had to use an AVS script with:

    Code:
     
    AVISource("NameOfAVIfile.avi") 
    EnsureVBRMP3Sync()
    "How quickly they forget!"
    Sorry, yes of course you are correct. You did indeed give me that instruction. The thing was though that I didn't understand what you were telling me at that time and I ended up actually following the very same advice given to me by someone called Fink in New Zealand over on the buckTV forum instead http://forum.bucktv.net/viewtopic.php?p=20329&sid=c5a0611527af32d6233de1c91aa22938#20329

    Of course if you and 'Fink' are one and the same person then you're even more right again

    No but seriously as per you request here is what I would do to accomplish what you asked

    Code:
    AVISource("D:\The O.C.\The O.C. S1E05 23.976.avi")
    ConvertToYUY2()
    ConvertFPS(25)
    EnsureVBRMP3Sync()
    ResampleAudio(44100)
    ConvertToRGB24()
    #deadpac did this script for you, don't forget :)
    Okay. A couple of questions on this script if I may.

    1) Do I have to use the ResampleAudio line? Can't I just let TMPGEnc do the resample down from the original AVI 48kHz rate?

    2) I think I might be confusing myself here by trying to get too smart too quickly by actually reading the AVIsynth documentation, but in that there is a command called AssumeFPS which sounds to me like more the sort of conversion I thought I needed. It sounds like just a straight forward speed-up of the play speed of both audio & video which I though was the accepted way to convert NTSCFilm to PAL. I don't understand all that is written about the ConvertFPS function but it sounds terribly complicated. It also requires that dual colourspace conversion either side as well. Is it possible to simplify things by using the AssumeFPS function instead?

    If you just want to simply insert frames to go from 23.976 to 25 then you could use ChangeFPS(25) instead of ConvertFPS(25). I just have a preference to ConvertFPS because no frames are dropped or inserted; but that's just my preference no kind of technical proof other than my videos come out clean with no sync issues .
    No. I'd prefer to not do any sort of telecineing (if that's even a word) or frame duplication/inserting if at all possible. Whenever telecine or 3:2 pulldowns have been required in any conversions I've down thus far the end result has always been something less than absolutely perfect, so if I can avoid that sort of thing I will. In my experience you're asking for trouble if you start doing that sort of thing. I don't notice the 4% change in running time or the very small audio pitch change that results in such a conversion, so it's no bother to me.

    I myself have never used "EnsureVBRMP3Sync()" in an AVS script that I was going to convert to video because I've always saved out to WAV for the audio source so I couldn't tell you what would happen if you just used that script for the video and audio source.
    I have tried both methods. I don't know what it is about these particular XviD files I have but the WAV input procedure doesn't work (sync issues) whereas using the AVI as audio input with the EnsureVBRMP3Sync line in the script does work. It sounds weird I know because usually all the advice says that to avoid sync issues with TMPG you should always use an extracted WAV as the input (which I have always done with great success up until now), but in this particular case with these files I am trying to convert here the opposite seems to be true.

    My advice would be to encode 2 small one minute clips with that script; the first encode keeping the "EnsureVBRMP3Sync()" active and then the 2nd encode just comment out "EnsureVBRMP3Sync()" with the pound symbol "#" like so.
    # pound symbol??? I've never heard that called a pound symbol before. Here it means 'number'. A pound symbol is either £ or lb depending on whether you're talking about money or mass. It doesn't matter of course but it's useful to know that it's a comment symbol in an AVS script.

    Thanks for all your help. I'll see how I get on.
    Quote Quote  
  8. I am having the same problem! I think we have the same releases, I am having this problem with other shows as well. 24, Tru Calling, Enterprise, etc.

    I cant convert them to SVCD, but what I really want to do is have them play on my standalone divx player. Here is a link to the forum in which we are discussing what I think the problem is. A synchronous Blit!

    https://www.videohelp.com/forum/viewtopic.php?t=201602

    --Matthew
    Quote Quote  
  9. DRP
    Of course if you and 'Fink' are one and the same person then you're even more right again
    No I am not Fink, but he sounds like a smart guy.

    Deadpac
    while it is possible somebody else helped you in some other avenue
    I made sure to insert that line into my rant........

    1) Do I have to use the ResampleAudio line? Can't I just let TMPGEnc do the resample down from the original AVI 48kHz rate?
    Totally but I wouldn't recomment using TMPGEnc's internal sampling rate converter do it because a lot of people have stated that it's quality is not that great preferring instead to go with the high quality external program SSRC. I go back and forth between AVS sampling rate conversion and SSRC and both give me no problems, either one should do the trick.

    Is it possible to simplify things by using the AssumeFPS function instead?
    That's the great thing about AVISynth scripts, you can just change a couple of lines in a script and try out somthing else. Give it a shot I don't see why not; in my brief experience with AVS I've never used AssumeFPS, only ChangeFPS() and ConvertFPS(). I've only been using FPS functions of AVISynth for the past week or so [around 4 scripts/day 'syndication' ]. Up until then I had been using VirtualDub to adjust the framerate with no problems.

    # pound symbol??? I've never heard that called a pound symbol before. Here it means 'number'. A pound symbol is either £ or lb depending on whether you're talking about money or mass. It doesn't matter of course but it's useful to know that it's a comment symbol in an AVS script.
    I was just thinking in terms of the phone, I should have just said number symbol which is what I usually use it's just that I've had 2 120gb WesternDigital drives die on me and being on hold with their RMA department had me going through A LOT of phone prompts. "Please enter such and such info follow by the Pound sign"..........
    Quote Quote  
  10. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Originally Posted by Mdanner423
    I am having the same problem! I think we have the same releases, I am having this problem with other shows as well. 24, Tru Calling, Enterprise, etc.

    I cant convert them to SVCD, but what I really want to do is have them play on my standalone divx player. Here is a link to the forum in which we are discussing what I think the problem is. A synchronous Blit!

    https://www.videohelp.com/forum/viewtopic.php?t=201602

    --Matthew
    That's great! I'm very pleased to hear somebody else acknowledging this problem exists. I was starting to think that there was something wrong with my computer or that I was just simply going insane and imagining it How did you find out about this "asynchronous blit" thingo?
    Quote Quote  
  11. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    @Deadpac

    I'm happy to report that the script you gave me has worked. The resulting file ended up a little too big for me to burn to disc but that's just my fault in getting the bitrate calculation wrong. I haven't tried the AssumeFPS function yet but I will on the next one to see if it makes a difference.

    Thanks for your help.

    Edited from here on...

    It's weird but I can't get this AssumeFPS command to work at all. I always end up with an audio sync problem - not the same one as I had before but it sounds like the video is being sped up correctly but the audio isn't (despite what the AVS documentation says should be happening) The gap between audio and video progressively gets greater and greater with audio being late. Classic symptom of audio at 23.976 and video at 25. Oh well, I guess I'm back to the ConvertFPS method again. This is the only thing that I've been able to get working at all.
    Quote Quote  
  12. Good thing I found this topic. Oddly enough I've been trying to burn "Tru Calling" to VCD but the audio sync was really bad. Some shows would have audio a second too soon while others were too late ... and everything in between. I solved the problem by extracting the audio and saving it as a wav, saving the video without audio, and then combining it with (a try until it works method) of adding or removing seconds in the interleaving menu.

    Once I got it all figured out I was bouncing off the walls with joy ... but then once I burned them about 20 minutes into each show these little patches of slight distortiion kept coming up. That also unfixed my audio sync ... making me so happy. The flashes of distortion kept getting bigger until it filled the screen. It eventually went away but left my audio sync all messed up.

    Anyone have any ideas?
    Quote Quote  
  13. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Install the very latest RC2 of the XviD codec and all your audio sync problems with these TV encodes will be solved!!

    I installed RC2 yesterday and lo and behold, my O.C. episodes now play perfectly in whatever player I choose and I can encode them without AVS scripting anymore and they come out perfect.

    The XviD developers appear to have added whatever support was needed for these particular type of encodes to play properly with this latest release.
    Quote Quote  
  14. Member teegee420's Avatar
    Join Date
    Dec 2003
    Location
    Southern California
    Search Comp PM
    Wolverine_Ecks, Not sure you tried this already but here goes. Instead of trying to fix the problem by changing the interleaving values, just extract the wav(with full processing mode if using Vdub) and use the wav as the audio source for whatever mpeg encoder you are using. It wouldn't hurt to check the avi for bad frames with Virtualdub MP3 either.

    On a side note, I'm glad that there are some Tru Calling fans on this board! I ended up downloading the first few eps but since then I've been capturing and converting to Divx myself. I use Xvid for DVD rips but I prefer Divx for converting my captures.
    Quote Quote  
  15. I tried that with great improvement but thanks anyway teegee. I've gotten everything fixed though. TMPEGEnc got rid of the small flashing distorted patches and I still use the interleaving to fix the audio sync problem. So far everything that I've burned this way came out great.

    Tru Calling is a great show though. I love the concept of the story with the plot twists to fool you. Not to mention that Eliza Dushku is the leading role ....
    Quote Quote  



Similar Threads

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