View Full Version : Merge 2 XviD films.
TMLewiss2
4th March 2005, 00:06
Is there a way I can merge two XviD movies into one without haveing to reencode everything... They are the same size, framerate, and bitrate. All I want to do it put them togather.
TMLewiss2
4th March 2005, 00:17
But wont useing AVISynth to merge the videos require me to reencode everything? I can't do direct stream copy like that can I? Also the second video ahs sound and the first one does not... so if I use avisynth I would have to open the audio in a seperate channel and delay it, usually causeing horrid sync problems. As for TMPGenc, expired, and I do not pirate.
Wow when I first posted this someone had posted before me a link to some other post. Now it is gone...
Still need help...
Video Dude
4th March 2005, 00:59
I had posted a link, but must have deleted it instead of editing it. :confused:
But my link referred to VirtualDub not AviSynth.
Look at the 2nd post in the link for avi files.
http://forum.doom9.org/showthread.php?s=&threadid=74129
TMLewiss2
4th March 2005, 02:28
This makes no sense... I am useing the append feature... and it says Error: The video streams have dif. samplerates (29.97000 vs 29.97000). I must be insane, BECAUSE THAT IS THE SAME lol. I even used avisynth to mimick the sample rate of the second segment onto the first one when I encoded it.
Sirber
4th March 2005, 02:31
if you use avisynth, it's not xvid anymore.
TMLewiss2
4th March 2005, 02:36
No, sorry let me explain. Ok I am adding about 13 seconds of video at the begining of my cap. All it is is 2 frames though, just repeated for about 120 frames on each. The two frames being repeated are two images that I custom made. I would normally use avisynth to just insert the images at the begining useing ImageSource(), but when I do that, the audio sync is hard to keep, not to mention the whole upside-down frame issue with ImageSource. So instead I made an XviD video at 29.9700 fps with the exact same bitrate and the exact same size and all that stuff to just append to the begining of the actual video.
TMLewiss2
4th March 2005, 03:26
Well before I get deep into this, does append segment in VDM even make it to where I can just direct stream copy the two videos. The whole reason I am doing this is to make it faster, if anyone else can think of a faster way to make two images appear at the begining of a video for about 7 seconds each without screwing up the audio sync, I am all ears!
Video Dude
4th March 2005, 04:08
Yes, at the VirtualDub menu:
Video --> Direct Stream Copy
Make sure Direct Stream Copy is selected
Another important thing:
Make sure the same version of the Xvid codec is used for both videos.
There are many Xvid builds around, you want to use the same build. So whatever build you used to encode your movie is the build you want to use for you 120 frame intro.
Also, make sure the 120 frame clip has the same audio as the movie. Even if it is silent add audio to it with the same audio codec, bitrate, and sample rate as the movie.
TMLewiss2
4th March 2005, 13:47
Ummm say I make audio for the 120 frames at the begining. If the audio is only like 1/2 sec, would that matter? Or would the whole video have to have audio.
TMLewiss2
4th March 2005, 14:25
http://img16.paintedover.com/uploads/16/gspot_enc.jpg
WHY WONT THOSE TWO VIDEOS APPEND!
Swede
4th March 2005, 15:20
The answer can be found in this thread. (http://forum.doom9.org/showthread.php?s=&threadid=88157)
sysKin
4th March 2005, 16:05
Originally posted by Video Dude
Another important thing:
Make sure the same version of the Xvid codec is used for both videos.
There are many Xvid builds around, you want to use the same build. So whatever build you used to encode your movie is the build you want to use for you 120 frame intro. No, vdub doesn't care if xvids have the same version, bitrate, settings, anything. The only thing it cares about is AVI's header.
In this particular example, it's probable that the movie has frame rate of 3000/101 (29.7029...) and the other has, say, 2970/100. They are different values.
I'd suggest to change framerate of both clips to something hand-written, then try again.
Edit: oh, the Swede's thread says pretty much the same thing :)
TMLewiss2
4th March 2005, 16:32
Do you think by hand changeing the frame rate, even if it is soooo little, would make the video skip or the audio off sync. Is there any way I can figure the EXACT framerate of the video? I don't understand how this could be happening when the begining video I make is based on the second videos framerate... I use this script
video = avisource("test.avi")
image1 = ImageSource("image1.jpg",0,201,Framerate (video)).FlipVertical().LanczosResize(Width (video), Height (video)).ConvertToYV12()
image2 = ImageSource("image2.jpg",0,201,Framerate (video)).FlipVertical().LanczosResize(Width (video), Height (video)).ConvertToYV12()
return image1 + image2
TMLewiss2
4th March 2005, 16:46
Still have the ssame questions from the previous post, but I thought I would let you know, opening the videos in VDM and changeing the framerate to 29.97 with direct stream copy works.
TMLewiss2
4th March 2005, 17:15
Wow I have encounter some stupid %@#$ in my life, but this beats them all. Why in gods name is this so hard to do. I used the EXACT same stuff from the first time when it worked, now it says the audio is dif sample rates. THERE HAS TO BE A BETTER WAY OF DOING THIS.
Update: Ok I got this to work... only problem is, the second audio starts right after the first one ends... I was trying to avoid that...
ppera2
4th March 2005, 19:15
By merging audio is usually real problem. If in first part audio is shorter than video, then it causes async at start of second part.
I solved that by adding apropriate duration to first parts audio. It requires demux, decompress and adding silence or repeat last part with some wave editor. And of course compression again. It's best to make new compression for all parts at once, and muxing that to previous joined videos (audio off). It can work well right after just appending video parts in V Dub, but sometimes I needed to save first merged video parts in 1 file, and load it in V Dub and then make final mux with audio...
TMLewiss2
4th March 2005, 19:26
lol I am a moron. I just added the frames in the first encode. Then when I was going to mux the audio, I went to the first frame of the REAL video (at the bottom of VDM it says the time you are into the movie, I didn't know that) so I just delayed the audio that much, worked perfect. Thanks everyone for everything.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.