Fully working

parent b3f2b628
#!/bin/bash
#!/bin/bash
btime_=`grep btime /proc/stat | awk '{print $2}'`
utime_=`awk '{print $1}' /proc/uptime`
btime_utime_=`echo "${btime_?} + ${utime_?}" | bc -l`
......@@ -111,6 +111,7 @@ tees=""
hlsselect=""
streammap=""
gpus=0
injectf=""
for ftype in mp4 hls
do
case $ftype in
......@@ -171,6 +172,11 @@ do
tees="$tees|"
fi
tees="$tees [select=\'v:$((num-1)),a:$((num-1))\':f=mp4:movflags=+faststart]${scale}_${outf}"
if [ x"$injectf" == "" ] ; then
injectf="${scale}_${outf}"
else
injectf="$injectf ${scale}_${outf}"
fi
elif [ "$ftype" == "hls" ] ; then
if [ x"$hlsselect" != x"" ] ; then
hlsselect="$hlsselect,"
......@@ -190,7 +196,7 @@ do
done
if [ X"$scalestring" != X"" ] ; then
if [ x"$HLS" == "y" ] ; then
if [ x"$HLS" == x"y" ] ; then
if [ x"$tees" != x"" ] ; then
tees="$tees|"
fi
......@@ -201,6 +207,12 @@ if [ X"$scalestring" != X"" ] ; then
tees="${tees}${HLSDIR}/${outf}/stream_%v.m3u8"
fi
ffmpeg $YES -i $inf -filter_complex "[0:v]split=${num}${splits};$scalestring" $vmaps $amaps -f tee "$tees"
echo ffmpeg $YES -i $inf -filter_complex "[0:v]split=${num}${splits};$scalestring" $vmaps $amaps -f tee "$tees"
for f in $injectf
do
spatialmedia -i -s left-right -m equirectangular ${scale}_${outf} injected_${outf}
done
fi
......
......@@ -5,13 +5,30 @@ else
com="$1"
fi
cd `pwd`
EQUI="n"
case $com in
equi|equiall|equimp4|equihls)
EQUI="y"
;;
esac
for vl in VID_*_00_*.insv
do
vout=`echo $vl | sed -e "s/\.insv/\_VR\_180\_LR\.mp4/"`
vout="$(echo $vl | sed -e 's/\.insv//' | sed -e 's/\.mp4//' )_VR_180_LR.mp4"
echo "--------------------------------------"
echo "creating: $vout"
echo "LEFT: $vl"
vr=`echo $vl | sed -e 's/\_00\_/\_10\_/'`
echo "RIGHT: $vr"
Insta360_EVO_to_VR $com $vl $vr $vout
if [ x"$EQUI" == x"y" ] ; then
vr=`echo $vl | sed -e 's/\_00\_/\_10\_/'`
echo "RIGHT: $vr"
echo Insta360_EVO_to_VR $com $vl $vr $vout
Insta360_EVO_to_VR $com $vl $vr $vout
else
echo Insta360_EVO_to_VR $com $vl $vout
Insta360_EVO_to_VR $com $vl $vout
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment