Metadati di inputInput Metadata

Un processo di codifica è associato uno (o più) asset di input in cui si desidera eseguire alcune attività di codifica.An encoding job is associated with an input asset (or assets) on which you want to perform some encoding tasks. Al termine di un'attività, viene generato un asset di output.Upon completion of a task, an output asset is produced. L'asset di output contiene video, audio, anteprime, manifest e così via. L'asset di output include anche un file contenente i metadati dell'asset di input.The output asset contains video, audio, thumbnails, manifest, etc. The output asset also contains a file with metadata about the input asset. Il nome del file XML dei metadati ha il seguente formato: <asset_id>_metadata.xml (ad esempio, 41114ad3-eb5e-4c57-8d92-5354e2b7d4a4_metadata.xml), dove <asset_id> è il valore AssetId dell'asset di input.The name of the metadata XML file has the following format: <asset_id>_metadata.xml (for example, 41114ad3-eb5e-4c57-8d92-5354e2b7d4a4_metadata.xml), where <asset_id> is the AssetId value of the input asset.

Se si desidera esaminare il file di metadati, è possibile creare un localizzatore SAS e scaricare il file nel computer locale.If you want to examine the metadata file, you can create a SAS locator and download the file to your local computer. È possibile trovare un esempio su come creare un localizzatore SAS e scaricare un file tramite le estensioni dell'SDK .NET di Servizi multimediali.You can find an example on how to create a SAS locator and download a file Using the Media Services .NET SDK Extensions.

In questo argomento vengono descritti gli elementi e i tipi di schema XML su cui si basato i metadati di input (<asset_id>_metadata.xml).This topic discusses the elements and types of the XML schema on which the input metada (<asset_id>_metadata.xml) is based. Per informazioni sul file contenente i metadati sull'asset di output, vedere Output Metadata (Metadati di output).For information about the file that contains metadata about the output asset, see Output Metadata.

Nota

Il codice schema completo e un esempio di codice XML sono disponibili alla fine di questo argomento.You can find the Schema Code an XML example at the end of this topic.

Elemento radice AssetFileAssetFiles element (root element)

Contiene una raccolta di elementi AssetFile per il processo di codifica.Contains a collection of AssetFile elements for the encoding job.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

NomeName DescrizioneDescription
AssetFileAssetFile

minOccurs="1" maxOccurs="unbounded"minOccurs="1" maxOccurs="unbounded"
Un singolo elemento figlio.A single child element. Per altre informazioni, vedere Elemento AssetFile.For more information, see AssetFile element.

Elemento AssetFileAssetFile element

Contiene gli attributi e gli elementi che descrivono un file di asset.Contains attributes and elements that describe an asset file.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

AttributiAttributes

NomeName TipoType DescrizioneDescription
NomeName

ObbligatorioRequired
xs:stringxs:string Nome del file di assetAsset file name.
DimensioneSize

ObbligatorioRequired
xs:longxs:long Dimensioni del file di asset in byte.Size of the asset file in bytes.
DurationDuration

ObbligatorioRequired
xs:durationxs:duration Durata della riproduzione del contenuto.Content play back duration. Esempio: Duration="PT25M37.757S".Example: Duration="PT25M37.757S".
NumberOfStreamsNumberOfStreams

ObbligatorioRequired
xs:intxs:int Numero di flussi nel file di asset.Number of streams in the asset file.
FormatNamesFormatNames

ObbligatorioRequired
xs:stringxs:string Nomi del formato.Format names.
FormatVerboseNamesFormatVerboseNames

ObbligatorioRequired
xs:stringxs:string Nomi dettagliati del formato.Format verbose names.
StartTimeStartTime xs:durationxs:duration Ora di inizio del contenuto.Content start time. Esempio: StartTime="PT2.669S".Example: StartTime="PT2.669S".
OverallBitRateOverallBitRate xs:intxs:int Media della velocità in bit del file di asset, espressa in kbps.Average bitrate of the asset file in kbps.

Nota

I seguenti 4 elementi figlio devono comparire in una sequenza.The following 4 child elements must appear in a sequence.

Elementi figlioChild elements

NomeName TipoType DescrizioneDescription
ProgramsPrograms

minOccurs="0"minOccurs="0"
Raccolta di tutti gli Elementi Programs quando il file di asset è in formato MPEG-TS.Collection of all Programs element when the asset file is in MPEG-TS format.
VideoTracksVideoTracks

minOccurs="0"minOccurs="0"
Ogni file di asset fisico può contenere da zero a più tracce video con interfoliazione in un formato contenitore appropriato.Each physical asset file can contain zero or more video tracks interleaved into an appropriate container format. Questo elemento contiene una raccolta di tutti gli elementi VideoTrack che fanno parte del file di asset.This element contains a collection of all VideoTracks element that are part of the asset file.
AudioTrackAudioTracks

minOccurs="0"minOccurs="0"
Ogni file di asset fisico può contenere da zero a più tracce audio con interfoliazione in un formato contenitore appropriato.Each physical asset file can contain zero or more audio tracks interleaved into an appropriate container format. Questo elemento contiene una raccolta di tutti gli elementi AudioTrack che fanno parte del file di asset.This element contains a collection of all AudioTracks element that are part of the asset file.
MetadataMetadata

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
MetadataTypeMetadataType Metadati del file di asset rappresentati come stringhe chiave-valore.Asset file’s metadata represented as key\value strings. ad esempio:For example:

<Metadata key="language" value="eng" /><Metadata key="language" value="eng" />

TrackTypeTrackType

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

AttributiAttributes

NomeName TipoType DescrizioneDescription
IdId

ObbligatorioRequired
xs:intxs:int Indice in base zero della traccia audio o video.Zero-based index of this audio or video track.

Non corrisponde necessariamente al TrackID usato in un file MP4.This is not necessarily that the TrackID as used in an MP4 file.
CodecCodec xs:stringxs:string Stringa del codec della traccia video.Video track codec string.
CodecLongNameCodecLongName xs:stringxs:string Nome lungo del codec della traccia audio o video.Audio or video track codec long name.
TimeBaseTimeBase

ObbligatorioRequired
xs:stringxs:string Tempo base.Time base. Esempio: TimeBase="1/48000"Example: TimeBase="1/48000"
NumberOfFramesNumberOfFrames xs:intxs:int Numero di frame (presenti per le tracce video).Number of frames (present for video tracks).
StartTimeStartTime xs:durationxs:duration Ora di inizio della traccia.Track start time. Esempio: StartTime="PT2.669S"Example: StartTime="PT2.669S"
DurationDuration xs:durationxs:duration Durata della traccia.Track duration. Esempio: Duration="PTSampleFormat M37.757S".Example: Duration="PTSampleFormat M37.757S".

Nota

I seguenti 2 elementi figlio devono comparire in una sequenza.The following 2 child elements must appear in a sequence.

Elementi figlioChild elements

NomeName TipoType DescrizioneDescription
DispositionDisposition

minOccurs="0" maxOccurs="1"minOccurs="0" maxOccurs="1"
StreamDispositionTypeStreamDispositionType Contiene informazioni di presentazione (ad esempio, se una determinata traccia audio è per utenti con problemi di vista).Contains presentation information (for example, whether a particular audio track is for visually impaired viewers).
MetadataMetadata

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
MetadataTypeMetadataType Stringhe chiave-valore generiche che possono essere usate per contenere una varietà di informazioni.Generic key/value strings that can be used to hold a variety of information. Esempio, key="language" e value="eng".For example, key=”language”, and value=”eng”.

AudioTrackType (eredita da TrackType)AudioTrackType (inherits from TrackType)

AudioTrackType è un tipo globale complesso che eredita da TrackType.AudioTrackType is a global complex type that inherits from TrackType.

Il tipo rappresenta una specifica traccia audio nel file di asset.The type represents a specific audio track in the asset file.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

AttributiAttributes

NomeName TipoType DescrizioneDescription
SampleFormatSampleFormat xs:stringxs:string Formato del campione.Sample format.
ChannelLayoutChannelLayout xs:stringxs:string Layout del canale.Channel layout.
ChannelsChannels

ObbligatorioRequired
xs:intxs:int Numero di canali audio (da 0 in su).Number (0 or more) of audio channels.
SamplingRateSamplingRate

ObbligatorioRequired
xs:intxs:int Frequenza di campionamento dell'audio in campioni/sec o Hz.Audio sampling rate in samples/sec or Hz.
BitrateBitrate xs:intxs:int Velocità media in bit audio in bit al secondo, calcolata in base al file di asset.Average audio bit rate in bits per second, as calculated from the asset file. Viene contato solo il payload del flusso elementare, mentre l'overhead di creazione dei pacchetti è escluso dal conteggio.Only the elementary stream payload is counted, and the packaging overhead is not included in this count.
BitsPerSampleBitsPerSample xs:intxs:int Tipo di bit per campione per il formato wFormatTag.Bits per sample for the wFormatTag format type.

VideoTrackType (eredita da TrackType)VideoTrackType (inherits from TrackType)

AudioTrackType è un tipo globale complesso che eredita da TrackType.VideoTrackType is a global complex type that inherits from TrackType.

Il tipo rappresenta una specifica traccia video nel file di asset.The type represents a specific video track in the asset file.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

AttributiAttributes

NomeName TipoType DescrizioneDescription
FourCCFourCC

ObbligatorioRequired
xs:stringxs:string Codice FourCC del codec video.Video codec FourCC code.
ProfiloProfile xs:stringxs:string Profilo della traccia video.Video track's profile.
LevelLevel xs:stringxs:string Livello della traccia video.Video track's level.
PixelFormatPixelFormat xs:stringxs:string Formato pixel della traccia video.Video track's pixel format.
WidthWidth

ObbligatorioRequired
xs:intxs:int Larghezza del video codificata in pixel.Encoded video width in pixels.
HeightHeight

ObbligatorioRequired
xs:intxs:int Altezza del video codificata in pixel.Encoded video height in pixels.
DisplayAspectRatioNumeratorDisplayAspectRatioNumerator

ObbligatorioRequired
xs:doublexs:double Numeratore delle proporzioni della visualizzazione video.Video display aspect ratio numerator.
DisplayAspectRatioDenominatorDisplayAspectRatioDenominator

ObbligatorioRequired
xs:doublexs:double Denominatore delle proporzioni della visualizzazione video.Video display aspect ratio denominator.
DisplayAspectRatioDenominatorDisplayAspectRatioDenominator

ObbligatorioRequired
xs:doublexs:double Numeratore delle proporzioni del campione video.Video sample aspect ratio numerator.
SampleAspectRatioNumeratorSampleAspectRatioNumerator xs:doublexs:double Numeratore delle proporzioni del campione video.Video sample aspect ratio numerator.
SampleAspectRatioNumeratorSampleAspectRatioNumerator xs:doublexs:double Denominatore delle proporzioni del campione video.Video sample aspect ratio denominator.
FrameRateFrameRate

ObbligatorioRequired
xs: decimalxs:decimal Frequenza dei frame misurata in formato .3F.Measured video frame rate in .3f format.
BitrateBitrate xs:intxs:int Velocità media in bit video in kilobit al secondo, calcolata in base al file di asset.Average video bit rate in kilobits per second, as calculated from the asset file. Viene contato solo il payload del flusso elementare, mentre l'overhead di creazione dei pacchetti è escluso.Only the elementary stream payload is counted, and the packaging overhead is not included.
MaxGOPBitrateMaxGOPBitrate xs:intxs:int Velocità media in bit Max GOP per la traccia video, in kilobit al secondo.Max GOP average bitrate for this video track, in kilobits per second.
HasBFramesHasBFrames xs:intxs:int Numero di traccia video dei fotogrammi B.Video track number of B frames.

MetadataTypeMetadataType

MetadataType è un tipo globale complesso che descrive i metadati di un file di asset come stringhe chiave-valore.MetadataType is a global complex type that describes metadata of an asset file as key/value strings. Esempio, key="language" e value="eng".For example, key=”language”, and value=”eng”.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

AttributiAttributes

NomeName TipoType DescrizioneDescription
keykey

ObbligatorioRequired
xs:stringxs:string La chiave nella coppia chiave-valore.The key in the key/value pair.
valuevalue

ObbligatorioRequired
xs:stringxs:string Il valore nella coppia chiave-valore.The value in the key/value pair.

ProgramTypeProgramType

ProgramType è un tipo globale complesso che descrive un programma.ProgramType is a global complex type that describes a program.

AttributiAttributes

NomeName TipoType DescrizioneDescription
ProgramIdProgramId

ObbligatorioRequired
xs:intxs:int ID programmaProgram Id
NumberOfProgramsNumberOfPrograms

ObbligatorioRequired
xs:intxs:int Numero di programmi.Number of programs.
PmtPidPmtPid

ObbligatorioRequired
xs:intxs:int Tabelle di mappa dei programmi (PMT) che contengono informazioni sui programmi.Program Map Tables (PMTs) contain information about programs. Per altre informazioni, vedere PMT.For more information, see PMt.
PcrPidPcrPid

ObbligatorioRequired
xs:intxs:int Usato dal decodificatore.Used by decoder. Per altre informazioni, vedere PCR.For more information, see PCR
StartPTSStartPTS xs: longxs: long Timestamp di avvio della presentazione.Starting presentation time stamp.
EndPTSEndPTS xs: longxs: long Timestamp di fine della presentazione.Ending presentation time stamp.

StreamDispositionTypeStreamDispositionType

StreamDispositionType è un tipo globale complesso che descrive il flusso.StreamDispositionType is a global complex type that describes the stream.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

AttributiAttributes

NomeName TipoType DescrizioneDescription
DefaultDefault

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che si tratta della presentazione predefinita.Set this attribute to 1 to indicate this is the default presentation.
DubDub

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che si tratta della presentazione doppiata.Set this attribute to 1 to indicate this is the dubbed presentation.
OriginalOriginal

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che si tratta della presentazione originale.Set this attribute to 1 to indicate this is the original presentation.
CommentComment

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che questa traccia contiene commenti.Set this attribute to 1 to indicate this track contains commentary.
LyricsLyrics

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che questa traccia contiene testi.Set this attribute to 1 to indicate this track contains lyrics.
KaraokeKaraoke

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che si tratta della traccia karaoke (musica di sottofondo, senza cantato).Set this attribute to 1 to indicate this represents the karaoke track (background music, no vocals).
ForcedForced

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che si tratta della presentazione forzata.Set this attribute to 1 to indicate this is the forced presentation.
HearingImpairedHearingImpaired

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che questa traccia è destinata agli utenti con problemi di udito.Set this attribute to 1 to indicate this track is for the hearing impaired.
VisualImpairedVisualImpaired

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che questa traccia è destinata agli utenti con problemi di vista.Set this attribute to 1 to indicate this track is for the visually impaired.
CleanEffectsCleanEffects

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che questa traccia contiene effetti clean.Set this attribute to 1 to indicate this track has clean effects.
AttachedPicAttachedPic

ObbligatorioRequired
xs:intxs:int Impostare questo attributo su 1 per indicare che questa traccia contiene foto.Set this attribute to 1 to indicate this track has pictures.

Elemento ProgramsPrograms element

Elemento wrapper contenente più elementi Program.Wrapper element holding multiple Program elements.

Elementi figlioChild elements

NomeName TipoType DescrizioneDescription
ProgramProgram

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
ProgramTypeProgramType Per i file di asset in formato MPEG-TS, contiene informazioni sui programmi nel file di asset.For asset files that are in MPEG-TS format, contains information about programs in the asset file.

Elemento VideoTracksVideoTracks element

Elemento wrapper contenente più elementi VideoTrack.Wrapper element holding multiple VideoTrack elements.

Vedere un esempio di codice XML alla fine di questo argomento: esempio XML.See an XML example at the end of this topic: XML example.

Elementi figlioChild elements

NomeName TipoType DescrizioneDescription
VideoTrackVideoTrack

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
VideoTrackType (eredita da TrackType)VideoTrackType (inherits from TrackType) Contiene informazioni sulle tracce video presenti nel file di asset.Contains information about video tracks in the asset file.

Elemento AudioTracksAudioTracks element

Elemento wrapper contenente più elementi AudioTrack.Wrapper element holding multiple AudioTrack elements.

Vedere un esempio di codice XML alla fine di questo argomento: Esempio XML.See an XML example at the end of this topic: XML example.

Elementi figlioelements

NomeName TipoType DescrizioneDescription
AudioTrackAudioTrack

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
AudioTrackType (eredita da TrackType)AudioTrackType (inherits from TrackType) Contiene informazioni sulle tracce audio presenti nel file di asset.Contains information about audio tracks in the asset file.

Codice schemaSchema Code

<?xml version="1.0" encoding="utf-8"?>  
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.0"  
           xmlns="http://schemas.microsoft.com/windowsazure/mediaservices/2014/07/mediaencoder/inputmetadata"  
           targetNamespace="http://schemas.microsoft.com/windowsazure/mediaservices/2014/07/mediaencoder/inputmetadata"  
           elementFormDefault="qualified">  

  <xs:complexType name="MetadataType">  
    <xs:attribute name="key"   type="xs:string" use="required"/>  
    <xs:attribute name="value" type="xs:string" use="required"/>  
  </xs:complexType>  

  <xs:complexType name="ProgramType">  
    <xs:attribute name="ProgramId" type="xs:int" use="required">  
      <xs:annotation>  
        <xs:documentation>Program Id</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="NumberOfPrograms" type="xs:int" use="required">  
      <xs:annotation>  
        <xs:documentation>Number of programs</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="PmtPid" type="xs:int" use="required">  
      <xs:annotation>  
        <xs:documentation>pmt pid</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="PcrPid" type="xs:int" use="required">  
      <xs:annotation>  
        <xs:documentation>pcr pid</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="StartPTS" type="xs:long">  
      <xs:annotation>  
        <xs:documentation>start pts</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="EndPTS" type="xs:long">  
      <xs:annotation>  
        <xs:documentation>end pts</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
  </xs:complexType>  

  <xs:complexType name="StreamDispositionType">  
    <xs:attribute name="Default"          type="xs:int" use="required" />  
    <xs:attribute name="Dub"              type="xs:int" use="required" />  
    <xs:attribute name="Original"         type="xs:int" use="required" />  
    <xs:attribute name="Comment"          type="xs:int" use="required" />  
    <xs:attribute name="Lyrics"           type="xs:int" use="required" />  
    <xs:attribute name="Karaoke"          type="xs:int" use="required" />  
    <xs:attribute name="Forced"           type="xs:int" use="required" />  
    <xs:attribute name="HearingImpaired"  type="xs:int" use="required" />  
    <xs:attribute name="VisualImpaired"   type="xs:int" use="required" />  
    <xs:attribute name="CleanEffects"     type="xs:int" use="required" />  
    <xs:attribute name="AttachedPic"      type="xs:int" use="required" />  
  </xs:complexType>  

  <xs:complexType name="TrackType" abstract="true">  
    <xs:sequence>  
      <xs:element name="Disposition" type="StreamDispositionType" minOccurs="0" maxOccurs="1"/>  
      <xs:element name="Metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded"/>  
    </xs:sequence>  
    <xs:attribute name="Id" use="required">  
      <xs:annotation>  
        <xs:documentation>zero-based index of this video track. Note: this is not necessarily the TrackID as used in an MP4 file</xs:documentation>  
      </xs:annotation>  
      <xs:simpleType>  
        <xs:restriction base="xs:int">  
          <xs:minInclusive value="0"/>  
        </xs:restriction>  
      </xs:simpleType>  
    </xs:attribute>  
    <xs:attribute name="Codec" type="xs:string">  
      <xs:annotation>  
        <xs:documentation>video track codec string</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="CodecLongName" type="xs:string">  
      <xs:annotation>  
        <xs:documentation>video track codec long name</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="TimeBase"  type="xs:string" use="required">  
      <xs:annotation>  
        <xs:documentation>Time base. Example: TimeBase="1/48000"</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="NumberOfFrames">  
      <xs:annotation>  
        <xs:documentation>number of frames</xs:documentation>  
      </xs:annotation>  
      <xs:simpleType>  
        <xs:restriction base="xs:int">  
          <xs:minInclusive value="0"/>  
        </xs:restriction>  
      </xs:simpleType>  
    </xs:attribute>  
    <xs:attribute name="StartTime" type="xs:duration">  
      <xs:annotation>  
        <xs:documentation>Track start time. Example: StartTime="PT2.669S"</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
    <xs:attribute name="Duration" type="xs:duration">  
      <xs:annotation>  
        <xs:documentation>Track duration. Example: Duration="PT25M37.757S"</xs:documentation>  
      </xs:annotation>  
    </xs:attribute>  
  </xs:complexType>  

  <xs:complexType name="VideoTrackType">  
    <xs:annotation>  
      <xs:documentation>A specific video track in the parent AssetFile</xs:documentation>  
    </xs:annotation>  
    <xs:complexContent>  
      <xs:extension base="TrackType">  
        <xs:attribute name="FourCC" type="xs:string" use="required">  
          <xs:annotation>  
            <xs:documentation>video codec FourCC code</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
        <xs:attribute name="Profile" type="xs:string">  
          <xs:annotation>  
            <xs:documentation>profile</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
        <xs:attribute name="Level" type="xs:string">  
          <xs:annotation>  
            <xs:documentation>level</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
        <xs:attribute name="PixelFormat" type="xs:string">  
          <xs:annotation>  
            <xs:documentation>Video track's pixel format</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
        <xs:attribute name="Width" use="required">  
          <xs:annotation>  
            <xs:documentation>encoded video width in pixels</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="Height" use="required">  
          <xs:annotation>  
            <xs:documentation>encoded video height in pixels</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="DisplayAspectRatioNumerator" use="required">  
          <xs:annotation>  
            <xs:documentation>video display aspect ratio numerator</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:double">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="DisplayAspectRatioDenominator" use="required">  
          <xs:annotation>  
            <xs:documentation>video display aspect ratio denominator</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:double">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="SampleAspectRatioNumerator">  
          <xs:annotation>  
            <xs:documentation>video sample aspect ratio numerator</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:double">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="SampleAspectRatioDenominator">  
          <xs:annotation>  
            <xs:documentation>video sample aspect ratio denominator</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:double">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="FrameRate" use="required">  
          <xs:annotation>  
            <xs:documentation>measured video frame rate in .3f format</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:decimal">  
              <xs:minInclusive value="0"/>  
              <xs:fractionDigits value="3"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="Bitrate">  
          <xs:annotation>  
            <xs:documentation>average video bit rate in kilobits per second, as calculated from the AssetFile. Counts only the elementary stream payload, and does not include the packaging overhead</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="MaxGOPBitrate">  
          <xs:annotation>  
            <xs:documentation>Max GOP average bitrate for this video track, in kilobits per second</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="HasBFrames" type="xs:int">  
          <xs:annotation>  
            <xs:documentation>video track number of B frames</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
      </xs:extension>  
    </xs:complexContent>  
  </xs:complexType>  

  <xs:complexType name="AudioTrackType">  
    <xs:annotation>  
      <xs:documentation>a specific audio track in the parent AssetFile</xs:documentation>  
    </xs:annotation>  
    <xs:complexContent>  
      <xs:extension base="TrackType">  
        <xs:attribute name="SampleFormat"  type="xs:string">  
          <xs:annotation>  
            <xs:documentation>sample format</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
        <xs:attribute name="ChannelLayout"  type="xs:string">  
          <xs:annotation>  
            <xs:documentation>channel layout</xs:documentation>  
          </xs:annotation>  
        </xs:attribute>  
        <xs:attribute name="Channels" use="required">  
          <xs:annotation>  
            <xs:documentation>number of audio channels</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="SamplingRate" use="required">  
          <xs:annotation>  
            <xs:documentation>audio sampling rate in samples/sec or Hz</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="Bitrate">  
          <xs:annotation>  
            <xs:documentation>average audio bit rate in bits per second, as calculated from the AssetFile. Counts only the elementary stream payload, and does not include the packaging overhead</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
        <xs:attribute name="BitsPerSample">  
          <xs:annotation>  
            <xs:documentation>Bits per sample for the wFormatTag format type</xs:documentation>  
          </xs:annotation>  
          <xs:simpleType>  
            <xs:restriction base="xs:int">  
              <xs:minInclusive value="0"/>  
            </xs:restriction>  
          </xs:simpleType>  
        </xs:attribute>  
      </xs:extension>  
    </xs:complexContent>  
  </xs:complexType>  

  <xs:element name="AssetFiles">  
    <xs:annotation>  
      <xs:documentation>Collection of AssetFile entries for the encoding job</xs:documentation>  
    </xs:annotation>  
    <xs:complexType>  
      <xs:sequence>  
        <xs:element name="AssetFile" minOccurs="1" maxOccurs="unbounded">  
          <xs:annotation>  
            <xs:documentation>asset file</xs:documentation>  
          </xs:annotation>  
          <xs:complexType>  
            <xs:sequence>  
              <xs:element name="Programs" minOccurs="0">  
                <xs:annotation>  
                  <xs:documentation>This is the collection of all programs when file is MPEG-TS</xs:documentation>  
                </xs:annotation>  
                <xs:complexType>  
                  <xs:sequence>  
                    <xs:element name="Program" type="ProgramType" minOccurs="0" maxOccurs="unbounded" />  
                  </xs:sequence>  
                </xs:complexType>  
              </xs:element>  
              <xs:element name="VideoTracks" minOccurs="0">  
                <xs:annotation>  
                  <xs:documentation>Each physical AssetFile can contain in it zero or more video tracks interleaved into an appropriate container format. This is the collection of all those video tracks</xs:documentation>  
                </xs:annotation>  
                <xs:complexType>  
                  <xs:sequence>  
                    <xs:element name="VideoTrack" type="VideoTrackType" minOccurs="0" maxOccurs="unbounded" />  
                  </xs:sequence>  
                </xs:complexType>  
              </xs:element>  
              <xs:element name="AudioTracks" minOccurs="0">  
                <xs:annotation>  
                  <xs:documentation>each physical AssetFile can contain in it zero or more audio tracks interleaved into an appropriate container format. This is the collection of all those audio tracks</xs:documentation>  
                </xs:annotation>  
                <xs:complexType>  
                  <xs:sequence>  
                    <xs:element name="AudioTrack" type="AudioTrackType" minOccurs="0" maxOccurs="unbounded" />  
                  </xs:sequence>  
                </xs:complexType>  
              </xs:element>  
              <xs:element name="Metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded" />  
            </xs:sequence>  
            <xs:attribute name="Name" type="xs:string" use="required">  
              <xs:annotation>  
                <xs:documentation>the media asset file name</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="Size" use="required">  
              <xs:annotation>  
                <xs:documentation>size of file in bytes</xs:documentation>  
              </xs:annotation>  
              <xs:simpleType>  
                <xs:restriction base="xs:long">  
                  <xs:minInclusive value="0"/>  
                </xs:restriction>  
              </xs:simpleType>  
            </xs:attribute>  
            <xs:attribute name="Duration" type="xs:duration" use="required">  
              <xs:annotation>  
                <xs:documentation>content play back duration. Example: Duration="PT25M37.757S"</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="NumberOfStreams" type="xs:int" use="required">  
              <xs:annotation>  
                <xs:documentation>number of streams in asset file</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="FormatNames" type="xs:string" use="required">  
              <xs:annotation>  
                <xs:documentation>format names</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="FormatVerboseName" type="xs:string" use="required">  
              <xs:annotation>  
                <xs:documentation>format verbose names</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="StartTime" type="xs:duration">  
              <xs:annotation>  
                <xs:documentation>content start time. Example: StartTime="PT2.669S"</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="OverallBitRate">  
              <xs:annotation>  
                <xs:documentation>average bitrate of the asset file in kbps</xs:documentation>  
              </xs:annotation>  
              <xs:simpleType>  
                <xs:restriction base="xs:int">  
                  <xs:minInclusive value="0"/>  
                </xs:restriction>  
              </xs:simpleType>  
            </xs:attribute>  
          </xs:complexType>  
        </xs:element>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
</xs:schema>  

Esempio XMLXML example

Di seguito è riportato un esempio di file di metadati di input.The following is an example of the Input metadata file.

<?xml version="1.0" encoding="utf-8"?>  
<AssetFiles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/windowsazure/mediaservices/2014/07/mediaencoder/inputmetadata">  
  <AssetFile Name="bear.mp4" Size="1973733" Duration="PT12.678S" NumberOfStreams="2" FormatNames="mov,mp4,m4a,3gp,3g2,mj2" FormatVerboseName="QuickTime / MOV" StartTime="PT0S" OverallBitRate="1245">  
    <VideoTracks>  
      <VideoTrack Id="1" Codec="h264" CodecLongName="H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10" TimeBase="1/29970" NumberOfFrames="375" StartTime="PT0.034S" Duration="PT12.645S" FourCC="avc1" Profile="High" Level="4.1" PixelFormat="yuv420p" Width="512" Height="384" DisplayAspectRatioNumerator="4" DisplayAspectRatioDenominator="3" SampleAspectRatioNumerator="1" SampleAspectRatioDenominator="1" FrameRate="29.656" Bitrate="1043" HasBFrames="1">  
        <Disposition Default="1" Dub="0" Original="0" Comment="0" Lyrics="0" Karaoke="0" Forced="0" HearingImpaired="0" VisualImpaired="0" CleanEffects="0" AttachedPic="0" />  
        <Metadata key="creation_time" value="2010-03-10 16:11:56" />  
        <Metadata key="language" value="eng" />  
        <Metadata key="handler_name" value="Mainconcept MP4 Video Media Handler" />  
      </VideoTrack>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="aac" CodecLongName="AAC (Advanced Audio Coding)" TimeBase="1/44100" NumberOfFrames="546" StartTime="PT0S" Duration="PT12.678S" SampleFormat="fltp" ChannelLayout="stereo" Channels="2" SamplingRate="44100" Bitrate="156" BitsPerSample="0">  
        <Disposition Default="1" Dub="0" Original="0" Comment="0" Lyrics="0" Karaoke="0" Forced="0" HearingImpaired="0" VisualImpaired="0" CleanEffects="0" AttachedPic="0" />  
        <Metadata key="creation_time" value="2010-03-10 16:11:56" />  
        <Metadata key="language" value="eng" />  
        <Metadata key="handler_name" value="Mainconcept MP4 Sound Media Handler" />  
      </AudioTrack>  
    </AudioTracks>  
    <Metadata key="major_brand" value="mp42" />  
    <Metadata key="minor_version" value="0" />  
    <Metadata key="compatible_brands" value="mp42mp41" />  
    <Metadata key="creation_time" value="2010-03-10 16:11:53" />  
    <Metadata key="comment" value="Courtesy of National Geographic.  Used by Permission." />  
  </AssetFile>  
</AssetFiles>  

Passaggi successiviNext steps

Altre informazioni sui percorsi di apprendimento di Servizi multimediali di Azure:Read about the Azure Media Services learning paths:

Fornire commenti e suggerimentiProvide feedback

Usare il forum di suggerimenti degli utenti per fornire commenti e suggerimenti su come migliorare Servizi multimediali di Azure.Use the User Voice forum to provide feedback and make suggestions on how to improve Azure Media Services. È anche possibile passare direttamente a una delle categorie seguenti:You also can go directly to one of the following categories: