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 21st July 2012, 14:29   #1  |  Link
Quafadas
Registered User
 
Join Date: Jul 2012
Posts: 2
Help... green screen when exporting whole video!

HI Guys,

I spent most of last weekend solving avisynth proof of concept problems :-). Kind of fun, and eventually I got the holiday video all stitched together!

Problem is, that when I try and export it, about halfway through it green screens on me. What I'm trying to figure out is whether I'm doing something wrong, inefficient, or whether I'm simply bumping up against the limits of the program (which would appear unlikely) as the video is only about 2 minutes long...

The full script is attached below as a p.s. But there are lots of individual videos stitched together. I particularly like putting four videos on screen... one in each corner, I love the scripting approach to this...

Each individual piece works as I expect. However... when I attempt to export the whole lot, about a minute in it green screens on me :-(, I've tried exporting out of virtual dub, AvsPMod and MeGUI.

I've tried, in combination, DivX codec, UT codec... and I think also the default settings in all programs, codecs as I'm fairly new to this. What worries me is that the green screen doesn't kick in at a predictable moment; which has the feel of a memory thing.

I think it's time to ask for help! Anyone have any ideas on how to make the below script more efficient / work on export?

Also - the computer us fairly old, I think has 3Gb memory. So if this is a memory problem, would better hardware help as we're constrained by 32bit limits anyway? If so I'll set about setting up avisynth on another computer... hopefully it'll be easier this time.

Any help is greatly appreciated!

Kind Regards,
Simon

P.S Video is recorded on a GoPro in HD resolution. I'm using qtSource to open it as it's the only thing I found that worked.

{code}


title= Trim( qtKillAudio("title.mp4") , 0, 144)
withSubTitle = subtitle(title , "Albufeira, Portugal \n July 2012 ", -1, -1, 0, 145, "Arial", 64 , $ffffff, lsp=1)

scenery = trim ( qtKillAudio("scenery.mp4") , 144, 384)
sceneryWithFade = FadeIO(scenery,10,$000000)

dianeJennyWaving = trim ( qtKillAudio("Diane Jenny Waving.mp4") , 0 , 192)
fourInWater = Trim( qtKillAudio("four in water.mp4"), 384,576)
dadFloatingHead = qtKillAudio("dad floating head.mp4")
billHead = Trim( qtKillAudio("ball game and wave.mp4") , 1008, 1200)

beachStuff = FadeIO( fourWindows(dianeJennyWaving, fourInWater, dadFloatingHead, billHead) , 10)

beachScenery = FadeIO( slowmo_33 ( Trim( qtKillAudio("Beach Scenery.mp4") , 288, 624) ) , 10)

beachGames = Trim( qtKillAudio ("Beach games.mp4"), 144, 432)
peteWaterRun = Trim( qtKillAudio("Pete water run.mp4"), 0 , 288)
dadWaterRun = Trim( qtKillAudio("Dad water run.mp4"), 0 , 288)
alexBall = Trim( qtKillAudio("Alex Ball.mp4"), 0 , 288)

waterWindow = FadeIO( fourWindows(alexBall, beachGames, peteWaterRun, dadWaterRun) , 10)

dadThrowsMumInWater = FadeIO ( trim ( qtKillAudio("dad throws Mum in water.mp4"), 144, 720), 10)

bbq = FadeIO( trim ( qtKillAudio("BBQ.mp4") , 192, 480) , 10)

deathleapComedy = qtKillAudio("deathleap comedy.mp4")
deathleapComedy1 = Trim(deathleapComedy, 0, 240)
deathleapComedy2 = Trim(deathleapComedy, 1152, 1392)
deathleapComedy3 = Trim(deathleapComedy, 1344, 1584)
deathleapComedy4 = Trim(deathleapComedy, 1584, 1824)
deathleapWindow = FadeIO( fourWindows(deathleapComedy1, deathleapComedy2, deathleapComedy3, deathleapComedy4) , 10)

simonFace = Trim( qtKillAudio ("pete face simon face.mp4"), 1392, 1440)
peteFace = Trim( qtKillAudio ("pete face simon face.mp4"), 1224, 1272)
nicFace = Trim( qtKillAudio ("BBQ.mp4"), 528, 576)
dadHead = Trim( qtKillAudio ("dad floating head.mp4"), 144, 192)

extendedFaces = fourWindows( simonFace, peteFace, nicFace, dadHead ) + Trim( title , 1, 96 )
faces = FadeIO( FreezeFrame( extendedFaces , 0 , 145, 45) , 5)

deathLeapNoCatch = FadeIO( Trim( qtKillAudio("Deathleap no catch.mp4") , 816 , 1344) , 10 )

deathLeapNoCatch1 = trim ( qtKillAudio("deathleap no catch 2.mp4"), 0, 336)
deathLeapNoCatch2 = trim ( qtKillAudio("deathleap no catch 2.mp4"), 0, 336)
deathLeapUnderwater1 = trim ( qtKillAudio("deathleap underwater.mp4"), 336, 672)
deathLeapUnderwater2 = trim ( qtKillAudio("deathleap underwater.mp4"), 240, 576)

deathLeapNoCatchWindow = FadeIO( fourWindows(deathLeapNoCatch1, deathLeapNoCatch2, deathLeapUnderwater1, deathLeapUnderwater2), 10)

petecatch = Trim( qtKillAudio("deathleap pete catch.mp4") , 0, 288)
petecatchSlowMo = FadeIO( petecatch, 10)

simonCatch = Trim( qtKillAudio("deathleap simon catch.mp4") , 0, 216)
simonCatchSloMo = FadeIO( simonCatch, 10)

familyInPool = FadeOut( FadeIn( Trim( qtKillAudio("family in pool.mp4") , 96, 720) , 10) , 48)

audio = FadeOut( FFAudioSource("09 - Time to Relax.mp3") , 10 )
#Ultimately watch the video bound together below...
final = withSubTitle + beachScenery \
+ beachStuff + sceneryWithFade + \
waterWindow + dadThrowsMumInWater + faces + bbq + deathLeapNoCatch + \
deathleapWindow + deathLeapNoCatch + deathLeapNoCatchWindow + petecatchSlowMo + simonCatchSloMo + familyInPool

AudioDub(final, audio)

ConvertToYV12()


function qtKillAudio(String relativePath) {
return KillAudio( QTInput(relativePath, audio=0) )
}

function fourWindows (Clip c_topLeft, Clip c_topRight, Clip c_bottomLeft, Clip c_bottomRight){

c_borderTL = topLeft(c_topLeft)
c_borderTR = topRight(c_topRight)
c_borderBL = bottomLeft(c_bottomLeft)
c_borderBR = bottomRight(c_bottomRight)

# If we have added 4 clips together, we have changed the frame size. reduce by 2 to ensure compitibility with clips taken on the same resolution.
return ReduceBy2( StackVertical(StackHorizontal(c_borderTL, c_borderTR), StackHorizontal(c_borderBL, c_borderBR)) )

}

function topLeft(Clip clip){
return borderCrop(clip, 0, 0, 16, 16)
}

function topRight(Clip clip){
return borderCrop(clip, 16, 0, 0, 16)
}

function bottomLeft(Clip clip){
return borderCrop(clip, 0, 16, 16, 0)
}

function bottomRight(Clip clip){
return borderCrop(clip, 16, 16, 0, 0)
}

function borderCrop(Clip clip, int left, int top, int right, int bottom){
topleftCrop = Crop(clip, left, top, -right, -bottom, false)
return AddBorders(topleftCrop, left, top, right, bottom, $000000)

}

function slowmo_33(clip v)
{
vi=v
v=assumeTFF(v)
v=bob(v)
v0=selectevery(v,2, 0)
v1=selectevery(v,2, 1)
n=interleave(v0,vi,v1)

return n.assumefps(48.000)
}

function slowmo_25(clip v)
{
v=assumeTFF(v)
v=bob(v)
v=interleave(v,v)
v0=selectevery(v,2, 0)
v1=selectevery(v,2, 1)
v1=deleteframe(v1,0)
vc=overlay(v0,v1, mode="blend", opacity=0.50)
n=interleave(v0,vc)

return n.assumefps(48.000)
}

function slowmo_50(clip v)
{
v=assumeTFF(v)
v=bob(v)

return v.assumefps(48.000)
}

function speedup_33(clip v)
{
vi=v
v=assumeTFF(v)
v=bob(v)
v0=selectevery(v,6, 0)
v1=selectevery(v,6, 2)
v3 =SelectEvery(v, 6, 4)
n=interleave(v0,v1, v3)

return n.assumefps(48.000)
}

function progressiveSloMo(Clip clip1, int slowMoStart, int slowMo25Duration, int sloMo33Duration, int sloMo50Duration, int lastFrame){

part1 = Trim (clip1, 0, slowMoStart )
part2 = slowmo_25( Trim (clip1 , slowMoStart + 1 , slowMoStart + slowMo25Duration) )
part3 = slowmo_33( Trim (clip1 , slowMoStart + slowMo25Duration + 1, slowMoStart + slowMo25Duration + sloMo33Duration) )
part4 = slowmo_50( Trim (clip1 , slowMoStart + slowMo25Duration + sloMo33Duration + 1, slowMoStart + slowMo25Duration + sloMo33Duration + sloMo50Duration) )
part5 = slowmo_33( Trim (clip1 , slowMoStart + slowMo25Duration + sloMo33Duration + sloMo50Duration + 1, slowMoStart + slowMo25Duration + sloMo33Duration + sloMo50Duration + sloMo33Duration) )
part6 = slowmo_25( Trim (clip1 , slowMoStart + slowMo25Duration + sloMo33Duration + sloMo50Duration + sloMo33Duration + 1, slowMoStart + slowMo25Duration + sloMo33Duration + sloMo50Duration + sloMo33Duration + slowMo25Duration) )
part7 = ( Trim (clip1 , slowMoStart + slowMo25Duration + sloMo33Duration + sloMo50Duration + sloMo33Duration + slowMo25Duration + 1, lastFrame ) )

return part1 + part2 + part3 + part4 + part5 + part6 + part7



{code}
Quafadas is offline   Reply With Quote
Old 21st July 2012, 23:52   #2  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 718
My bet is qtSource is the culprit but wait for more answers
Mounir is offline   Reply With Quote
Old 22nd July 2012, 16:41   #3  |  Link
Quafadas
Registered User
 
Join Date: Jul 2012
Posts: 2
Okay, thanks for the response.

I'm happy to experiment with that being the case, my problem is that it appears to be the only plugin which will load gopro video!

Other things I tried;

- avisource
- DirectShowSource
- FFmpegSource

All of these reported an 'unsupported file format'. The original video was recorded on a GoPro HD hero 2. I believe it uses a custom cineform codec, but I don't actually know. Does anyone have experience editing GoPro video? A different plugin which may open them? All I can really tell you is that the files have a .mp4 extension...

Cheers,
Simon
Quafadas is offline   Reply With Quote
Old 22nd July 2012, 18:31   #4  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,395
gopro1 files are AVC+AAC in mp4 (i suspect the same for gopro2), i had no trouble converting those to prores using ffmpeg, so ffmpegsource should work (Do you have the latest version?), but in your case you also need nice and working seeking.

Advice: Convert to something uncompressed and then put that into avisynth.
__________________
certain other member
smok3 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 23:29.


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