#!/bin/bash

DIR_BIN="/usr/local/bin"
DIR_CONF="/usr/local/share/openmcu-ru/config"
DIR_PIPE="/usr/local/share/openmcu-ru/pipe"

$DIR_BIN/ffserver -f $DIR_CONF/ffserver.conf &

$DIR_BIN/ffmpeg -y\
 -r 10 -s 4cif -f rawvideo -i $DIR_PIPE/video.$1\
 -ar 16000 -f s16le -i $DIR_PIPE/sound.$1\
 http://127.0.0.1:8090/feed.ffm

kill %1
