Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make output directories for ffmpeg #5

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
Language: Cpp

# list of all options:
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html

Standard: c++17
AccessModifierOffset: -4
TabWidth: 4
IndentWidth: 4
ConstructorInitializerIndentWidth: 4
UseTab: Never

# jnl this may be shortened, but this will effect a lot of the formatting
ColumnLimit: 120

#jnl maybe even 0
SpacesBeforeTrailingComments: 1

# jnl again, not sure what this does
ContinuationIndentWidth: 0

# jnl maybe think about this, im not sure
# should be the same
BinPackArguments: false
BinPackParameters: false

# jnl maybe think about this, im not sure
AlwaysBreakAfterReturnType: None

#https://stackoverflow.com/questions/32970045/how-to-prevent-clang-format-to-add-space-after-comment-char
CommentPragmas: '^[^ ]'

#https://stackoverflow.com/questions/39858266/using-clang-format-keep-empty-braces-on-the-same-line
BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
# BeforeLambdaBody: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false

AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
#AlwaysBreakAfterDefinitionReturnType
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
Cpp11BracedListStyle: false
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
IncludeBlocks: Preserve
#hmm, this doesn't work for me: IndentCaseBlocks: false
IndentCaseLabels: false
IndentPPDirectives: BeforeHash
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
PointerAlignment: Left #jnl i'll fight you over this
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
#hmm, this doesn't work for me: SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
UseCRLF: false
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OS or Editor folders
.DS_Store
bitmaplib.o
*.o
max2sphere
max2spherebatch.o
*.data
max2sphere.o
.vscode
testframes
21 changes: 0 additions & 21 deletions Makefile

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile-Linux
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CC = gcc
CFLAGS = -g3 -Wall -Wextra -fPIC -DREPLICATION_ENABLED -DJOURNALING_ENABLED -m64
INCLUDES = -I/usr/include -I/opt/homebrew/include -I/opt/homebrew/opt/jpeg/include
LFLAGS = -L/usr/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/jpeg/lib
LIBS = -ljpeg -lm
CFLAGS = -g3 -Wall -Wextra -fPIC -DREPLICATION_ENABLED -DJOURNALING_ENABLED -m64 -O3
INCLUDES = -I/usr/include -I/opt/homebrew/include -I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/png/include
LFLAGS = -L/usr/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/jpeg/lib -L/opt/homebrew/opt/png/lib
LIBS = -ljpeg -lm -lpng

OBJS = max2sphere.o bitmaplib.o

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ You will need to first convert a `.360` video to frames and then pass the two co

You can use ffmpeg to split your `.360` video into frames (below at a rate of 1 FPS).

```
$ ffmpeg -i INPUT.360 -map 0:0 -r 1 -q:v 1 track0/img%d.jpg -map 0:5 -r 1 -q:v 1 track5/img%d.jpg
```shell
mkdir track0 track5
ffmpeg -i INPUT.360 -map 0:0 -r 1 -q:v 1 track0/img%d.jpg -map 0:5 -r 1 -q:v 1 track5/img%d.jpg
```

Note: this assumes video tracks are `0:0` and `0:5`. If timelapse mode is used, the tracks are different:
Expand Down
6 changes: 3 additions & 3 deletions bitmaplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include <math.h>

// Choose formats with external support required
#define ADDJPEG
//#define ADDPNG
//#define ADDTIFF
#define ADDJPEG
#define ADDPNG
//#define ADDTIFF
//#define ADDEXR

#ifdef ADDJPEG
Expand Down
Loading