|
|
| vmalloc |
| Posted: Jan 3 2003, 10:48 PM |
 |
|
Unregistered

|
I've been working on this problem for at least 3 days now, and I figured I should try asking for help, because I really have no idea what's going on.
This may or may not be a Virtualdub bug, I'm attempting to assertain that here.
First, I start by recording using my capture card to MPEG-2 NTSC 29.97 frames. No problems there. The MPEG-2 file plays fine in WinDVD, there are no sync problems with the MPEG-2 file (unless WinDVD is somehow magically correcting them). The capture card is a Creative DigitalVCR, though since the mpeg-2 file works, it's probably irrelevant.
What I then do is take DVD2AVI 1.76, and create a project file. The audio is extracted and spit into a .mpa file that is saved alongside the project file.
I take the audio, and extract it to wav. I've used two programs to do this, Winamp's wave out and HeadAC3e, and both of them produce the same audio file (though HeadAC3e corrects for the delay, which eliminates another variable)
I then use AviSynth as a framebuffer, so that I can load the video into VirtualDub for processing and compressing. At this point, the audio slowly goes out of sync (its progressive). I tried mixing the audio at the avisynth point, and at the virtualdub point (Audio->Wav Audio), and it's out of sync at both points. I tried using the "change so audio and video durations match" setting in virtualdub in both instances, and that didn't work (this is what might be buggy.. I'm trying to find that out).
So, yeah. I'm stuck here. I'm basically trying to convert an mpeg-2 file to something that I can load into VirtualDub. I'm obviously doing something wrong here, because the audio is in sync on the mpeg-2 file, but not in virtualdub. I would think this would be some obvious thing I'm doing wrong, because pretty much everybody uses mpeg-2, and my exaustive searching has not found anything regarding this. Any ideas?
For reference, here is the avisynth script I tried for the audio:
LoadPlugin("C:\Program Files\AviSynth2\plugins\mpeg2dec.dll")
video=mpeg2source("project.d2v")
audio=WavSource("project.wav")
AudioDub(video, audio) |
 |
| fccHandler |
| Posted: Jan 3 2003, 11:31 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Hello.
First, I strongly suggest using VirtualDub to capture Huffyuv instead of capturing MPEG-2. This may be difficult or impossible to do depending on your hardware, but it's worth the effort to make it work.
I don't really know the answer to your problem, but I have a hunch that there really is nothing wrong with the sync, but your system isn't fast enough to playback the MPEG-2 in real time through Avisynth and VirtualDub. If so, this would cause the video to appear to lag behind in VirtualDub's preview, but it won't affect the output of your processing (the output AVI will still be in sync).
-------------------- May the FOURCC be with you... |
 |
| vmalloc |
| Posted: Jan 4 2003, 12:03 AM |
 |
|
Unregistered

|
I cannot use Huffyuv, because the mpeg-2 file is what the hardware aves to.
I tried both the "preview" and the actual encoding, and it was out of sync in both instances. |
 |
| fccHandler |
| Posted: Jan 4 2003, 12:32 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Hmm. Well, maybe you can tweak the framerate in VirtualDub until it looks right. (Sorry I can't suggest anything better than that.)
Are you not able to capture with VirtualDub at all???
-------------------- May the FOURCC be with you... |
 |
| jcsston |
| Posted: Jan 4 2003, 05:48 AM |
 |
|
Matroska Dev
  
Group: Moderators
Posts: 553
Member No.: 652
Joined: 3-November 02

|
Does your .mpa/.wav file have a delay in it? Ex. 'CHRISTMAS08 MPA T01 DELAY -163ms.mpa.wav'
Here's an example of one of my scripts
| CODE | video = mpeg2source("masterpiece_part3_vd.d2v") audio = MPASource("MASTERPIECE_PART3_VD MPA T01 DELAY -123ms.mpa", normalize=false) DelayAudio(audio,-0.123) AudioDub(video, audio) |
Then in VirtualDub under Video -> Framerate. Change so audio & video durations match.
That normally keeps my audio in sync.
Soon my audio sync troubles will be gone . I have my good ole WinTV-GO card back in and my new VCR is in the mail (for stereo sound)
-------------------- Use the Matroska file format |
 |
| fccHandler |
| Posted: Jan 4 2003, 06:28 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
New VCR? People still use those things???
-------------------- May the FOURCC be with you... |
 |
| jcsston |
| Posted: Jan 4 2003, 07:03 AM |
 |
|
Matroska Dev
  
Group: Moderators
Posts: 553
Member No.: 652
Joined: 3-November 02

|
Well it's really to be used as a stereo tv tuner and a tv out and Don't forget all those VHS tapes you need to preserve before they go 'poof'.
-------------------- Use the Matroska file format |
 |
| fccHandler |
| Posted: Jan 4 2003, 07:23 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (jcsston @ Jan 4 2003, 03:03 AM) | ... Don't forget all those VHS tapes you need to preserve before they go 'poof'.  |
Yes, I may be working that for the rest of my life.
-------------------- May the FOURCC be with you... |
 |
| vmalloc |
| Posted: Jan 4 2003, 02:34 PM |
 |
|
Unregistered

|
I want to add that this is no longer a Virtualdub bug (I have proven it mathematically and in testing).
It turns out that my mpeg-2 file for some reason doesn't go through the decoders properly. I think that the Creative DigitalVCR uses some sort of propietery mpeg-2 format or something, that makes it so the audio always stays out of sync.
I will report back when I have more information about this error. I'm seriously considering returning the card.. Ugh! |
 |
| ChristianHJW |
| Posted: Jan 4 2003, 09:08 PM |
 |
|
Advanced Member
  
Group: Moderators
Posts: 1768
Member No.: 2
Joined: 7-July 02

|
Very often a MPEG 2 transport stream is used on capturing, it has to be convereted into a program stream first until normal programs can open it at all.
Nic just recently presented a mpeg2dec.dll version for AVISynth that can handle MPEG2 transport streams correctly .... check the new 'HDTV / DVB' forums on http://forum.doom9.org for a link to get it .... or was it a DVD2AVI ??? lol ...
Pinnacle has a small proggie called T-REX to convert TS to PS ...
-------------------- Visit the unofficial Virtualdub support forum on http://forums.virtualdub.org - help to reduce the big number of emails Avery Lee is getting every day !! Support matroska as container and Gstreamer as the only truely open, x-platform multimedia platform .... |
 |
| gauloises |
| Posted: Jan 5 2003, 03:40 PM |
 |
|
Unregistered

|
| QUOTE | Pinnacle has a small proggie called T-REX to convert TS to PS ...
|
Forget about T-Rex 
First of all, itīs a commercial tool. You need a valid Serial/Key to use it longer than 30days.
Second, it only works - if it works - with TS-Streams, PS-Streams or MPEG-IIīs capped with Pinnacle products (esp. Pinnacles PCTVSat DVB-Cards), depending on the version you use (and there a many versions out in the wild, RCīs , Betaīs and Alphaīs and neither Pinnacle nor the author of T-Rex can explain, what exactly the differences, features and bugs are ).
Third, it only works with 100% error-free input source. If there are dropped video frames and/or dropped audio frames, youīll have severe crashes (itīs the only app for the last 2 years that produced a BSOD under W2K on my machine!).
And at least, if it works, itīs slow, very very slow . Even on 2Ghz powered machines, it takes hours to transcode 1GB of input, because the input has in every case to be demuxed/remuxed, even if you donīt changed video and or audio bitrates or something else.
Believe me, i know what i say, iīm mod in LLVīs famous german PCTVSat-Forum and we have these questions and probs about and with T-Rex day-by-day and night-by-night since Pinnacle released T-Rex 
@vmalloc
Try to use ds.jar from dvb.matt to analyze and fix your unsynched Caps! This tool is much more versatile and flexible than T-Rex. If it recognizes the format of your creative-capped streams, there is a big chance, that you can synchronize your streams with ds.jar. Try it out, download it from here:
http://home.arcor.de/matt2/dvb.matt/
greetz
Tom |
 |
| ChristianHJW |
| Posted: Jan 5 2003, 10:45 PM |
 |
|
Advanced Member
  
Group: Moderators
Posts: 1768
Member No.: 2
Joined: 7-July 02

|
LOL .... LLV = Little Louis Vega = Tom !
I own a PCTVSat myself, and am even a registered user on your forums mate !!
I tested TREX only once, and then it was working ... also i seem to remember the TS -> PS conversion works even after trial period expiration ?
-------------------- Visit the unofficial Virtualdub support forum on http://forums.virtualdub.org - help to reduce the big number of emails Avery Lee is getting every day !! Support matroska as container and Gstreamer as the only truely open, x-platform multimedia platform .... |
 |
| gauloises |
| Posted: Jan 6 2003, 11:30 AM |
 |
|
Unregistered

|
| QUOTE | .... LLV = Little Louis Vega = Tom !
|
Yes, thatīs right, but iīm another Tom, we have a lot of Tomsīs @pctvsat.com
| QUOTE | I own a PCTVSat myself, and am even a registered user on your forums mate !!
|
yes, I know
| QUOTE | ... also i seem to remember the TS -> PS conversion works even after trial period expiration ?
|
Donīt know, but if not, there are - of course - ways and means ... 
And meanwhile, there is also a new, non-commercial, expiration-free Alpha-Version, have a look at LLVīs new Download-Section!
On the other side, you donīt need no more to bother about TS-Streams with a PCTVsat, since driver release 2.5, the caps are stored directly as "some sort" of MPEG-II-PS! But thatīs the problem: dropped frames in this PS -> T-Rex crashes, even with "good" PS -> Audio/Video lags after conversion with T-Rex (or other encoding tools). In this cases, ds.jar is - IMHO - the tool of choice to fix such broken Streams.
greetz
Tom |
 |