Function mindspore::dataset::vision::ReadVideo

Function Documentation

Status mindspore::dataset::vision::ReadVideo(const std::string &filename, mindspore::MSTensor *video_output, mindspore::MSTensor *audio_output, std::map<std::string, std::string> *metadata_output, float start_pts = 0.0, float end_pts = 2147483647.0, const std::string &pts_unit = "pts")

Read the video, audio, metadata from a video file. It supports AVI, H264, H265, MOV, MP4, WMV file formats.

参数
  • filename[in] The path to the videoe file to be read.

  • video_output[out] The video frames of the video file.

  • audio_output[out] The audio frames of the video file.

  • metadata_output[out] The metadata contains video_fps, audio_fps.

  • start_pts[in] The start presentation timestamp of the video. Default: 0.0.

  • end_pts[in] The end presentation timestamp of the video. Default: 2147483647.0.

  • pts_unit[in] The unit for the timestamps, can be one of ["pts", "sec"]. Default: "pts".

返回

The status code.