Log in

View Full Version : Automatic video overlay


rOOmUSh
20th September 2011, 11:53
Hello guys!

We are trying to find a solution that will overlay a video with alpha channel on another video.
This should be an automated solution, NLE soft is not an option. We have 70000 videos that need to be overlayed with different motion graphics.

Example of what we need:
Right now we use Rhozet Carbon Coder for all our video needs like transcoding, logo insertion etc.. It has a watch folder feature which is very convenient. If it had a video-over-video, similar to logo insertion option it would be just perfect. But it has not.

The workflow is file-based. File IN > overlay video > File with overlayed video OUT.

Has anyone seen something like this?

Thank you!

jmac698
24th September 2011, 04:25
That's very easy with Avisynth,
a=avisource(file1)
b=avisource(over)
overlay(a,b)#need to test

Save as overlay.avs, and run with a batch file that has:
avs2avi output.avi#need to verify
in convert.bat
If you name the files consistently, there's probably a way to make a drag'n'drop version.
If you post snippets of video I could do more testing.

smok3
24th September 2011, 10:41
it is also possible to do a simple watch folder feature using just batch scripts alone, example logic from one node perspective (one can basically make as many nodes as necessary, irc i had two running most of the time due to bad cpu utilization of vp6 encoder):

:start
@echo off

:: generate filelist
cd 01_zakodiranje_avs
cd
dir /b *.avs > filelist_node1.txt 2> nul

:: is error is 1 then wait 10 s, else continue
if %ERRORLEVEL% == 1 (
title node1_waiting...

sleep 30
GOTO :start
)
:: else

:: get me just the 1st file
for /f %%a in (filelist_node1.txt) do (
echo %%a>filelist_node1_first.txt
goto :naprej
)

:naprej

set /P firstfile=<filelist_node1_first.txt
echo %firstfile%

del filelist_node1.txt

cd..

:: copy filelist and avs script into directory 02_akcija_node1 if filelist is not null

move 01_zakodiranje_avs\%firstfile% 02_akcija_node1\
move 01_zakodiranje_avs\filelist_node1_first.txt 02_akcija_node1\


:: send 02_akcija/filelist.txt and wait until flvenc returns
cd 02_akcija_node1
title node1_akcija

call T:\path\flvENC_tcm.bat filelist_node1_first.txt avs-"t:\path\templateFLV.avs" vp6-"t:\path\vp6_VBR482.conf"


:: copy everything from 02_akcija into 03_skodirano
title node1_kopiram
cd..

move 02_akcija_node1\*.avs 03_skodirano\
del 02_akcija_node1\filelist_node1_first.txt
move 02_akcija_node1\*.flv 03_skodirano\



:: goto start

GOTO :start

directory structure would/could be:

00_media
01_zakodiranje_avs
02_akcija_node1
02_akcija_node2
02_akcija_nodeN
03_skodirano
node1.bat
node2.bat
nodeN.bat

rOOmUSh
6th October 2011, 19:52
Thank you for your answers, but unfortunately i haven't added one thing to the equation - these 70000 files are in different format like DNxHD, CANOPUS HQ, Apple ProRes422, H.264 in MOV and MP4, MPEG, XDCAM, DVC PRO.
This is all the original footage we get from our different suppliers.
This means that in purpose to use Avisynth, it all needs to be prepared as AVI, and it's a huge amount of conversion work.

Ghitulescu
7th October 2011, 08:53
Well, a little bit of work is required. If the machines will do EVERYTHING maybe your job would be superfluous ;)
A sort of automation may be obtained using directshowsource, provided you have installed all the codecs that your files/formats require. The test is that WMP would play them, then the codecs are installed. There are some issues however with directshowsource.

http://avisynth.org/mediawiki/Importing_media