-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
40 lines (34 loc) · 1.32 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
VERSION := "v0.1.0"
run:
uvicorn main:app --reload
push:
docker build --platform linux/amd64 \
-t harbor.kymyth.com/kymyth/3d:latest \
-t harbor.kymyth.com/kymyth/3d:{{VERSION}} \
.
docker push harbor.kymyth.com/kymyth/3d:latest
docker push harbor.kymyth.com/kymyth/3d:{{VERSION}}
segment:
mediafilesegmenter -iso-fragmented -t 4 \
-f build/playlist/sw \
-z sw20_iframe.m3u8 \
-b http://localhost:8443/build/playlist/sw \
build/spatial/sw20.mp4
split-video:
#!/usr/bin/env bash
set -euxo pipefail
duration=`ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 build/misc/sw-depth.mp4`
seg_time=`echo "$duration / 1.7" | bc`
ffmpeg -i build/misc/sw-depth.mp4 -c copy -map 0 \
-segment_time $seg_time -f segment -reset_timestamps 1 \
build/split/sw-depth-%03d.mp4
combine-video:
#!/usr/bin/env bash
set -euxo pipefail
tmpfile=$(mktemp)
find ./build/split/sbs-hevc-88 -name "*.mp4" -print0 | sort -z -n -t - -k 3 | xargs -0 -I {} echo "file '$(pwd)/{}'" >> $tmpfile
echo $tmpfile
ffmpeg -f concat -safe 0 -i $tmpfile -c copy build/sbs/sw-hevc-sbs-88.mp4
rm $tmpfile
convert-hevc:
ffmpeg -i build/sbs/sw-hevc-sbs-88.mp4 -c:v hevc_videotoolbox -q:v 70 build/sbs/sw-hevc-sbs-88-q70.mp4