For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • Get started
    • Overview
    • Quickstart
  • Upload videos
    • Upload videos from device
    • Upload videos from a URL
    • Upload 4K videos
    • Speed up video processing
  • Playback and delivery
    • Play your videos
    • Embed a video in your app
    • Configure media quality levels
    • Enable MP4 Support for offline viewing
    • Create and manage playlists
  • Edit and transform videos
    • Add metadata to videos
    • Add a watermark to a video
    • Add an intro and outro to a video
    • Clip and trim videos
    • Merge and stitch videos
    • Remove unwanted video segments
  • Manage audio and subtitle tracks
    • Upload and play audio and subtitle tracks
    • Add subtitles to a video
    • Generate subtitles automatically
    • Add audio to a video
    • Replace a video's audio track
    • Normalize audio loudness
    • Overlay audio on a video timeline
  • Extract images from video
    • Create thumbnails from a video
    • Create GIFs from a video
    • Create timeline hovers from a video
  • Video security
    • Generate JWTs for secure media
    • Secure media access with JWTs
    • Restrict playback access
    • Set up DRM encryption
    • FairPlay DRM integration
  • VOD events
    • Media events
    • Transform media events
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Steps to remove video segments from new media
  • Example JSON request payload for creating media from URL
  • Request body while creating new media by direct upload
  • Request body while removing segments from existing media
  • Example scenario
  • Webhook events for status
  • Tips for optimal results
Edit and transform videos

Remove unwanted video segments

Remove unwanted video segments and mistakes using FastPix editing tool for polished content.
Was this page helpful?
Previous

Upload and play audio and subtitle tracks

Next
Built with

Eliminate unnecessary sections from your videos using FastPix’s simple editing feature. With this tool, you can remove mistakes, interruptions, or irrelevant content, allowing you to produce polished, professional videos with a clear and focused narrative.


Steps to remove video segments from new media

To remove sections of a video, use FastPix’s Create media from URL or Upload media from device API endpoint. Specify the segments you want to exclude, and FastPix edits them out, leaving a smooth final video.


  1. Identify the unwanted segments by determining the start and end times for the portions of the video you want to remove. For example, in a 10-second video, if you need to delete a segment from 2 to 5 seconds and another from 7 to 9 seconds, make note of these time ranges

NOTE
Ensure the timestamps accurately cover the unwanted content to avoid accidentally cutting desired parts of the video.


  1. Configure the JSON request with expunge segments. Using FastPix’s API, define the segments you want to remove by setting expungeSegments within the JSON request. For each segment, provide the start and end times in seconds.

Example JSON request payload for creating media from URL


Request
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "https://static.fastpix.com/fp-sample-video.mp4",
6 "expungeSegments": ["2-5", "7-9"]
7 }
8 ],
9"accessPolicy": "public"
10}

In this example, the segments from 2 to 5 seconds and 7 to 9 seconds are removed, leaving the rest of the video intact.


Request body while creating new media by direct upload


Request body
1{
2 "corsOrigin": "*",
3 "pushMediaSettings": {
4 "inputs": [
5 {
6 "type": "video",
7 "expungeSegments": ["2-5", "7-9"]
8 }
9 ],
10 "accessPolicy": "public"
11 }
12}
Using Google Drive link to upload

Request body while removing segments from existing media


Request body
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "fp_mediaId://{Media_ID}",
6 "expungeSegments": ["4-6", "15-19"]
7 }
8 ],
9"accessPolicy": "public"
10}
Using Google Drive link to upload

In this example, in place of the URL you can provide the existing media ID with fp_mediaId:// prefix and segments from 4 to 6 seconds and 15 to 19 seconds are removed, leaving the rest of the video intact.


  1. Submit your API request after creating the JSON request, send it through the FastPix API endpoint. The system processes your request, removing the specified segments to produce a seamless, edited video.

For full details on request fields, authentication, and example responses, see the Create media from URL (API reference).


Example scenario

Let’s say your original video is 10 seconds long, and you remove two segments totalling 6 seconds (2-5 seconds and 7-9 seconds). After processing, your final video duration is 5 seconds.


NOTE
Removed segments do not affect the overall quality of the remaining content.


Webhook events for status

Upon successfully removing segments from the media, FastPix triggers the corresponding webhook event:

  • video.media.expunge.ready: Triggered when the specific segment from media has been successfully removed.
Using Google Drive link to upload

Tips for optimal results

  • Use precise timestamps: Ensure start and end times accurately match the unwanted content.

  • Avoid over-cutting: Only remove parts that don’t contribute to the video’s purpose to keep the narrative intact.

  • Preview edited videos: Once processed, preview the edited video to confirm all unwanted content has been removed as expected.