Correctly getting audio from a DVD scene

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Emotive
...the Meditant
Joined: Sat Nov 04, 2006 12:20 pm
Org Profile

Correctly getting audio from a DVD scene

Post by Emotive » Sat Oct 03, 2009 6:29 am

Upon ripping my dvd and making the .d2v file, a .AC3 audio file was created, which is supposed to have 0 ms delay. When I try entering both the movie and the audio in VDubMod and exporting a specific scene, however, the audio is completely unrelated (I'm getting the audio from a previous scene).

That led me to try exporting the scene I wanted in lagarith without audio, exporting the audio from the whole movie and synchronizing them in premiere. That didn't work either! Even though the audio would synchronize correctly for a small speech part, synchronisation was lost in the next few seconds. It seems the speed of the audio is different from the speed of the video, somehow.

Is there a way to fix that and use a scene with audio correctly, without having to do something heavily space-consuming like converting the whole movie to an uncompressed video file with uncompressed audio?
Image

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Qyot27 » Sat Oct 03, 2009 7:53 am

My guess would be pulldown interference. Have you adjusted for IVTC or used Force Film in DGIndex?

Also, it might help to decode the audio and load that into the script, like so:

Code: Select all

v = MPEG2Source("video.d2v").TFM(...
a = WAVSource("audio.wav")
AudioDub(v,a)
(obviously, I meant the full TFM and associated commands, not an ellipsis; in an instance like this it's perhaps easiest to make all video-related commands go on the first line, which is what the period is for)
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Emotive
...the Meditant
Joined: Sat Nov 04, 2006 12:20 pm
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Emotive » Sat Oct 03, 2009 8:04 am

I didn't, all I did in DGIndex was opening the .vob's and making the .d2v project file.

I'd try the script thing, but i didn't quite get the TFM part.. Mind explaining that a bit?
Image

User avatar
Emotive
...the Meditant
Joined: Sat Nov 04, 2006 12:20 pm
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Emotive » Sat Oct 03, 2009 8:14 am

Ah, in case this helps, here's my current script:

Code: Select all

mpeg2source("F:\Movies\Downfall\Downfall.d2v")
ConverttoYV12()
tomsmocomp(1,5,1)
crop(6,14,-2,-14)
lanczos4resize(720,480)
assumefps(29.97)
Image

User avatar
Emotive
...the Meditant
Joined: Sat Nov 04, 2006 12:20 pm
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Emotive » Sat Oct 03, 2009 8:19 am

OH. I had to post my own script to actually look at it and see what's going on. Geez. Frame rate..

I'll work this out, thanks for trying to help! (:
Image

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Qyot27 » Sat Oct 03, 2009 8:44 am

Well chances are, if it's a Hollywood movie, it's got pulldown flags. In DGIndex, open the movie and press F6 - if the readout says Film or Film [%] (where it's a high percentage, over 85%, I'd say), then you need to tell DGIndex to use Forced Film when indexing the file. That option is in Video->Field Operation->Forced Film. Doing that will make DGIndex output a .d2v at 23.976fps without all the pulldown weirdness.

VirtualDubMod can detect these flags too, but I don't know much about how well it handles them. If you open up the actual m2v file in it, the frame rate will probably read 24 or possibly 23.976, I'm not really sure. I also don't know if the MPEG-2 input plugin for the main branch of VDub works similarly, although I'd assume it does since it was essentially the same person working on all the MPEG2-related modifications along the way.

You also might want to look into updating DGIndex, as the current version is now 1.5.5.



TFM (and TDecimate) are simply the inverse telecine filters that are recommended now (instead of Decomb). They'd be needed if the telecine was actually in the video stream rather than pulldown flags being used, and would also bring the video properly back down to 23.976fps.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Qyot27 » Sat Oct 03, 2009 8:56 am

Gah, double-post...
Cast to Stone wrote:Ah, in case this helps, here's my current script:

Code: Select all

mpeg2source("F:\Movies\Downfall\Downfall.d2v")
ConverttoYV12()
tomsmocomp(1,5,1)
crop(6,14,-2,-14)
lanczos4resize(720,480)
assumefps(29.97)
Considering what I mentioned in my last post about pulldown, the way I'd revise this to include the audio would be like so:

Code: Select all

v = mpeg2source("F:\Movies\Downfall\Downfall.d2v").crop(6,14,-2,-14).lanczos4resize(720,480)
a = WAVSource("downfall.wav")
AudioDub(v,a)
The source should already be in YV12, and TomsMoComp won't be necessary if pulldown is in there. If in the case of telecine (which would be the case if DGIndex says NTSC or if the Film % is less than around 80%; in this case you would not set the Forced Film option), then the TFM/TDecimate lines would look something like this:

Code: Select all

TFM(d2v="downfall.d2v",order=-1,mode=5,PP=7,field=-1,slow=2).TDecimate(mode=1)
BIG FAT WARNING: That's an anime-based configuration of TFM and TDecimate; you'll want to read the documentation on those two functions to determine which certain mode you might need. I think this matters more to TDecimate, though. The documentation is included in the ZIP file with the plugins, which you can get here (look for TIVTC):
http://web.missouri.edu/~kes25c/
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Emotive
...the Meditant
Joined: Sat Nov 04, 2006 12:20 pm
Org Profile

Re: Correctly getting audio from a DVD scene

Post by Emotive » Sat Oct 03, 2009 9:14 am

The dvd is PAL, but I'm converting the resolution and frame rate to NTSC because of the needs of a bigger project.

I'll keep the pulldown thing in mind in case I encounter it on another dvd, however nothing of that sort was needed for this one - I just had to remove the assumefps line and export the scene and the audio, and everything was synched correctly. Was stupid of me not to understand it was due to changing the frame-rate earlier..

Thanks lots for the useful info though!
Image

Locked

Return to “AviSynth Help”