Skip to content

Commit

Permalink
Renamed files for better readibility, added support for 4096 video files
Browse files Browse the repository at this point in the history
  • Loading branch information
ultramango committed Feb 18, 2018
1 parent 2e60066 commit 1fc190d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gear360video.cmd
Expand Up @@ -12,7 +12,7 @@ rem enc, ENC, encoding - means stitched images -> video
set FFMPEGPATH=c:\Program Files\ffmpeg\bin
set FRAMESTEMPDIR=frames
set OUTTEMPDIR=frames_stitched
set PTOTMPL=gear360video.pto
set PTOTMPL=gear360video3840.pto
rem %% is an escape character (note: this will fail on wine's cmd.exe)
set IMAGETMPLDEC=image%%05d.jpg
set IMAGETMPLENC=image%%05d_pano.jpg
Expand Down
19 changes: 12 additions & 7 deletions gear360video.sh
Expand Up @@ -21,21 +21,23 @@ FRAMESTEMPDIRSUFF="frames"
OUTTEMPDIRSUFF="out"
OUTDIR="$DIR/html/data"
# Options, default is the quality option, overridable by speed parameter
# Valid value is: 2-31, lower is better
FFMPEGQUALITYDEC="-q:v 2"
FFMPEGQUALITYENC="-c:v libx265 -x265-params crf=18"
IMAGETMPLDEC="image%05d.jpg"
IMAGETMPLENC="image%05d_pano.jpg"
PTOTMPL4K="gear360video4k.pto"
PTOTMPL2K="gear360video2k.pto"
PTOTMPL4096="gear360video4096.pto"
PTOTMPL3840="gear360video3840.pto"
PTOTMPL2560="gear360video2560.pto"
# This is a default, it will/should be overwritten anyway
PTOTMPL="$DIR/${PTOTMPL4K}"
PTOTMPL="$DIR/${PTOTMPL3840}"
TMPAUDIO="tmpaudio.aac"
TMPVIDEO="tmpvideo.mp4"
# Throttle parallel processing to give some room for other processes
# See: https://www.gnu.org/software/parallel/parallel_tutorial.html#Limiting-the-resources
PARALLELEXTRAOPTS="--load 99% --noswap --memfree 500M"
# Debug, yes = print debug messages
DEBUG="no"
DEBUG="yes"
# Global flag if temporary directories should be removed
CLEANUP="yes"

Expand Down Expand Up @@ -228,14 +230,17 @@ print_debug "Input video size: ${SRCVIDEOSIZE}"

# Detect video size and select appriopriate pto file
case $SRCVIDEOSIZE in
4096:2048)
PTOTMPL=$PTOTMPL4096
;;
3840:1920)
PTOTMPL=$PTOTMPL4K
PTOTMPL=$PTOTMPL3840
;;
2560:1280)
PTOTMPL=$PTOTMPL2K
PTOTMPL=$PTOTMPL2560
;;
*)
PTOTMPL=$PTOTMPL4K
PTOTMPL=$PTOTMPL3840
;;
esac
print_debug "PTO template: ${PTOTMPL}"
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions gear360video4k.pto → gear360video3840.pto
Expand Up @@ -5,9 +5,9 @@ m g1 i0 f0 m2 p0.00784314

# image lines
#-hugin cropFactor=1
i w3840 h1920 f2 v387.454063018623 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0 p0 y0 TrX0 TrY0 TrZ0 Tpy0 Tpp0 j0 a0 b0.0115820133918171 c0 d-907.2 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0 S-39,1953,-57,2004 Vm5 n"C:\temp\pano_test\frames\image00017.png"
i w3840 h1920 f2 v387.454063018623 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0 p0 y0 TrX0 TrY0 TrZ0 Tpy0 Tpp0 j0 a0 b0.0115820133918171 c0 d-907.2 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0 S-39,1953,-57,2004 Vm5 n"dummy.jpg"
#-hugin cropFactor=1
i w3840 h1920 f2 v372.778480484579 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0.597332522733759 p-0.335220286462938 y168.87925571057 TrX0 TrY0 TrZ0 Tpy0 Tpp0 j0 a0 b-0.00193455996232153 c0 d907 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0 S1889,3890,-43,1973 Vm5 n"C:\temp\pano_test\frames\image00017.png"
i w3840 h1920 f2 v372.778480484579 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0.597332522733759 p-0.335220286462938 y168.87925571057 TrX0 TrY0 TrZ0 Tpy0 Tpp0 j0 a0 b-0.00193455996232153 c0 d907 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0 S1889,3890,-43,1973 Vm5 n"dummy.jpg"


# specify variables that should be optimized
Expand Down Expand Up @@ -70,10 +70,10 @@ c n0 N1 x1586.5 y1659 X2303.5 Y1623 t0
#hugin_optimizeReferenceImage 0
#hugin_blender enblend
#hugin_remapper nona
#hugin_enblendOptions
#hugin_enfuseOptions
#hugin_enblendOptions
#hugin_enfuseOptions
#hugin_hdrmergeOptions -m avg -c
#hugin_verdandiOptions
#hugin_verdandiOptions
#hugin_outputLDRBlended true
#hugin_outputLDRLayers false
#hugin_outputLDRExposureRemapped false
Expand Down

0 comments on commit 1fc190d

Please sign in to comment.