Well, I've appended videos, but never appended at the beginning. You can use avidemux to append the videos!
I'm not good at javascripting, so please excuse me for not scripting this for you. There's a tutorial for scripting for Avidemux. Avidemux is an open source and free video converter. You can add effects to your audio/video in avidemux and save it to multiple formats.
This script is an example tutorial on the page link given here: [ ::: link ::: ] and the script will simply scan the orgDir directory and unpack all AVI files. The resulting file is put in destDir directory (Using new directorySearch API).
Avidemux functions are as follows: displayError, displayInfo, fileReadSelect, fileWriteSelect, allFilesFrom, nextFile
and more functions: load, append, save, saveDVD, saveOGM, clearSegments, addSegment, goToTime, forceUnpack, setContainer
More Script Functions here: http://www.avidemux.org/admWiki/doku.php?id=using:scripting#avidemux_functions
the Turotial Script that converts the avi file is as follows:
//AD <- /* Simple script that scans the orgDir directory and unpack all AVI files The resulting file is put in destDir directory Using new directorySearch API */ var app = new Avidemux(); var ds = new DirectorySearch(); var orgDir; var destDir; var reg =new RegExp(".$"); /* This is for Unix For Windows change to sep="\\"; reg2=new RegExp("\\.*\\"); */ var sep="\\"; var reg2 =new RegExp("\/.*\/"); var extension; var target; // // // // select files from original & target directories // orgDir=fileReadSelect(); destDir=fileWriteSelect(); orgDir=pathOnly(orgDir); destDir=pathOnly(destDir); // // strip last \\ or // // orgDir=orgDir.replace(reg,""); destDir=destDir.replace(reg,""); print("orgDir : <"+orgDir+">"); print("destDir : <"+destDir+">"); // // Go // if(ds.Init(orgDir)) { while(ds.NextFile()) { // Only process file we want i.e. AVI if(!ds.isNotFile && !ds.isDirectory && !ds.isHidden && !ds.isArchive && !ds.isSingleDot && !ds.isDoubleDot) { extension=ds.GetExtension(); if(extension == "avi") { target=ds.GetFileName(); target=destDir+sep+target; print("***"+ds.GetFileName()+"-->"+target); processFile(orgDir+sep+ds.GetFileName(),target); } //print("File: "+ds.GetFileName()+" is "+ds.GetFileSize()+" bytes, extension "+extension); } } print("We just searched in directory \"" + ds.GetFileDirectory() + "\""); ds.Close(); } else displayError("Error initializing the directory search"); displayInfo("Finished !"); function processFile(filename, targetfile) { // Load the file app.forceUnpack(); app.load(filename); app.rebuildIndex(); app.audio.delay=0; app.audio.mixer("NONE"); app.audio.scanVBR(); app.setContainer("AVI_UNP"); app.save(targetfile); return 1; }
Hope this helps...
sources: