poseinterface.io.video_to_poseinterface#
- poseinterface.io.video_to_poseinterface(input_video, output_video_dir, *, sub_id, ses_id, cam_id)[source]#
Reencode and rename a video to
poseinterfaceformat.Copies the input video to
output_video_dirwith the filenamesub-<sub_id>_ses-<ses_id>_cam-<cam_id>.mp4. If the video is not already encoded as H.264 + yuv420p in an.mp4container, it is re-encoded with ffmpeg before saving.- Parameters:
output_video_dir (
Path|str) – Directory where the converted video will be written (created automatically if it does not exist).sub_id (
str) – Subject ID used to build the output filename.ses_id (
str) – Session ID used to build the output filename.cam_id (
str) – Camera ID used to build the output filename.
- Returns:
Path to the saved
.mp4file.- Return type:
- Raises:
RuntimeError – If ffmpeg is not available on the system PATH.