Reprocess a video

Reprocesses a single video. Used to encrypt or re-encode content that already exists.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /videos/{video_id}?reencode

Reprocesses a single video — the way to encrypt, re-compress or re-segment content that already exists.

⚠️

This operation consumes credits

Insufficient balance returns 402 (not 400), with the number of credits required. Budget for it before reprocessing a catalogue.

📘

Authorization

Requires a valid API token in the Authorization header (without Bearer prefix). The video must belong to the authenticated user.

HTTP Method & Path

POST /videos/{video_id}?reencode

Base URL: https://api-v2.pandavideo.com.br

Authentication Requirements

HeaderValue
AuthorizationYour Panda API token (no Bearer prefix)

Path Parameters

NameTypeRequiredDescription
video_idstring (uuid)yesInternal video ID

Query Parameters

NameTypeRequiredDescription
reencodeflagyesPresent as a bare query flag — ?reencode

Request Body

Content-Type: application/json

Body Parameters

NameTypeRequiredDescription
hls_encryptionbooleannoEncrypt the video
compression_modestringnosize, balanced or quality
hls_segment_durationintegernoSegment duration in seconds (415)
{ "hls_encryption": true }
📘

These values override the library

compression_mode and hls_segment_duration sent here take precedence over the library configuration for this video.

Response

Success Response (200)

{
  "message": "Reencode request sent to SQS",
  "video_id": "11111111-2222-3333-4444-555555555555"
}

The response confirms the request was queued — reprocessing happens asynchronously.

⚠️

Prerequisite: the original file

The library must have keep_original_files enabled and the video must still have its original file. Otherwise the call fails with 400.

Error Responses

StatusMeaning
400The video has no original file and cannot be reprocessed
400Cost could not be computed — the video is missing duration or resolutions (cost_not_computable)
402Insufficient credits (insufficient_credits) — the payload states how many are required
404Video not found
500Internal error

Example Usage

cURL

curl -X POST \
  "https://api-v2.pandavideo.com.br/videos/{video_id}?reencode" \
  -H "Authorization: $PANDA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hls_encryption": true }'

Related

  • Many videos at once: POST /videos/reencode_bulk
  • Check which videos are encrypted: GET /videos/hls_encrypted
  • The library switch this applies retroactively: HLS Encryption
Path Params
uuid
required

Internal video ID

Body Params
boolean
string
enum
Allowed:
integer
4 to 15
Responses

400

Video has no original file, or cost not computable

402

Insufficient credits

404

Video was not found

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json