View Full Version : Chroma shift help needed
cherbette
16th January 2012, 15:13
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 :)
johnmeyer
16th January 2012, 15:43
You could treat it like a dropped frame, and use MVTools2 to synthesize a new frame. Search these forums for "filldrops" or "filldropsi".
cherbette
16th January 2012, 16:00
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 :( :confused: Please help
Video:http://www.mediafire.com/?n8o7d1s60t37r61
Audio: http://www.mediafire.com/?z2qiaziohmxyb5v
cherbette
16th January 2012, 19:35
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
18th January 2012, 17:19
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 :)
StainlessS
19th January 2012, 22:30
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).
cherbette
19th January 2012, 22:41
Thanks StainlessS...I changed it to ChromaShift(u=10, v=4)...does that look more accurate?
StainlessS
19th January 2012, 22:56
"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.
StainlessS
20th January 2012, 00:20
Try this to set TimeStretch
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.
cherbette
20th January 2012, 16:56
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
StainlessS
21st January 2012, 00:01
Magic, Judging by the number it is a short clip. On longer clips it is rather tedious to
get the right numeric.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.