Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
Insta360VRutils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sysadmin
Insta360VRutils
Commits
5245177e
Commit
5245177e
authored
Feb 22, 2022
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fully working
parent
b3f2b628
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
+35
-6
Insta360_EVO_to_VR
Insta360_EVO_to_VR
+14
-2
Insta360_EVO_to_VR_processdir
Insta360_EVO_to_VR_processdir
+21
-4
No files found.
Insta360_EVO_to_VR
View file @
5245177e
#!/bin/bash
#!/bin/bash
btime_
=
`
grep
btime /proc/stat |
awk
'{print $2}'
`
btime_
=
`
grep
btime /proc/stat |
awk
'{print $2}'
`
utime_
=
`
awk
'{print $1}'
/proc/uptime
`
utime_
=
`
awk
'{print $1}'
/proc/uptime
`
btime_utime_
=
`
echo
"
${
btime_
?
}
+
${
utime_
?
}
"
| bc
-l
`
btime_utime_
=
`
echo
"
${
btime_
?
}
+
${
utime_
?
}
"
| bc
-l
`
...
@@ -111,6 +111,7 @@ tees=""
...
@@ -111,6 +111,7 @@ tees=""
hlsselect
=
""
hlsselect
=
""
streammap
=
""
streammap
=
""
gpus
=
0
gpus
=
0
injectf
=
""
for
ftype
in
mp4 hls
for
ftype
in
mp4 hls
do
do
case
$ftype
in
case
$ftype
in
...
@@ -171,6 +172,11 @@ do
...
@@ -171,6 +172,11 @@ do
tees
=
"
$tees
|"
tees
=
"
$tees
|"
fi
fi
tees
=
"
$tees
[select=
\'
v:
$((
num-1
))
,a:
$((
num-1
))
\'
:f=mp4:movflags=+faststart]
${
scale
}
_
${
outf
}
"
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
elif
[
"
$ftype
"
==
"hls"
]
;
then
if
[
x
"
$hlsselect
"
!=
x
""
]
;
then
if
[
x
"
$hlsselect
"
!=
x
""
]
;
then
hlsselect
=
"
$hlsselect
,"
hlsselect
=
"
$hlsselect
,"
...
@@ -190,7 +196,7 @@ do
...
@@ -190,7 +196,7 @@ do
done
done
if
[
X
"
$scalestring
"
!=
X
""
]
;
then
if
[
X
"
$scalestring
"
!=
X
""
]
;
then
if
[
x
"
$HLS
"
==
"y"
]
;
then
if
[
x
"
$HLS
"
==
x
"y"
]
;
then
if
[
x
"
$tees
"
!=
x
""
]
;
then
if
[
x
"
$tees
"
!=
x
""
]
;
then
tees
=
"
$tees
|"
tees
=
"
$tees
|"
fi
fi
...
@@ -201,6 +207,12 @@ if [ X"$scalestring" != X"" ] ; then
...
@@ -201,6 +207,12 @@ if [ X"$scalestring" != X"" ] ; then
tees
=
"
${
tees
}${
HLSDIR
}
/
${
outf
}
/stream_%v.m3u8"
tees
=
"
${
tees
}${
HLSDIR
}
/
${
outf
}
/stream_%v.m3u8"
fi
fi
ffmpeg
$YES
-i
$inf
-filter_complex
"[0:v]split=
${
num
}${
splits
}
;
$scalestring
"
$vmaps
$amaps
-f
tee
"
$tees
"
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
fi
...
...
Insta360_EVO_to_VR_processdir
View file @
5245177e
...
@@ -5,13 +5,30 @@ else
...
@@ -5,13 +5,30 @@ else
com
=
"
$1
"
com
=
"
$1
"
fi
fi
cd
`
pwd
`
cd
`
pwd
`
EQUI
=
"n"
case
$com
in
equi|equiall|equimp4|equihls
)
EQUI
=
"y"
;;
esac
for
vl
in
VID_
*
_00_
*
.insv
for
vl
in
VID_
*
_00_
*
.insv
do
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
"--------------------------------------"
echo
"creating:
$vout
"
echo
"creating:
$vout
"
echo
"LEFT:
$vl
"
echo
"LEFT:
$vl
"
vr
=
`
echo
$vl
|
sed
-e
's/\_00\_/\_10\_/'
`
if
[
x
"
$EQUI
"
==
x
"y"
]
;
then
echo
"RIGHT:
$vr
"
Insta360_EVO_to_VR
$com
$vl
$vr
$vout
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
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment