Obtient l'URL de lecture d'un fichier audio ou vidéo en fournissant l'identifiant audio ou vidéo, qui peut ensuite être lu à l'aide d'ApsaraVideo Player ou d'un lecteur tiers tel qu'un lecteur natif du système, open source ou personnalisé.
Description de l'opération
Avant d'utiliser cette opération, assurez-vous de bien comprendre les méthodes de facturation et les tarifs d'ApsaraVideo VOD. Le téléchargement ou la lecture directs de vidéos à partir des URL de lecture d'ApsaraVideo VOD entraîne des frais de trafic sortant. Si aucun nom de domaine accéléré n'est configuré, reportez-vous à la section Facturation du trafic sortant de stockage. Si un nom de domaine accéléré est configuré, reportez-vous à la section Facturation du service d'accélération. Si vous avez activé l'accélération de transfert de stockage, le téléchargement ou la lecture directs de vidéos à partir des URL de lecture d'ApsaraVideo VOD entraîne également des frais d'accélération de téléchargement. Pour plus de détails sur la facturation, reportez-vous à la section Facturation de l'accélération de transfert de stockage.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
vod:GetPlayInfo |
get |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| VideoId |
string |
Non |
L'identifiant audio ou vidéo. Un seul identifiant audio ou vidéo est pris en charge. Vous pouvez obtenir l'identifiant en utilisant les méthodes suivantes : |
93ab850b4f654b6e91d24d81d44**** |
| Formats |
string |
Non |
Le format du flux multimédia. Séparez les différents formats par des virgules (,). Valeurs valides : |
mp4,m3u8 |
| AuthTimeout |
integer |
Non |
La période de validité de l'URL de lecture. Unité : secondes. |
1800 |
| OutputType |
string |
Non |
Le type d'URL de sortie. Valeurs valides : |
cdn |
| StreamType |
string |
Non |
Le type de flux multimédia. Séparez les différents types par des virgules (,). Valeurs valides : |
video |
| ReAuthInfo |
string |
Non |
Le paramètre de réauthentification CDN. La valeur est une chaîne JSON. Lorsque la signature de type A est activée pour l'authentification d'URL, vous pouvez utiliser ce paramètre pour définir les valeurs uid et rand de l'URL d'authentification. Pour plus d'informations, reportez-vous à la section Signature de type A. |
{"uid":"12345","rand":"abckljd"} |
| Definition |
string |
Non |
La définition du flux vidéo. Séparez les différentes définitions par des virgules (,). Valeurs valides : |
LD |
| ResultType |
string |
Non |
Le type de données renvoyées. Valeurs valides : |
Single |
| PlayConfig |
string |
Non |
Les paramètres de lecture personnalisés. La valeur est une chaîne JSON qui prend en charge la spécification des paramètres de lecture de nom de domaine. Pour plus de détails sur la construction des paramètres, reportez-vous à la section PlayConfig. |
{"PlayDomain":"vod.test_domain","XForwardedFor":"yqCD7Fp1uqChoVj/sl/p5Q==","PreviewTime":"20","MtsHlsUriToken":"yqCD7Fp1uqChoVjslp5Q"} |
| AdditionType |
string |
Non |
Obtient l'URL des données de commentaires défilants accessibles depuis la Chine. Valeurs valides : danmu. |
danmu |
| Trace |
string |
Non |
Les paramètres de filigrane numérique personnalisés. |
marque de test |
| DigitalWatermarkType |
string |
Non |
Le type de filigrane numérique. Valeurs valides : |
TraceMark |
| CodecName |
string |
Non |
H264 |
|
| ReferenceId |
string |
Non |
L'identifiant personnalisé. Seules les lettres minuscules, les lettres majuscules, les chiffres, les traits d'union et les traits de soulignement sont pris en charge. La longueur est de 6 à 64 caractères. L'identifiant est unique par utilisateur. |
123-123 |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
F552E596-967D-5500-842F-17E6364**** |
| VideoBase |
object |
Les informations de base sur le fichier audio ou vidéo. |
|
| CreationTime |
string |
L'heure de création du fichier audio ou vidéo. L'heure suit la norme ISO 8601 au format aaaa-MM-jjTHH:mm:ssZ. L'heure est affichée en UTC. |
2017-06-26T06:38:48Z |
| Status |
string |
L'état du fichier audio ou vidéo. Pour les valeurs valides et les descriptions, reportez-vous à la section Status : état audio et vidéo. |
Normal |
| VideoId |
string |
L'identifiant audio ou vidéo. |
93ab850b4f654b6e91d24d81d44**** |
| CoverURL |
string |
L'URL de la miniature du fichier audio ou vidéo. |
http://example.aliyundoc.com/sample.jpg?auth_key=2333232-atb**** |
| Duration |
string |
La durée du fichier audio ou vidéo. Unité : secondes. |
3.1667 |
| Title |
string |
Le titre du fichier audio ou vidéo. |
Alibaba Cloud VOD |
| MediaType |
string |
Le type de fichier multimédia. Valeurs valides : |
video |
| DanMuURL |
string |
L'URL des données de masque d'écran de commentaires accessibles depuis la Chine. |
http://example.aliyundoc.com/****?auth_key=abdf2123-6783232**** |
| StorageClass |
string |
La classe de stockage de la ressource multimédia. Valeurs valides : |
Standard |
| PlayInfoList |
object |
||
| PlayInfo |
array<object> |
Les informations de lecture (informations de flux) du fichier audio ou vidéo. |
|
|
object |
Les informations détaillées sur le fichier audio ou vidéo. |
||
| CreationTime |
string |
The time when the stream was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2022-04-18T07:37:15Z |
| Status |
string |
The status of the media stream. Valid values:
|
Normal |
| Specification |
string |
The output specification of the audio or video transcoding. For valid values and descriptions, refer to Output specification: Specification. |
H264.LD |
| NarrowBandType |
string |
The transcoding type. Valid values:
|
0 |
| Height |
integer |
The height of the media stream. Unit: px. |
640 |
| Bitrate |
string |
The bitrate of the media stream. Unit: Kbps. Remarque
Due to the dynamic slicing feature of M3U8, the bitrate calculation may have deviations. |
450.878 |
| ModificationTime |
string |
The time when the stream was last modified. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2022-04-20T06:32:19Z |
| WatermarkId |
string |
The ID of the watermark template associated with the current media stream. |
dgfn26457856**** |
| Encrypt |
integer |
Indicates whether the media stream is encrypted. Valid values:
|
1 |
| Definition |
string |
The definition of the video stream. Valid values:
|
LD |
| EncryptType |
string |
The encryption type of the media stream. Valid values:
Remarque
If the encryption type is AliyunVoDEncryption, only ApsaraVideo Player SDK can be used for playback. |
AliyunVoDEncryption |
| EncryptMode |
string |
The encryption mode of the media stream. Valid values:
Remarque
If the encryption mode is License, only ApsaraVideo Player SDK can be used for playback. |
License |
| StreamType |
string |
The type of the media stream. If the media stream is a video, the value is video. If the media stream is audio-only, the value is audio. |
video |
| JobId |
string |
The job ID of the media stream transcoding. This serves as the unique identifier of the media stream. |
80e9c6580e754a798c3c19c59b16**** |
| Size |
integer |
The size of the media stream. Unit: Byte. Remarque
Due to the dynamic slicing feature of M3U8, the media stream size calculation may have deviations. |
418112 |
| Width |
integer |
The width of the media stream. Unit: px. |
360 |
| Fps |
string |
The frame rate of the media stream. Unit: frames per second. |
25 |
| Duration |
string |
The duration of the media stream. Unit: seconds. |
9.0464 |
| PlayURL |
string |
The playback URL of the video stream. |
https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8 |
| Format |
string |
The format of the media stream.
|
m3u8 |
| HDRType |
string |
The HDR type of the media stream. Valid values:
|
HLG |
| BitDepth |
integer |
The color bit depth. The value is an integer. |
8 |
| JobType |
integer |
The digital watermarking type. Valid values:
|
2 |
| JobExt |
string |
The custom watermark information of the copyright watermark. This field is returned only when |
CopyrightMarkTest |
| CodecName |
string |
The codec type. Valid values:
|
H264 |
Exemples
JSON format
{
"RequestId": "F552E596-967D-5500-842F-17E6364****",
"VideoBase": {
"CreationTime": "2017-06-26T06:38:48Z",
"Status": "Normal",
"VideoId": "93ab850b4f654b6e91d24d81d44****",
"CoverURL": "http://example.aliyundoc.com/sample.jpg?auth_key=2333232-atb****",
"Duration": "3.1667",
"Title": "Alibaba Cloud VOD",
"MediaType": "video",
"DanMuURL": "http://example.aliyundoc.com/****?auth_key=abdf2123-6783232****",
"StorageClass": "Standard"
},
"PlayInfoList": {
"PlayInfo": [
{
"CreationTime": "2022-04-18T07:37:15Z",
"Status": "Normal",
"Specification": "H264.LD",
"NarrowBandType": "0",
"Height": 640,
"Bitrate": "450.878",
"ModificationTime": "2022-04-20T06:32:19Z",
"WatermarkId": "dgfn26457856****",
"Encrypt": 1,
"Definition": "LD",
"EncryptType": "AliyunVoDEncryption",
"EncryptMode": "License",
"StreamType": "video",
"JobId": "80e9c6580e754a798c3c19c59b16****",
"Size": 418112,
"Width": 360,
"Fps": "25",
"Duration": "9.0464",
"PlayURL": "https://example.aliyundoc.com/d52ee123f331466aabf6ab32a93d****/a777f9e24e6e47a2a942467d5c38ea37-8ee8e04293c6657fdda282bc422704****.m3u8",
"Format": "m3u8",
"HDRType": "HLG",
"BitDepth": 8,
"JobType": 2,
"JobExt": "CopyrightMarkTest",
"CodecName": "H264"
}
]
}
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.