Main page
MPlayer
Squid
AVR
Méterszámláló (HU)
News
Download
Contact us
Links
 
 
Current version Description Download files History

Video mixer with mencoder (2007.12.10)
This is draft version!

I began development video mixer with mencoder. This is 'draft' version!

At moment implemented and new function are:

  • -video-mixer <video mixer config file>
  • Add shared memory reader/writer (from my CCTV)
  • 'Silly' video sync (only frame to frame)
  • Add shmemin, shmemout video filter
  • cmdfile to shmemin filter
  • 'Silly' video effect with shmemin (alpha, move, scale)

Not implemented:

  • Mixing audio channels
  • Normal sync between videos
  • More video effect filter
  • Only work YV12 video format
  • This is 'draft' version!

sample.sh:
#!/bin/bash
./mencoder a.avi -ovc lavc -oac mp3lame -o sample.avi -video-mixer vmixer.conf

vmixer.conf:
# 'base' and output stream parameters:
#Insert video filter:
#1 : inputid
#0 : on/off
#0 : x pos on base video
#0 : y pos on base video
#160 : inserted video width
#120 : inserted video height
# : alpha (0..255)
#shmmein.conf : command file to video effect
vf=shmemin=1:0:0:0:160:120::shmemin.conf

#Start insert videos section
#required parameters:
#inputid : video ID to insert filter
#input-file : insert video file name
inputid=1
input-file=b.avi
#Other options (see mencoder.conf):
nosound=yes

shmemin.conf:
#spts,epts,on,sa,sx,sy,sw,sh,sz,ea,ex,ey,ew,eh,ez
# spts : start pts (float)
# epts : end pts (float)
# on   : on/off (int)
# sa   : start alpha (int)
# sx   : start x (int)
# sy   : start y (int)
# sw   : start width (int)
# sh   : start height (int)
# sz   : start zoom (float)
# ea   : end alpha (int)
# ex   : end x (int)
# ey   : end y (int)
# ew   : end width (int)
# eh   : end height (int)
# ez   : end zoom (float)

1.00,10.00,1,0,,,,,,255
10.00,15.00,,,,,,,,,160
15.00,20.00,,,,,,,,,,120
20.00,25.00,,,,,,,,,0,0,320,240
25.00,30.00,,,,,,,,,320,,0,
30.00,35.00,,0,0,0,320,240,,255
35.00,40.00,,,,,,,,,160,120,0,0
Mixed video:
sample.avi:
 
Source videos:
a.avi:
 
b.avi:

I am sorry to say that my English knowledge isn't good.

Best regards! Ötvös Attila.

2007.12.10