Skip to content
Source lifecycle

Source Lifecycle

The original source file of a hosted video is temporary. Transcodely deletes it a fixed number of days after the video becomes ready: 7 days by default, or your app’s own window. Renditions and playback are never affected.

To keep a source, retain it. A retained source is kept until you release it or delete the video, and it is billed as storage on its own invoice line, Retained source videos. Sources inside their retention window are never billed.

Scope — read this first

  • Only the original source object is deleted: the file you uploaded, or the copy Transcodely stored for a video created from a URL.
  • Renditions, manifests, posters and playback are never touched. A video keeps playing exactly as before after its source is deleted.
  • Only hosted videos whose source lives in Transcodely-managed storage are affected. Videos written to your own storage origins are never touched.
  • Every video shows its own deletion date in source_expires_at.

The retention window

Each app has one retention window, delete_source_after_days on its hosting configuration:

ValueWindow
unset or 0The platform default: 7 days after the video is ready. 0 clears a custom window; it never means “keep forever”.
1 to 3650That many days after the video is ready.

There is no “never delete” setting. Keeping a source is a per-video choice, and it is billed.

In the dashboard, open the app, go to Hosting settings, and switch on Original source retention to set a custom window. Via the API, merge the field into the hosting config:

curl -X POST https://api.transcodely.com/transcodely.v1.AppService/UpdateHostingConfig 
  -H "Authorization: Bearer ak_your_api_key" 
  -H "Content-Type: application/json" 
  -d '{
    "id": "app_k1l2m3n4o5",
    "hosting_config": {
      "delete_source_after_days": 30
    }
  }'
await client.apps.updateHostingConfig({
  id: "app_k1l2m3n4o5",
  hostingConfig: { deleteSourceAfterDays: 30 },
});
client.apps.update_hosting_config(
    id="app_k1l2m3n4o5",
    hosting_config={"delete_source_after_days": 30},
)
_, err := client.Apps.UpdateHostingConfig(ctx, &transcodely.AppUpdateHostingConfigParams{
	Id:            "app_k1l2m3n4o5",
	HostingConfig: &transcodely.HostingConfig{DeleteSourceAfterDays: proto.Int32(30)},
})

Changing the window immediately clears any pending deletion schedules for the app. Each source is then re-evaluated under the new window, always with a fresh warning first.


The timeline

                                  ready_at + window (7 days by default)
                                          │
                                          ▼
  video ready ──── … ────► scheduled + warned ──── ≥ 72 hours ────► source deleted
                           (video.source_scheduled_                 (source_deleted_at set)
                            for_deletion webhook)

A source is never deleted without a warning. At least 72 hours before a deletion, Transcodely:

  1. Sets source_scheduled_for_deletion_at on the video,
  2. Sends a video.source_scheduled_for_deletion webhook whose payload is the video, and
  3. Emails the account a daily digest listing the sources due for deletion.

With the 7-day default, the warning arrives on day 4. Use the lead time to retain anything you still need in its original form. When the scheduled time passes, the source is removed and source_deleted_at is set.


Retaining a source

Set source_pinned to retain a video’s source. You can do it when you create the video:

curl -X POST https://api.transcodely.com/transcodely.v1.VideoService/CreateFromUrl 
  -H "Authorization: Bearer ak_your_api_key" 
  -H "Content-Type: application/json" 
  -d '{
    "app_id": "app_k1l2m3n4o5",
    "url": "https://example.com/source/product-demo.mp4",
    "source_pinned": true
  }'

source_pinned is accepted the same way on CreateUpload and CreateMultipartUpload. In the dashboard, switch on Keep the original source on the upload or import form.

Or retain an existing video at any time. Retaining also immediately clears any pending deletion:

curl -X POST https://api.transcodely.com/transcodely.v1.VideoService/Update 
  -H "Authorization: Bearer ak_your_api_key" 
  -H "Content-Type: application/json" 
  -d '{
    "id": "vid_a1b2c3d4e5f6g7",
    "source_pinned": true
  }'
const video = await client.videos.update({ id: "vid_a1b2c3d4e5f6g7", sourcePinned: true });
video = client.videos.update(id="vid_a1b2c3d4e5f6g7", source_pinned=True)
video, err := client.Videos.Update(ctx, &transcodely.VideoUpdateParams{
	Id:           "vid_a1b2c3d4e5f6g7",
	SourcePinned: proto.Bool(true),
})

In the dashboard, open the video and switch on Keep the original source (a scheduled-deletion warning also offers it in one click). Retaining is always allowed, even after the source has been deleted, where it does nothing and bills nothing.

Releasing a source (source_pinned: false) deletes nothing on the spot. The source goes back to its retention window: if the window has already passed, it is scheduled no sooner than 72 hours out, with a fresh warning. The Update response carries the new source_expires_at.


What retention costs

SourceKeptBilled
Inside its retention windowUntil the window ends, then deleted after a 72-hour warningNo
Retained (source_pinned: true)Until released or the video is deletedYes, as storage at the standard storage rate (€0.020/GB-month list)
DeletedNoNo

Retained sources appear on your invoice as their own line, Retained source videos, separate from Hosting — storage, which covers renditions, manifests and posters. Both bill the same way: each day’s stored size at the monthly rate. GetUsage reports them as their own pair, retained_source_gb_avg and retained_source_cost; storage_gb_avg and storage_cost cover the deliverables only. See Pricing.


Video source fields

Four fields on the Video object describe the source. None affect playback.

FieldMeaning
source_pinnedWhether the source is retained (billed). Writable at creation and via VideoService/Update.
source_expires_atWhen the source will be deleted. Absent when the source is retained, already deleted, or the video is not ready yet. Read-only.
source_scheduled_for_deletion_atPresent once a deletion has been scheduled and warned about; cleared on retain, on a window change, and on delete. Read-only.
source_deleted_atWhen the source was deleted. Set exactly once. The authoritative “source is gone” signal. Read-only.

Re-processing consequence

Once source_deleted_at is set, the original is gone. Re-processing that would read the source, such as new codecs or renditions, or captions for an existing video, can only use a progressive (single-file) rendition. Streaming renditions (HLS or DASH) cannot stand in for the source, so a video that has only those needs its source uploaded again before it can be re-processed.

If you intend to re-encode a video later, retain its source, or set a longer window for the app. The 72-hour warning exists so you can retain anything you still need before it is deleted.


What is never affected

  • Playback: renditions, manifests and posters are untouched; delivery is unchanged.
  • Your own origins: videos backed by your storage origins are out of scope.
  • Retained videos: a retained source is kept until you release it or delete the video.

  • Webhooks: the video.source_scheduled_for_deletion event and signature verification.
  • Apps: the hosting_config object and UpdateHostingConfig.
  • Videos: source_pinned, source_expires_at and the video object.

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.