Open topic with navigation

# CreateClip

Creates a video clip from video in a rolling buffer and saves it to the specified location.

Media Server does not transcode the video. The clip uses the same codecs as the video in the rolling buffer. Therefore to create clips in MP4 format and play them in a web browser you must have written video into the rolling buffer using a suitable MPEG4 audio profile and a suitable MPEG4 video profile (for example `mpeg4audio` and `mpeg4video_h264_sd`).

Video must exist in the rolling buffer for the start time that you specify (or begin within 15 seconds of the start time).

## Parameters

Parameter | Description | Required
--- | --- | ---
Duration | The amount of video to include in the clip. | Yes
OutputFormat | The format of the container file that is returned. | No
Path | The path, name, and file extension for the clip. If you do not set this parameter, the clip is returned in the response. | No
StartTime | The time to begin the clip from (EPOCH milliseconds or ISO-8601 format). You must use UTC time. Video must exist in the rolling buffer for the start time that you specify (or begin within 15 seconds of the start time). If video begins within 15 seconds after the start time that you specify, Media Server automatically adjusts the start time. If there is no video in the rolling buffer within 15 seconds after the start time, the action fails. | Yes
Stream | The name of the rolling buffer to create the clip from. | Yes

## Example

    http://localhost:14000/action=CreateClip
                                        &Stream=BBCNews
                                        &StartTime=1393000074243
                                        &Duration=5minutes
                                        &Path=./temp/News1.ts

This action instructs Media Server to create a five minute clip from the `BBCNews` stream in the rolling buffer, beginning from Fri, 21 Feb 2014 16:27:54 GMT, and to save the clip as the `News1.ts` file in the `temp` directory.

## Response

Unless you set the `Path` parameter, the response is the video file.

    <autnresponse>
      <action>CREATECLIP</action>
      <response>SUCCESS</response>
      <responsedata></responsedata>
    </autnresponse>

© 2017 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm