Quantcast Avisynth: Audio Import? - digitalFAQ.com Forums [Archives]
  #1  
03-07-2005, 06:49 AM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Hello,
Some days ago I bought a KISS DP-558 Hd recorder/dvdplayer.
It works great so far.I have tried with most of the KVCD/KDVD resolutions,and all plays fine.The only thing that troubles is AutoGK
produced XviD,but thats another story.

The recorder produces one .vob file for each tv show you record.
The audio is AC3 2ch 192kbs.

So with the ftp connection I transfer my recorded shows to the pc,
uses DGIndex 1.2.1 to produce .d2v file for avs script.
The demuxed ac3 stream always reports a delay of 152ms.

When I record tv shows,the recordings starts one or two minutes before,
and ends two minutes after the shows.This stuff I want to cut with
trim() command in the script,and to get things done in a "easy" way
with audio in sync,and cutted on the right places,I want to take the audio
through the script as well.

So I found two methods of doing this,one with ac3source() and another
with directshowsource.
I read somewhere that ac3source() downmixes incorrectly so its better
to use directshowsource() for audio import.
I made two tests yesterday,and both methods seems to play fine .
I used TMPGnc with toolame do to the encoding.

Any one of you have any ideas whats the "best" one to use??

Script with DirectShowSource:

Quote:
LoadPlugin("C:\Programfiles\MovieStacker\Filters\D GDecode.dll")
LoadPlugin("C:\Programfiles\MovieStacker\Filters\U ndot.dll")
Video=Mpeg2Source("C:\Documents and Settings\Eier\Skrivebord\codemercury.d2v")
Audio=DelayAudio(DirectShowSource("C:\Documents and Settings\Eier\Skrivebord\codemercury.ac3"),0.152)
AudioDub(Video,Audio)
AssumeTFF()
bob(0,0.5)
Crop(8,88,704,400)
Undot()
AddBorders(8,88,8,88 )
ConvertToRGB24() # For TMPGEnc or VFAPI
SeparateFields()
SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first video
Weave()
#Trim(0,6000).FadeOut(150)
#info()
Script With AC3Source:

Quote:
LoadPlugin("C:\Programfiles\MovieStacker\Filters\D GDecode.dll")
LoadPlugin("C:\Programfiles\MovieStacker\Filters\A C3source.dll")
Mpeg2Source("C:\Documents and Settings\Eier\Skrivebord\disney.d2v")
AC3Source("C:\Documents and Settings\Eier\Skrivebord\disney.ac3")
DelayAudio(0.152)
AssumeTFF()
bob(0,0.5)
ConvertToRGB24() # For TMPGEnc or VFAPI
SeparateFields()
SelectEvery(4,1,2) # SelectEvery(4,0,3) for bottom field first video
Weave()
Trim(0,6000)
Also look at the delay audio stuff in the scripts,I think its correct,
,but im not sure


-------------------------
viking
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
03-07-2005, 07:11 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
I would have said that the best to use it to cut the file in dgindex !
Your solution is interresting to cut a part in the middle of the movie, but to trim begining and/or end of the video, it's far easier to use the "[" and "]" button of dgindex : it will produce a correct (trimed) d2v and ac3 files.
Reply With Quote
  #3  
03-07-2005, 07:50 AM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks a lot ,I was sure there was a easier way

But another question,I do the trimming in DGIndex,the AC3 file
reports Delay 152ms.

If I only put the video into the script and then mux with the ac3 file
when finished,is there any of the dvdauthor programs that
"take care" of the delay so the authored result will be in sync?

(Ive just formatted the pc ,so I havent any authors installed right now)

Cause if that works I can use the ac3 track as it is.

----------------------------
viking
Reply With Quote
  #4  
03-07-2005, 08:02 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by the viking
But another question,I do the trimming in DGIndex,the AC3 file reports Delay 152ms.
The delay can change depending on where you cut the file (not sure).

Quote:
If I only put the video into the script and then mux with the ac3 file
when finished,is there any of the dvdauthor programs that
"take care" of the delay so the authored result will be in sync?
First, you do not need to mux as all dvd author programms work on elementary streams, that means that they will demux all muxed things you give to them !
Secondly, tools like DVDLab has an internal tool to add/cut delays in ac3 but this is not automatically done. Other software don't have such tool. So I prefer to use an external tool, very convenient, called AC3 Delay Corrector : http://home.t-online.de/home/520072193568-0001/

You just have to run it on you ac3 stream before to authort the DVD.
Reply With Quote
  #5  
03-07-2005, 08:16 AM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
This is what I found with DVDAuthorGUI:
(I havent tried it ,so I dont know if it works)



Yes I have tried AC3 Delay Corrector,and I feed it with the AC3 file with
152ms delay,here what the log file says after processing:
Quote:
Source file information:

Sampling rate: 48 kHz
Nominal bit rate: 192 kbps
Framelength: 0x0300
Length: 108601frames (00:57:55,232)
There are 31.25 frames in one second.
152ms (00:00:00,160) to be add at beginning.

Target file information:

5 frames (160ms) have been added at start.
108606 frames (00:57:55,392) have been written.
There are 31.25 frames in one second.
For some reason it adds 160ms at the start and not 152ms.
And then is my question,isnt the audio still out off sync by 8ms??

-------------------
viking
Reply With Quote
  #6  
03-07-2005, 08:41 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by the viking
For some reason it adds 160ms at the start and not 152ms.
31.25 frame per second means a frame last for 32 ms. 152 is not divisible by 32 while 160 is. As ac3 delay corrector does not works on uncompressed datas but directly in ac3 format, it can't manipulate smaller piece than a frame.
Note: It's strange to have a delay that is not a mutiple of a frame length

Quote:
And then is my question,isnt the audio still out off sync by 8ms??
Your bat will probably suffer from this but not you
Reply With Quote
  #7  
03-07-2005, 03:26 PM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Yep its probably hard to notice a 8 ms delay

But I found another way to fix the delay,AC3Machine,if it
set delay to 0ms or 8ms I dont know,and I guess
its hard to find out as well.

-----------------
viking
Reply With Quote
  #8  
03-07-2005, 03:39 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Ac3Machine/BeSweet don't do correct delay correction, there was some information about this at the D9 forum some time ago. IIRC it was that they cut one frame too much or something like that.

EDIT: Just found it : http://forum.doom9.org/showthread.php?s=&threadid=85113 .
Reply With Quote
  #9  
03-07-2005, 03:51 PM
the viking the viking is offline
Free Member
 
Join Date: Sep 2004
Location: Norway
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Hmmm,okay,then the Doom9 guide for AC3 machine is wrong as well,it says:
"Leave Set Delay to checked so you won't have to tamper with offsets when adding the AC3 to your DVD projects (or AVIs)."

So then I guess AC3 delay corrector or setting delay in
the authoring prog will be the solution for me!

---------------------------
viking
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
TMPGEnc: Import could not open 0:xxxxxx tommyboy Video Encoding and Conversion 9 08-09-2004 02:04 AM
ERRO - MPEG IMPORT FILTER pepolyno Conversão e Codificação de Vídeo (Português) 2 06-29-2004 11:04 AM
How to Import VRO file from DVD-RAM to Premiere? syk2c11 Video Encoding and Conversion 9 06-09-2004 09:06 PM
TmpgEnc DvD Author will not import backgrounds? trigger911 Authoring VCD, DVD, Blu-ray 6 04-29-2004 09:22 PM
Authoring: NeoDVD will not import MPEG from ATI MMC BoxOfSnoo Authoring VCD, DVD, Blu-ray 3 11-17-2003 10:15 AM

Thread Tools



 
All times are GMT -5. The time now is 03:42 AM  —  vBulletin © Jelsoft Enterprises Ltd