Shortcuts

mmpose.apis.webcam.nodes.RecorderNode

class mmpose.apis.webcam.nodes.RecorderNode(name: str, input_buffer: str, output_buffer: Union[str, List[str]], out_video_file: str, out_video_fps: int = 30, out_video_codec: str = 'mp4v', buffer_size: int = 30, enable: bool = True)[源代码]

Record the video frames into a local file.

RecorderNode uses OpenCV backend to record the video. Recording is performed in a separate thread to avoid blocking the data stream. A buffer queue is used to cached the arrived frame images.

参数
  • name (str) – The node name (also thread name)

  • input_buffer (str) – The name of the input buffer

  • output_buffer (str|list) – The name(s) of the output buffer(s)

  • out_video_file (str) – The path of the output video file

  • out_video_fps (int) – The frame rate of the output video. Default: 30

  • out_video_codec (str) – The codec of the output video. Default: ‘mp4v’

  • buffer_size (int) – Size of the buffer queue that caches the arrived frame images.

  • enable (bool) – Default enable/disable status. Default: True.

Example::
>>> cfg = dict(
...     type='RecorderNode',
...     name='recorder',
...     out_video_file='webcam_demo.mp4',
...     input_buffer='display',
...     output_buffer='_display_'
...     # `_display_` is an executor-reserved buffer
... )
>>> from mmpose.apis.webcam.nodes import NODES
>>> node = NODES.build(cfg)
Read the Docs v: 0.x
Versions
latest
1.x
v1.0.0rc1
v0.29.0
v0.28.0
dev-1.x
0.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.