Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Dub Different Sources Then Use File Append Avi?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
AEN007
Posted: Dec 30 2011, 11:44 PM


Advanced Member


Group: Members
Posts: 90
Member No.: 24508
Joined: 10-November 08



31December2011

Greetings.

Is there any way to dub different sources (e.g., 1 mpeg-2 file & 1 Xvid/mpeg-4 avi)
to be able to use File Append avi segment and join them after dubbing?
 
     Top
Abrazo
Posted: Jan 1 2012, 09:33 AM


Advanced Member


Group: Members
Posts: 775
Member No.: 28995
Joined: 5-November 10



This should be possible if you first dub/convert both files with the same audio- and video-codec, and (also important) the same bitrate (f.i. 128k Bit/sec) and sampling rate (f.i. 44.100 Hz) for audio and the same frame rate (f.i. 25 fps) for video.

For audio you should best choose for "No compression (PCM)" in the first step (= the creation of the separate files).
This should avoid problems with audio synchronisation in the second step (= join).

Once you join the two resulting files, you can choose an audio-compression codec (f.i. "MPEG Layer-3").
 
     Top
malky
Posted: Jan 1 2012, 01:47 PM


Advanced Member


Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07



The files can be joined using AviSynth.
Here's a sample of an avi joined to an mpeg.
Files must be same resolution and framerate etc.
Sample:
http://www.filesavr.com/9EM42ZXF0LY64I0
I added borders to the AVI to make it the same resolution as the mpeg.
 
    Top
AEN007
Posted: Jan 4 2012, 01:02 PM


Advanced Member


Group: Members
Posts: 90
Member No.: 24508
Joined: 10-November 08



4January2012

Greetings.

I have used "Method 1" in the past - but not always successfully it seems to me.
I would be interested to see the aviSynth script for Method 2.

Yesterday Method 1 did not work for me.
I guess maybe because I did 1 output file with Multipass Fast Recompress and
the other with Multipass Full processing to add some filter/effects?
It seems to me I have also had problems in the past appending
outputs from flv files to outputs from non-flv files ...
 
     Top
malky
Posted: Jan 4 2012, 07:01 PM


Advanced Member


Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07



I'll just post the notes I made when I was doing it - I tend to forget steps.
This could be done using a single script, but I like to verify each clip before joining and I find big scripts confusing.
Sometimes AviSynth complains about fps, so ChangeFPS may have to be included even when it seems it's not required.
Scripts use the .avs extension.
This is joining a VOB clip and an AVI - good luck.

Collect all video source files and .avs scripts to a job folder on the desktop.

For mpeg files, download DGIndex.
Copy DGDecode.dll from the DGIndex folder to the AviSynth Plugin folder.
Run DGIndex and load the mpeg file.
Select the audio track and output method (wav)
'Save project and demux video' - save the output to the job folder.

Create a script in Notepad and save as clip1.avs to the job folder.
CODE

LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll")
#v=MPEG2Source("t.d2v")
#a=wavsource("t T80 2_0ch 192Kbps 48KHz.wav")
MPEG2Source("t.d2v").info()
#clip1=audiodub(v, a)
#return clip1


Drag/Open the script into VirtualDub.
Line 4 with the info() generates file information.
Note the ColourSpace YV12
Resolution 720 x 480
FPS 29.97
Yours may be different.
Exit VirtualDub.

Remove the comment # from lines 2,3,5,6 and add the comment # to line 4.
Line 2 opens the .d2v information file for the video
Line 3 note that the source audio is 48000.
Line 5 joins the video and audio
Drag the script back into VirtualDub and verify the sync is good.
Exit VirtualDub.

Assume the second file is an AVI;this is the script, clip2.avs
Open the script in VirtualDub.
CODE
#v=changefps(avisource("clip.avi"),30000,1001).AddBorders(72,80,72,80)
#a=avisource("clip.avi")
#audiodub(v, a)
avisource("clip.avi")
info()

The info told me that the fps=25, resolution is 576 x 320.
This doesn't match the mpeg clip1, so they have to change.
Colour space and audio are the same.
Remove the comment # from lines 1,2,3 and add the comment # to lines 4,5.
Line 1 changes the fps to 29.97 and adds a black border to make it 720 x 480.
Drag the script into VirtualDub and note that it syncs.

To join the clips, create a new script and save with a new name, joinedclips.avs.
CODE
a=avisource("clip1.avs")
b=AVISource("clip2.avs")
a++b
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
4 replies since Dec 30 2011, 11:44 PM Track this topic | Email this topic | Print this topic

<< Back to General Discussion