Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Cavitation-Analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Elijah Andrews
Cavitation-Analysis
Commits
5c6a2ae0
Commit
5c6a2ae0
authored
Oct 22, 2020
by
Elijah Andrews
Browse files
Options
Downloads
Patches
Plain Diff
Switched codec setting.
parent
d3a05ba7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
experimental/util/mraw_converter.py
+4
-4
4 additions, 4 deletions
experimental/util/mraw_converter.py
with
4 additions
and
4 deletions
experimental/util/mraw_converter.py
+
4
−
4
View file @
5c6a2ae0
...
@@ -16,7 +16,7 @@ from experimental.util.mraw import mraw
...
@@ -16,7 +16,7 @@ from experimental.util.mraw import mraw
import
experimental.util.file_utils
as
file
import
experimental.util.file_utils
as
file
def
convert
(
mraw_obj
,
outputFile
,
codec
=
'
X
264
'
,
fps
=
24
,
frame_range
=
None
,
scale
=
1
,
contrast
=
1
):
def
convert
(
mraw_obj
,
outputFile
,
codec
=
'
X
VID
'
,
fps
=
24
,
frame_range
=
None
,
scale
=
1
,
contrast
=
1
):
movie
=
mraw_obj
movie
=
mraw_obj
if
frame_range
is
None
:
if
frame_range
is
None
:
frame_range
=
(
0
,
len
(
movie
))
frame_range
=
(
0
,
len
(
movie
))
...
@@ -38,7 +38,7 @@ def convert(mraw_obj, outputFile, codec='X264', fps=24, frame_range=None, scale=
...
@@ -38,7 +38,7 @@ def convert(mraw_obj, outputFile, codec='X264', fps=24, frame_range=None, scale=
out
.
release
()
out
.
release
()
def
convert_mraw
(
mraw_obj
,
outputFile
,
codec
=
'
X
264
'
,
fps
=
24
,
separate_readings
=
False
):
def
convert_mraw
(
mraw_obj
,
outputFile
,
codec
=
'
X
VID
'
,
fps
=
24
,
separate_readings
=
False
):
movie
=
mraw_obj
movie
=
mraw_obj
if
separate_readings
:
if
separate_readings
:
repeats
=
movie
.
image_count
//
100
repeats
=
movie
.
image_count
//
100
...
@@ -49,7 +49,7 @@ def convert_mraw(mraw_obj, outputFile, codec='X264', fps=24, separate_readings=F
...
@@ -49,7 +49,7 @@ def convert_mraw(mraw_obj, outputFile, codec='X264', fps=24, separate_readings=F
convert
(
mraw_obj
,
outputFile
,
codec
=
codec
,
fps
=
fps
,
contrast
=
2
)
convert
(
mraw_obj
,
outputFile
,
codec
=
codec
,
fps
=
fps
,
contrast
=
2
)
def
convert_series
(
dir_path
,
codec
=
"
X
264
"
,
file_format
=
"
mp4
"
):
def
convert_series
(
dir_path
,
codec
=
"
X
VID
"
,
file_format
=
"
mp4
"
):
index_file
=
open
(
dir_path
+
"
index.csv
"
)
index_file
=
open
(
dir_path
+
"
index.csv
"
)
index_lines
=
index_file
.
readlines
()
index_lines
=
index_file
.
readlines
()
index_file
.
close
()
index_file
.
close
()
...
@@ -69,4 +69,4 @@ def convert_series(dir_path, codec="X264", file_format="mp4"):
...
@@ -69,4 +69,4 @@ def convert_series(dir_path, codec="X264", file_format="mp4"):
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
convert_series
(
file
.
select_dir
(),
codec
=
"
X264
"
)
convert_series
(
file
.
select_dir
(),
codec
=
"
mp4v
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment