tencent cloud

Media Processing Service

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Strengths
Use Cases
Purchase Guide
Billing Overview
Purchase Instructions
Top Up and Purchase
Overdue Payments
Refund
Getting Started
Console Guide
Overview
Creating Tasks
Tasks
Orchestrations
Templates
Resource Packs
Video Evaluation
AIGC Content Generation
Terminal SDK
Subtitle Editing Tool
Usage Statistics
Cloud Access Management Sample
Integration Tutorials
Audio/Video Transcoding Integration
Audio/Video Enhancement Integration
Audio Separation Integration
Integration of Digital and Visible Watermarks
Media AI Integration Tutorial
Media Quality Inspection Integration
Terminal SDK integration
MPS Live Stream Recording integration
DRM integration
Other tutorials
Application Scenario and Practical Tutorial
Image Quality Improvement Scenario
Audio/Video Cost Optimization Scenario
Short Drama Translation Scenario
AI-Generated Content Scenario
Online Education Scenarios
API Documentation
History
Introduction
API Category
Making API Requests
Processing Task Initiation APIs
Task Management APIs
Transcoding and Enhancement Template APIs
Watermark Template APIs
Screenshot Template APIs
Media AI Template APIs
Media AI—Hotword Lexicon APIs
Media AI—Sample Management APIs
Media Quality Inspection Template APIs
Live Streaming Recording Template APIs
Orchestration Management APIs
Data Statistics APIs
StreamLink—Security Group Management APIs
Other APIs
Image Processing Template APIs
AI Generation APIs
Other APIs
Data Types
Error Codes
Other Documents
WebSocket Protocol for Recognition
FAQs
Basics
Account Authorization
Task Configuration
Task Initiation
Task Result Viewing
Related Agreement
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Filename Variable

PDF
Focus Mode
Font Size
Last updated: 2025-05-13 14:42:24
MPS supports rendering target paths of output files with the following variables:
Variable Name
Description
Usage Instruction
inputName
Input file name.
Applicable for VOD task.
inputFormat
Input file format.
Applicable for VOD task.
number
Output file number. Note: this variable only takes effect on the output .ts files produced under the HLS format.
Applicable for VOD task.
taskId
Task ID.
Applicable for Live task.
rand
Random number variable. In live stream recording tasks, it can be used to customize the output path. This way, when other variable parameters are the same, this random number variable can be used to avoid mutual overlap of multiple recording result files.
Applicable for Live task.
streamId
Stream ID in live streaming task.
Applicable for Live task.
format
Output file format.
Applicable for VOD and Live task.
definition
Parameter template ID.
Applicable for VOD and Live task.

Sample 1

If your transcoding requirements are as follows:
The name of the input file is AnimalWorldE01.mp4.
Transcoding templates 100010, 100020, and 100030 are used.
The names of the output files are AnimalWorldE01_100010.mp4, AnimalWorldE01_100020.mp4, and AnimalWorldE01_100030.mp4, respectively.
Then, when using the ProcessMedia API to initiate transcoding: You should specify the InputInfo.CosInputInfo.OutputObjectPath parameter as {inputName}_{definition}.{format}.

Sample 2

If your transcoding requirements are as follows:
The name of the input file is AnimalWorldE01.mp4.
Transcoding template 100210 is used.
The name of the output .m3u8 file is AnimalWorldE01_from_mp4.m3u8.
The names of the output .ts files are AnimalWorldE01_from_mp4_0.ts, AnimalWorldE01_from_mp4_1.ts, AnimalWorldE01_from_mp4_2.ts, and so on.
Then, when using the ProcessMedia API to initiate transcoding:
You should specify the InputInfo.CosInputInfo.OutputObjectPath parameter as {inputName}_from_{inputFormat}.{format}.
You should specify the InputInfo.CosInputInfo.SegmentObjectName parameter as {inputName}_from_{inputFormat}_{number}.{format}.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback