MOV tref Box--trackreferencebox

Source: Internet
Author: User


tref Box can describe the relationship between two track.

For example: Three video track,id in a MP4 file are 2, 3, 4, and three audio track,id are 6, 7, 8 respectively.

When playing track 2 video, you should use 6, 7, 8 which audio to play with. This is the time to specify in track 2 and 6 in the Tref box to bind 2 and 62.

In our common MP4 file, there is almost no such situation, where is the actual application scenario?

We know that iso-14496-12 is an underlying file format that derives not only mp4 files from this file format, but also many streaming video formats for online real-time delivery, such as ISMV files in Microsoft's smooth streaming solution.

Let's say we're a TV station, we're using Microsoft's smooth streaming technology to launch the program, and we've launched 13 programs, respectively, CCAV 1-13. This is when our server may have only one media stream available. This stream contains all 13 sets of programs, with at least 13 video tracks and 13 audio tracks. The user is watching the program using a similar set-top box hardware device, can decode and play, but must find each program corresponding video and audio (can not play Ccav 5 basketball game screen with the Ccav 13 of the common concern sound). This is the time to tref the relationship one by one between video and audio via box.

This is one of the practical scenarios of Tref box, some similar to the PAT,PMT in TS format. Another application is described in the official agreement, that is, the reference clock track, a simple understanding is that the audio and video here all refer to the same time code track, in order to synchronize audio and video playback, similar to the TS format of PCR and the track pts relationship.

Here's a look at the specific fields:

[CPP] view Plain copy aligned (8) class Trackreferencebox extends Box (' Tref ') {} aligned (8) class T    Rackreferencetypebox (unsigned int (+) reference_type) extends Box (reference_type) {unsigned int (+) track_ids[]; }

As implies, Tref box is used to list which track is referenced in this track resolution.

Each Trak box can contain only [0-1] tref box; (Typically, the MP4 file we see is not tref box)

Each tref box below can contain more than 1 tref type box;

The structure illustrated by the official Apple quote is as follows:


In Apple's agreement, Atom is another name for box, and the figure shows that Tref box contains multiple sub boxes, each of which needs to fill in the type and track ID.

The type is filled out in the following table (as defined by Apple):

Track reference types

Reference type

Description

' Tmcd '

Time code. Usually references a time code track.

' Chap '

Chapter or Scene list. Usually references a text track.

' Sync '

Synchronization. Usually between a video and sound track. Indicates that the tracks is synchronized. The reference can is from either-to-the-the-other, or there-May-be-references.

' Scpt '

Transcript. Usually references a text track.

' Ssrc '

Non-primary source. Indicates that the referenced track should send its data to this track, rather than presenting it. The referencing track would use the data to modify how it presents it data. See ' track Input Map Atoms ' for more information.

' Hint '

The referenced tracks contain the original media for this hint track.

ISO-14496-12 has re-organized these type fields in the following three ways:

• ' Hint ' the referenced track (s) contain the original media for this hint track
• ' CDSC ' This track describes the referenced.
• ' Hind ' this track depends on the referenced hint track, i.e., it should only be used if the referenced
Hint track is used.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.