Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th January 2012, 15:13   #1  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
Chroma shift help needed

I have a video where there are a couple spots where the video "bounces" for one single frame and I have no idea how to treat it. I'm also curious how I might be able to sync a CD rip to a video for better audio...considering the performance is mimed any ways, it won't make much of a difference

Last edited by cherbette; 18th January 2012 at 17:18.
cherbette is offline   Reply With Quote
Old 16th January 2012, 15:43   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
You could treat it like a dropped frame, and use MVTools2 to synthesize a new frame. Search these forums for "filldrops" or "filldropsi".
johnmeyer is offline   Reply With Quote
Old 16th January 2012, 16:00   #3  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
Audio out of sync

Thanks John! I think I'll use "BadFrames" this way I can select only the frames which need to be corrected. Now I face another problem...I can't seem to sync the audio to my video properly. If I get the first half of the video in sync then the second half is out of sync and visa versa Please help

Video:http://www.mediafire.com/?n8o7d1s60t37r61

Audio: http://www.mediafire.com/?z2qiaziohmxyb5v

Last edited by cherbette; 16th January 2012 at 18:47.
cherbette is offline   Reply With Quote
Old 16th January 2012, 19:35   #4  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
I've determined DelayAudio(-0.5) works to keep the beginning in sync and DelayAudio(-1.0) works to keep the end in sync. Now I just have to figure out what to do with the two? lol
cherbette is offline   Reply With Quote
Old 18th January 2012, 17:19   #5  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
There's also a chroma shift in my video (http://www.mediafire.com/?n8o7d1s60t37r61) (of which I'm using the uncompressed AVI and have just posted the MPG here for size's sake) which I've attempted to correct with ChromaShift(c=12, v=-8) which looks fairly accurate to me but I'm still learning and any feedback would be much appreciated
cherbette is offline   Reply With Quote
Old 19th January 2012, 22:30   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Cherbette,
For the Audio problem, see TimeStretch(), particularly the last example in Avisynth docs using the
Tempo arg. You will need to adjust sync right near the beginning of the clip 1st and then play
with the TimeStretch(tempo=whatever) to get it right, it will not be easy.
Also, offhand, it looks like your ChromaShift(c=12, v=-8) is equivalent to ChromaShift(u=12, v=4),
even if it is not, then might be better to use the u & v args rather than shift both chroma using
c and then adjust v alone afterwards (dont actually know if that is correct, but it dont look right
as it is).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 19th January 2012, 22:41   #7  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
Thanks StainlessS...I changed it to ChromaShift(u=10, v=4)...does that look more accurate?
cherbette is offline   Reply With Quote
Old 19th January 2012, 22:56   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
"does that look more accurate? "

Args look better, is it more accurate, sorry dont know. Did not download example, bit expensive
for 100MB via my PrePay mobile broadband.
On the TimeStretch() thing, AudioGraph() might be useful if you can find a nice gunshot or
slamming door to aid in sync.
EDIT: there is also a time length limitation on Timestretch(), cant remember at which point
it gets inaccurate but it is I think more than an hour (probably dependent upon audio sample rate),
if you are much more than an hour, then it may be easier if you do it in two parts, and then stitch
them together.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 19th January 2012 at 23:11.
StainlessS is offline   Reply With Quote
Old 20th January 2012, 00:20   #9  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Try this to set TimeStretch

Code:
Avisource("F.AVI")
DelayAudio(-0.5)		# Correct at beginning
Trim(0,0)			# Get Vid/Aud length to match
VSECS=FrameCount / FrameRate 	# Clip length
VTIMEINC = -0.5			# Decrease length by 0.5 second (-1.0 - -0.5)
TimeStretch(Tempo= 100.0 * VSECS / (VSECS+VTIMEINC))
#Trim(0,0)
Vary the VTIMEINC variable to adjust length.

EDIT: Do not use a compressed source audio, extract to WAV and Audio Dub.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 20th January 2012 at 00:49.
StainlessS is offline   Reply With Quote
Old 20th January 2012, 16:56   #10  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
I ended up using
vid=AviSource("gypsies.avi").AssumeTFF.converttoYV12(interlaced=true).Trim(4284,8959)
aud=wavsource("gypsies.wav").timestretch(rate=100.4)
audiodub(vid,aud)
delayaudio(-0.58)

and it was pretty much in sync
cherbette is offline   Reply With Quote
Old 21st January 2012, 00:01   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Magic, Judging by the number it is a short clip. On longer clips it is rather tedious to
get the right numeric.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.