1MP4(3)                      MP4 File Format Library                     MP4(3)
2
3
4

NAME

6       MP4AddVideoTrack - Add a video track
7

SYNTAX

9       #include <mp4.h>
10
11       MP4TrackId MP4AddVideoTrack(
12            MP4FileHandle hFile,
13            u_int32_t timeScale,
14            u_int32_t sampleDuration,
15            u_int16_t width,
16            u_int16_t height,
17            u_int8_t videoType = MP4_MPEG4_VIDEO_TYPE
18       )
19

ARGUMENTS

21       hFile  Specifies the mp4 file to which the operation applies.
22
23       timeScale
24              Specifies the time scale in ticks per second of the track.
25
26       sampleDuration
27              Specifies a fixed sample duration for all track samples. Caveat:
28              The value should be in track time scale units
29
30       width  Specifies the video frame width in pixels.
31
32       height Specifies the video frame height in pixels.
33
34       videoType
35              Specifies the video encoding  type.  See  MP4GetTrackVideoType()
36              for known values.
37

RETURN VALUES

39       Upon   success,  the  track  id  of  the  new  track.  Upon  an  error,
40       MP4_INVALID_TRACK_ID.
41
42

DESCRIPTION

44       MP4AddVideoTrack adds a video track to the mp4  file.  MP4WriteSample()
45       can then be used to add the desired video samples.
46
47       It is recommended that the time scale be set to 90000 so as to preserve
48       the timing information accurately for the range of  video  frame  rates
49       commonly in use.
50
51       If the video frame rate is to be fixed then the sampleDuration argument
52       should be give the appropriate fixed value. If the video frame rate  is
53       to  be  variable  then  the value MP4_INVALID_SAMPLE_DURATION should be
54       given for the sampleDuration argument.
55
56
57

SEE ALSO

59       MP4(3)
60
61
62
63Cisco Systems Inc.                Version 0.9                           MP4(3)
Impressum