Transcoding jobs can fail due to source file problems such as missing video streams, metadata issues, frame errors, or missing headers. This FAQ covers common transcoding issues, supported formats, and their solutions.
Transcoding issues
How do I troubleshoot a failed transcoding job submitted through the SubmitJobs API?
-
Confirm that the source file plays correctly on a local device. Most transcoding failures are caused by source file issues such as missing video streams, metadata problems, frame errors, or missing headers. These issues can trigger efficiency monitoring and cause the job to fail.
-
Run
ffprobe -show_streams -show_format -of json -i [filePath]to check for metadata issues such as a missing moov atom or stream exceptions. -
Run
ffprobe -show_packets -i [filePath]to check for data stream problems and verify that the stream duration matches the metadata duration.NoteA mismatch between the metadata duration and the actual stream duration can cause the transcoding job to fail. Process files with metadata issues locally using FFmpeg before uploading.
-
-
The protocol is not supported.
-
Find the error code in the error code list and analyze the cause of the failure.
-
If a text watermark contains special characters, the output might be truncated or the job might fail. Escape special characters before submitting the job, or contact Alibaba Cloud for compatibility support.
-
The following are common reasons for encrypted transcoding failures:
-
Custom key
Generate the plaintext key for encryption using GenerateDataKey. Do not use a custom string to generate the encryption key. Otherwise, the encrypted transcoding job will fail.
-
Encryption failed.
Using a key type other than AES_128 from GenerateDataKey will cause a standard encrypted transcoding job to fail without generating an encrypted file.
-
Decryption failed
If playback of a standard encrypted file fails after decryption, confirm that the decryption API base64-decodes the plaintext key generated by KMS before passing it to the player for decryption. Otherwise, playback will fail.
-
Repeated generation
Standard encrypted transcoding is always triggered by the user. If encrypted files are generated repeatedly, check whether the SubmitJobs API is called multiple times.
-
The transcoding status is stuck at "Submitted" and does not update.
A "Submitted" status means the job is in the preparation stage (downloading and analyzing the video). Large files, high bitrates, or complex template settings can extend this stage. Wait for the job to complete.
The source video has two audio streams, but the output file has only one. How can I fix this?
Specify which audio stream to use when submitting the job. To transcode the first audio stream (index 0), add "AudioStreamMap":"0:a:0" to the `Output` parameter.
Why are the width and height of the output video different from my settings?
The transcoding template supports automatic rotation (LongShortMode). When enabled, set only the width or height and leave the other empty. To output a specific resolution, disable automatic rotation. For example, set the width to control the shorter side of a portrait video, or set the height to control the longer side of a landscape video.
An M3U8 file transcoded from an MP4 file plays with a black screen. How do I troubleshoot this?
Check whether the source video stream is valid. If the first TS segment contains no video data, the player displays a black screen. To resolve this, first transcode the source to a new MP4 to repair it, then transcode the MP4 to M3U8.
The video transcoded successfully but fails to play. What is the cause?
Playback might fail if the HTTPS certificate has expired or is configured incorrectly. If this happens, try playing the video over HTTP.
The source file is HDR. After transcoding to SDR, the output is overexposed or too dark. Why?
Overexposure occurs when the template lacks adaptive transcoding configuration. Contact Alibaba Cloud support to enable adaptive transcoding. Underexposure occurs when a non-HDR source is transcoded with an HDR template. Verify whether the source is HDR before selecting a template.
Can ApsaraVideo Media Processing detect the position of the moov box? What about files without a moov box?
After transcoding, the moov box is placed at the beginning of the MP4 file by default. Custom configuration is not supported. Files without a moov box cannot be processed and cause transcoding to fail.
Why is the duration of the output audio file different from the source video after transcoding?
ApsaraVideo Media Processing uses the shortest audio stream to determine job duration. If timestamps in the source file are discontinuous, the service may not retrieve all media information, causing duration drift.
Why did the audio bitrate I set during transcoding not take effect?
If the audio encoder remains unchanged and the specified output bitrate exceeds the input bitrate, the bitrate resets to the original value. SubmitJobs.
What should I do if the API returns empty data?
If the API returns empty data or a "resource does not exist" error, verify that your UID, request region, and resource ID are correct.
Why do my jobs keep failing?
Check the returned error message. For example, "pre-processing failed" means ApsaraVideo Media Processing could not decode the source file.
Basic questions
What are transcoding resources?
Transcoding resources are compute nodes that execute transcoding jobs. Each resource handles one job at a time. ApsaraVideo Media Processing provides shared transcoding resources with a per-user quota that limits maximum concurrent jobs. When the system is busy, actual concurrency may be lower than the quota.
What are preset transcoding templates?
A preset template is a built-in transcoding template with pre-configured output format, resolution, and codec settings. ApsaraVideo Media Processing analyzes video features and recommends templates suitable for various playback devices and network conditions. Use a recommended preset template when creating a job. Submitting a job with a non-recommended preset template returns an error. Preset template details.
What if none of the preset transcoding templates you provide are suitable for me?
Create a Custom transcoding templates.
How do I upload my media files to OSS?
Upload files through the ApsaraVideo Media Processing console or the OSS console. Upload videos .
What is the maximum size of a media file that ApsaraVideo Media Processing can handle?
ApsaraVideo Media Processing supports input files up to 100 GB. To process larger files, contact us.
Can I use a CDN to distribute my media files?
Yes. Use the OSS bucket that stores your transcoded output as the origin for Alibaba Cloud CDN to reduce latency, improve response speed, and address issues such as low network bandwidth, high user traffic, and uneven network distribution. CDN product page. Configure an accelerated domain name.
How long does a transcoding job take to complete?
Transcoding speed depends on input file duration, resolution, bitrate, and template settings. A job typically takes 0.5 to 2 times the input file duration. Multiple jobs are queued and processed in order.
Can I query the transcoding progress in real time?
No. You can estimate progress based on the percentage:
-
0%: Preparation stage (downloading and analyzing the video).
-
20%: Transcoding in progress.
-
100%: Complete.
Is there a one-to-one correspondence between input and output files? Can I create multiple outputs for one job?
Each job maps to one input file, one template, and one output file. You can specify multiple outputs in a single submission, and the system creates a separate job for each output.
How many jobs can ApsaraVideo Media Processing handle simultaneously?
Each user has a default transcoding resource quota allocated to MPS queues. Each queue operates independently, and its concurrent job count cannot exceed its allocated quota. Limits.
What are transcoding resources?
Transcoding resources are compute nodes that execute transcoding jobs. Each resource handles one job at a time. ApsaraVideo Media Processing provides shared resources with a per-user quota that limits maximum concurrent jobs. When the system is busy, actual concurrency may be lower than the quota.
What are preset transcoding templates?
A preset template is a built-in transcoding template with pre-configured output format, resolution, and codec settings. ApsaraVideo Media Processing analyzes video features and recommends templates for various playback devices and network conditions. Specify a recommended preset template when creating a job. Using a non-recommended preset template returns an error. Preset template details.
What if none of the preset transcoding templates you provide are suitable for me?
Create a Custom transcoding templates.
Can you provide a dedicated transcoder for me?
ApsaraVideo Media Processing does not support transcoder customization or dedicated services.
Is real-time encoding supported?
ApsaraVideo Media Processing is a file-based transcoding service and does not support real-time transcoding.
In which regions is ApsaraVideo Media Processing available?
When I create a message topic in ApsaraVideo Media Processing, I receive the "Only one topic can be created!" error. Why?
Each user can create only one MPS queue. To create a queue, follow the steps in Create an MPS queue.
What do the Profile field values in AliyunAudioCodec mean in ApsaraVideo Media Processing?
The audio codec supports five profiles:
-
aac_low
-
aac_he
-
aac_he_v2
-
aac_ld
-
aac_eld
Format support
Supported input formats
-
Container formats
3GP, AVI, FLV, MP4, M3U8, MPG, ASF, WMV, MKV, MOV, TS, WebM, and more.
-
Video encoding formats
H.264/AVC, H.263, H.263+, MPEG-1, MPEG-2, MPEG-4, MJPEG, VP8, VP9, Quicktime, RealVideo, Windows Media Video, and more.
-
Audio encoding formats
AAC, AC-3, ADPCM, AMR, DSD, MP1, MP2, MP3, PCM, RealAudio, Windows Media Audio, and more.
Supported output formats
Recommended output formats: FLV for PCs, MP4 for Android, and TS (M3U8) for iOS. Default video codec: H.264/AVC. Default audio codec: AAC.
Detailed list of supported formats
When creating MP4 files, is progressive download supported?
Placing the MOOV atom at the beginning of the MP3 file allows playback to start immediately, without waiting for the entire file to download.
Does ApsaraVideo Media Processing support stereo formats?
ApsaraVideo Media Processing supports dual-channel AAC and MP3 audio output.
Security
Are my media files secure?
Yes. All media resources are stored in your own OSS buckets. Use RAM to grant ApsaraVideo Media Processing transcoding access only to specific files in designated buckets.
Are encrypted media files supported?
No. ApsaraVideo Media Processing does not support encrypted input files.