Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
d8bdc867
Commit
d8bdc867
authored
Apr 24, 2019
by
xiongyu
Browse files
video fps should be float
parent
5d88696a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mmcv/video/io.py
mmcv/video/io.py
+3
-3
No files found.
mmcv/video/io.py
View file @
d8bdc867
...
@@ -80,7 +80,7 @@ class VideoReader(object):
...
@@ -80,7 +80,7 @@ class VideoReader(object):
# get basic info
# get basic info
self
.
_width
=
int
(
self
.
_vcap
.
get
(
CAP_PROP_FRAME_WIDTH
))
self
.
_width
=
int
(
self
.
_vcap
.
get
(
CAP_PROP_FRAME_WIDTH
))
self
.
_height
=
int
(
self
.
_vcap
.
get
(
CAP_PROP_FRAME_HEIGHT
))
self
.
_height
=
int
(
self
.
_vcap
.
get
(
CAP_PROP_FRAME_HEIGHT
))
self
.
_fps
=
int
(
round
(
self
.
_vcap
.
get
(
CAP_PROP_FPS
)
))
self
.
_fps
=
self
.
_vcap
.
get
(
CAP_PROP_FPS
)
self
.
_frame_cnt
=
int
(
self
.
_vcap
.
get
(
CAP_PROP_FRAME_COUNT
))
self
.
_frame_cnt
=
int
(
self
.
_vcap
.
get
(
CAP_PROP_FRAME_COUNT
))
self
.
_fourcc
=
self
.
_vcap
.
get
(
CAP_PROP_FOURCC
)
self
.
_fourcc
=
self
.
_vcap
.
get
(
CAP_PROP_FOURCC
)
...
@@ -111,7 +111,7 @@ class VideoReader(object):
...
@@ -111,7 +111,7 @@ class VideoReader(object):
@
property
@
property
def
fps
(
self
):
def
fps
(
self
):
"""
in
t: FPS of the video."""
"""
floa
t: FPS of the video."""
return
self
.
_fps
return
self
.
_fps
@
property
@
property
...
@@ -298,7 +298,7 @@ def frames2video(frame_dir,
...
@@ -298,7 +298,7 @@ def frames2video(frame_dir,
Args:
Args:
frame_dir (str): The directory containing video frames.
frame_dir (str): The directory containing video frames.
video_file (str): Output filename.
video_file (str): Output filename.
fps (
in
t): FPS of the output video.
fps (
floa
t): FPS of the output video.
fourcc (str): Fourcc of the output video, this should be compatible
fourcc (str): Fourcc of the output video, this should be compatible
with the output file type.
with the output file type.
filename_tmpl (str): Filename template with the index as the variable.
filename_tmpl (str): Filename template with the index as the variable.
...
...
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