55 {
"movflags",
"MOV muxer flags", offsetof(
MOVMuxContext,
flags),
AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX,
AV_OPT_FLAG_ENCODING_PARAM,
"movflags" },
57 {
"moov_size",
"maximum moov size so it can be placed at the begin", offsetof(
MOVMuxContext, reserved_moov_size),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX,
AV_OPT_FLAG_ENCODING_PARAM, 0 },
84 #define MOV_CLASS(flavor)\
85 static const AVClass flavor ## _muxer_class = {\
86 .class_name = #flavor " muxer",\
87 .item_name = av_default_item_name,\
89 .version = LIBAVUTIL_VERSION_INT,\
136 for (i = 0; i < track->
entry; i++) {
151 int i, j, entries = 0, tst = -1, oldtst = -1;
158 for (i = 0; i < track->
entry; i++) {
160 if (oldtst != -1 && tst != oldtst)
165 if (equalChunks && track->
entry) {
167 sSize =
FFMAX(1, sSize);
173 for (i = 0; i < track->
entry; i++) {
186 int index = 0, oldval = -1, i;
187 int64_t entryPos, curpos;
195 for (i = 0; i < track->
entry; i++) {
215 int64_t curpos, entryPos;
223 for (i = 0; i < track->
entry; i++) {
255 int fscod, bsid, bsmod, acmod, lfeon, frmsizecod;
272 if ((acmod & 1) && acmod != 1)
385 while (cumul_size != pkt->
size) {
531 avio_w8(pb, (size >> (7 * i)) | 0x80);
541 for (i = 0; i < track->
entry; i++)
549 int decoder_specific_info_len = track->
vos_len ? 5 + track->
vos_len : 0;
550 unsigned avg_bitrate;
557 put_descr(pb, 0x03, 3 + 5+13 + decoder_specific_info_len + 5+1);
562 put_descr(pb, 0x04, 13 + decoder_specific_info_len);
641 uint32_t layout_tag, bitmap;
649 "lack of channel information\n");
714 int unescaped_size, seq_found = 0;
715 int level = 0, interlace = 0;
725 packet_seq = packet_entry = 1;
732 for (next = start; next <
end; start = next) {
736 size = next - start - 4;
849 if (cluster_idx >= track->
entry)
852 if (cluster_idx + 1 == track->
entry)
855 next_dts = track->
cluster[cluster_idx + 1].
dts;
867 int i, first_duration;
879 for (i = 1; i < track->
entry; i++) {
883 return first_duration;
890 uint32_t
tag = track->
tag;
977 else if (track->
tag ==
MKTAG(
'm',
'p',
'4',
'a'))
1074 for (i = 0; i < 10; i++)
1120 (tag ==
MKTAG(
't',
'x',
'3',
'g') ||
1121 tag ==
MKTAG(
't',
'e',
'x',
't'))))
1128 "Quicktime/Ipod might not play the file\n");
1140 else tag =
MKTAG(
'd',
'v',
'c',
' ');
1143 else tag =
MKTAG(
'd',
'v',
'p',
'p');
1146 else tag =
MKTAG(
'd',
'v',
'h',
'p');
1147 }
else if (track->
enc->
height == 1080) {
1149 else tag =
MKTAG(
'd',
'v',
'h',
'6');
1179 tag =
MKTAG(
'm',
'2',
'v',
'1');
1184 if (rate == 24) tag =
MKTAG(
'x',
'd',
'v',
'4');
1185 else if (rate == 25) tag =
MKTAG(
'x',
'd',
'v',
'5');
1186 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'v',
'1');
1187 else if (rate == 50) tag =
MKTAG(
'x',
'd',
'v',
'a');
1188 else if (rate == 60) tag =
MKTAG(
'x',
'd',
'v',
'9');
1192 if (rate == 24) tag =
MKTAG(
'x',
'd',
'v',
'6');
1193 else if (rate == 25) tag =
MKTAG(
'x',
'd',
'v',
'7');
1194 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'v',
'8');
1196 if (rate == 25) tag =
MKTAG(
'x',
'd',
'v',
'3');
1197 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'v',
'2');
1201 if (rate == 24) tag =
MKTAG(
'x',
'd',
'v',
'd');
1202 else if (rate == 25) tag =
MKTAG(
'x',
'd',
'v',
'e');
1203 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'v',
'f');
1205 if (rate == 25) tag =
MKTAG(
'x',
'd',
'v',
'c');
1206 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'v',
'b');
1212 if (rate == 24) tag =
MKTAG(
'x',
'd',
'5',
'4');
1213 else if (rate == 25) tag =
MKTAG(
'x',
'd',
'5',
'5');
1214 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'5',
'1');
1215 else if (rate == 50) tag =
MKTAG(
'x',
'd',
'5',
'a');
1216 else if (rate == 60) tag =
MKTAG(
'x',
'd',
'5',
'9');
1220 if (rate == 24) tag =
MKTAG(
'x',
'd',
'5',
'd');
1221 else if (rate == 25) tag =
MKTAG(
'x',
'd',
'5',
'e');
1222 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'5',
'f');
1224 if (rate == 25) tag =
MKTAG(
'x',
'd',
'5',
'c');
1225 else if (rate == 30) tag =
MKTAG(
'x',
'd',
'5',
'b');
1241 tag =
MKTAG(
'a',
'v',
'c',
'i');
1246 if (rate == 24) tag =
MKTAG(
'a',
'i',
'5',
'p');
1247 else if (rate == 25) tag =
MKTAG(
'a',
'i',
'5',
'q');
1248 else if (rate == 30) tag =
MKTAG(
'a',
'i',
'5',
'p');
1249 else if (rate == 50) tag =
MKTAG(
'a',
'i',
'5',
'q');
1250 else if (rate == 60) tag =
MKTAG(
'a',
'i',
'5',
'p');
1254 if (rate == 24) tag =
MKTAG(
'a',
'i',
'5',
'3');
1255 else if (rate == 25) tag =
MKTAG(
'a',
'i',
'5',
'2');
1256 else if (rate == 30) tag =
MKTAG(
'a',
'i',
'5',
'3');
1258 if (rate == 50) tag =
MKTAG(
'a',
'i',
'5',
'5');
1259 else if (rate == 60) tag =
MKTAG(
'a',
'i',
'5',
'6');
1265 if (rate == 24) tag =
MKTAG(
'a',
'i',
'1',
'p');
1266 else if (rate == 25) tag =
MKTAG(
'a',
'i',
'1',
'q');
1267 else if (rate == 30) tag =
MKTAG(
'a',
'i',
'1',
'p');
1268 else if (rate == 50) tag =
MKTAG(
'a',
'i',
'1',
'q');
1269 else if (rate == 60) tag =
MKTAG(
'a',
'i',
'1',
'p');
1273 if (rate == 24) tag =
MKTAG(
'a',
'i',
'1',
'3');
1274 else if (rate == 25) tag =
MKTAG(
'a',
'i',
'1',
'2');
1275 else if (rate == 30) tag =
MKTAG(
'a',
'i',
'1',
'3');
1277 if (rate == 25) tag =
MKTAG(
'a',
'i',
'1',
'5');
1278 else if (rate == 50) tag =
MKTAG(
'a',
'i',
'1',
'5');
1279 else if (rate == 60) tag =
MKTAG(
'a',
'i',
'1',
'6');
1283 tag =
MKTAG(
'a',
'i',
'v',
'x');
1290 static const struct {
1329 if (tag ==
MKTAG(
'r',
'a',
'w',
' ') &&
1332 av_log(s,
AV_LOG_ERROR,
"%s rawvideo cannot be written to mov, output file will be unreadable\n",
1362 "the file may be unplayable!\n");
1369 tag =
MKTAG(
'm',
's', ((ms_tag >> 8) & 0xff), (ms_tag & 0xff));
1371 "the file may be unplayable!\n");
1410 tag =
MKTAG(
'w',
'm',
'a',
' ');
1440 0x0000, 0x0100, 0x0201, 0x0206, 0x0209, 0x020e
1445 unsigned mov_field_order = 0;
1503 }
else if(track->
enc->
width == 1440) {
1510 av_strlcatf(compressor_name, len,
"%d", rate * (interlaced + 1));
1517 char compressor_name[32] = { 0 };
1550 avio_w8(pb, strlen(compressor_name));
1558 if (track->
tag ==
MKTAG(
'm',
'p',
'4',
'v'))
1580 }
else if (track->
vos_len > 0)
1619 uint64_t str_size =strlen(reel_name);
1622 if (str_size >= UINT16_MAX){
1644 if (nb_frames > 255) {
1702 uint32_t entries = 0;
1707 ctts_entries[0].
count = 1;
1709 for (i = 1; i < track->
entry; i++) {
1711 ctts_entries[entries].
count++;
1715 ctts_entries[entries].
count = 1;
1719 atom_size = 16 + (entries * 8);
1724 for (i = 0; i < entries; i++) {
1736 uint32_t entries = -1;
1741 stts_entries =
av_malloc(
sizeof(*stts_entries));
1746 stts_entries = track->
entry ?
1749 for (i = 0; i < track->
entry; i++) {
1751 if (i && duration == stts_entries[entries].duration) {
1752 stts_entries[entries].
count++;
1756 stts_entries[entries].
count = 1;
1761 atom_size = 16 + (entries * 8);
1766 for (i = 0; i < entries; i++) {
1831 const char *font =
"Lucida Grande";
1871 if (track->
tag !=
MKTAG(
'c',
'6',
'0',
'8')) {
1917 return track->
tag ==
MKTAG(
'c',
'7',
'0',
'8') ||
1918 track->
tag ==
MKTAG(
'c',
'6',
'0',
'8');
1923 const char *hdlr, *descr = NULL, *hdlr_type = NULL;
1928 descr =
"DataHandler";
1931 hdlr = (track->
mode ==
MODE_MOV) ?
"mhlr" :
"\0\0\0\0";
1934 descr =
"VideoHandler";
1937 descr =
"SoundHandler";
1941 descr =
"ClosedCaptionHandler";
1943 if (track->
tag ==
MKTAG(
't',
'x',
'3',
'g')) {
1945 }
else if (track->
tag ==
MKTAG(
'm',
'p',
'4',
's')) {
1950 descr =
"SubtitleHandler";
1954 descr =
"HintHandler";
1957 descr =
"TimeCodeHandler";
1964 "Unknown hldr_type for %s / 0x%04X, writing dummy values\n",
2024 }
else if (track->
tag ==
MKTAG(
'r',
't',
'p',
' ')) {
2026 }
else if (track->
tag ==
MKTAG(
't',
'm',
'c',
'd')) {
2057 (version == 1) ?
avio_wb64(pb, UINT64_C(0xffffffffffffffff)) :
avio_wb32(pb, 0xffffffff);
2058 else if (!track->
entry)
2067 "FATAL error, file duration too long for timebase, this file will not be\n"
2068 "playable with quicktime. Choose a different timebase or a different\n"
2069 "container format\n");
2092 int16_t d, int16_t tx, int16_t ty)
2110 int version = duration < INT32_MAX ? 0 : 1;
2143 (version == 1) ?
avio_wb64(pb, UINT64_C(0xffffffffffffffff)) :
avio_wb32(pb, 0xffffffff);
2144 else if (!track->
entry)
2163 rotation = (rot && rot->
value) ? atoi(rot->
value) : 0;
2165 if (rotation == 90) {
2167 }
else if (rotation == 180) {
2169 }
else if (rotation == 270) {
2183 sample_aspect_ratio = 1;
2231 int version = duration < INT32_MAX ? 0 : 1;
2232 int entry_size, entry_count,
size;
2233 int64_t delay, start_ct = track->
cluster[0].
cts;
2236 version |= delay < INT32_MAX ? 0 : 1;
2238 entry_size = (version == 1) ? 20 : 12;
2239 entry_count = 1 + (delay > 0);
2240 size = 24 + entry_count * entry_size;
2329 char buf[1000] =
"";
2333 NULL, NULL, 0, 0, ctx);
2348 const char *
tag,
const char *str)
2404 "Not writing any edit list even though one would have been required\n");
2412 if (track->
tag ==
MKTAG(
'r',
't',
'p',
' '))
2431 int i, has_audio = 0, has_video = 0;
2441 if (audio_profile < 0)
2442 audio_profile = 0xFF - has_audio;
2443 if (video_profile < 0)
2444 video_profile = 0xFF - has_video;
2484 int max_track_id = 1, i;
2485 int64_t max_track_len_temp, max_track_len = 0;
2494 if (max_track_len < max_track_len_temp)
2495 max_track_len = max_track_len_temp;
2496 if (max_track_id < mov->tracks[i].track_id)
2501 version = max_track_len < UINT32_MAX ? 0 : 1;
2554 int size = 16 + strlen(data);
2567 return strlen(data) + 4;
2572 const char *
value,
int lang,
int long_style)
2575 if (value && value[0]) {
2586 const char *
name,
const char *
tag,
2589 int l, lang = 0,
len, len2;
2597 snprintf(tag2,
sizeof(tag2),
"%s-", tag);
2599 len2 = strlen(t2->
key);
2613 int size = 0, tmpo = t ? atoi(t->
value) : 0;
2632 disc ?
"disc" :
"track",
2634 int size = 0, track = t ? atoi(t->
value) : 0;
2637 char *slash = strchr(t->
value,
'/');
2639 tracks = atoi(slash + 1);
2656 const char *
name,
const char *
tag,
2663 if (len != 1 && len != 4)
2668 num = atoi(t->
value);
2736 const char *
name,
const char *key)
2744 len = strlen(t->
value);
2768 return (((str[0] - 0x60) & 0x1F) << 10) +
2769 (((str[1] - 0x60) & 0x1F) << 5) +
2770 (( str[2] - 0x60) & 0x1F);
2774 const char *
tag,
const char *str)
2783 if (!strcmp(tag,
"yrrc"))
2788 if (!strcmp(tag,
"albm") &&
2806 for (i = 0; i < nb_chapters; i++) {
2811 if ((t =
av_dict_get(
c->metadata,
"title", NULL, 0))) {
2812 int len =
FFMIN(strlen(t->value), 255);
2874 const char *str,
const char *lang,
int type)
2929 uint64_t chunkSize = chunk->
size;
2934 for (i = 1; i<trk->
entry; i++){
2942 chunkSize = chunk->
size;
3012 avio_printf(pb,
"<param name=\"%s\" value=\"%d\" valuetype=\"data\"/>\n", name, value);
3017 avio_printf(pb,
"<param name=\"%s\" value=\"%s\" valuetype=\"data\"/>\n", name, value);
3023 len =
FFMIN(
sizeof(buf) / 2 - 1, len);
3025 buf[2 *
len] =
'\0';
3026 avio_printf(pb,
"<param name=\"%s\" value=\"%s\" valuetype=\"data\"/>\n", name, buf);
3033 static const uint8_t uuid[] = {
3034 0xa5, 0xd4, 0x0b, 0x30, 0xe8, 0x14, 0x11, 0xdd,
3035 0xba, 0x2f, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66
3043 avio_printf(pb,
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
3044 avio_printf(pb,
"<smil xmlns=\"http://www.w3.org/2001/SMIL20/Language\">\n");
3047 avio_printf(pb,
"<meta name=\"creator\" content=\"%s\" />\n",
3057 int track_id = i + 1;
3066 avio_printf(pb,
"<%s systemBitrate=\"%d\">\n", type,
3126 MOVTrack *track, int64_t moof_offset)
3131 if (!track->
entry) {
3193 for (i = 0; i < track->
entry; i++) {
3222 for (i = 0; i < track->
entry; i++) {
3227 if (flags & MOV_TRUN_SAMPLE_FLAGS)
3240 static const uint8_t uuid[] = {
3241 0x6d, 0x1d, 0x9b, 0x05, 0x42, 0xd5, 0x44, 0xe6,
3242 0x80, 0xe2, 0x14, 0x1d, 0xaf, 0xf7, 0x57, 0xb2
3261 int size = 8 + 16 + 4 + 1 + 16*
n;
3262 static const uint8_t uuid[] = {
3263 0xd4, 0x80, 0x7e, 0xf2, 0xca, 0x39, 0x46, 0x95,
3264 0x8e, 0x54, 0x26, 0xcb, 0x9e, 0x46, 0xa7, 0x9f
3277 for (i = 0; i <
n; i++) {
3278 int index = entry + 1 + i;
3282 if (n < mov->ism_lookahead) {
3313 if ((tracks >= 0 && i != tracks) || !track->
entry)
3357 MOVTrack *track, int64_t moof_offset,
3381 for (i = 0; i <
size; i++)
3390 int tracks,
int moof_size)
3402 if (tracks >= 0 && i != tracks)
3413 MOVTrack *track,
int ref_size,
int total_sidx_size)
3415 int64_t pos =
avio_tell(pb), offset_pos, end_pos;
3417 int starts_with_SAP, i, entries;
3432 if (presentation_time < 0)
3433 presentation_time = 0;
3447 for (i = 0; i < entries; i++) {
3448 if (!track->
entry) {
3454 starts_with_SAP = 1;
3456 avio_wb32(pb, (0 << 31) | (ref_size & 0x7fffffff));
3458 avio_wb32(pb, (starts_with_SAP << 31) | (0 << 28) | 0);
3462 offset = pos + total_sidx_size - end_pos;
3470 int tracks,
int ref_size)
3475 for (round = 0; round < 2; round++) {
3488 if (tracks >= 0 && i != tracks)
3493 if (!track->
entry && ref_size > 0)
3590 int has_h264 = 0, has_video = 0;
3609 minor = has_h264 ? 0x100 : 0x200;
3612 minor = has_h264 ? 0x20000 : 0x10000;
3669 int audio_kbitrate = audio_codec->
bit_rate / 1000;
3670 int video_kbitrate =
FFMIN(video_codec->
bit_rate / 1000, 800 - audio_kbitrate);
3727 int i, closed_gop = 0;
3729 for (i = 0; i < pkt->
size - 4; i++) {
3730 c = (c << 8) + pkt->
data[i];
3732 closed_gop = pkt->
data[i + 4] >> 6 & 0x01;
3733 }
else if (c == 0x100) {
3734 int temp_ref = (pkt->
data[i + 1] << 2) | (pkt->
data[i + 2] >> 6);
3735 if (!temp_ref || closed_gop)
3748 int seq = 0, entry = 0;
3751 for (next = start; next <
end; start = next) {
3765 if (!trk->
entry && !fragment) {
3772 for (i = 0; i < trk->
entry; i++)
3805 int i, first_track = -1;
3806 int64_t mdat_size = 0;
3814 int buf_size, moov_size;
3858 if (first_track < 0)
3867 int buf_size, write_moof = 1, moof_tracks = -1;
3880 write_moof = i == first_track;
3917 unsigned int samples_in_chunk = 0;
3919 uint8_t *reformatted_data = NULL;
3923 if (duration < 0 || duration > INT_MAX) {
3924 av_log(s,
AV_LOG_ERROR,
"Application provided duration: %"PRId64
" / timestamp: %"PRId64
" is out of range for mov/mp4 format\n",
3955 static uint16_t packed_size[16] =
3956 {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};
3959 while (len < size && samples_in_chunk < 100) {
3960 len += packed_size[(pkt->
data[
len] >> 3) & 0x0F];
3963 if (samples_in_chunk > 1) {
3964 av_log(s,
AV_LOG_ERROR,
"fatal error, input is not a single packet, implement a AVParser for it\n");
3973 samples_in_chunk = 1;
3986 "use the audio bitstream filter 'aac_adtstoasc' to fix it "
3987 "('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
4085 "Track %d starts with a nonzero dts %"PRId64
". This "
4086 "currently isn't handled correctly in combination with "
4096 if (pkt->
dts != pkt->
pts)
4120 reformatted_data, size);
4134 int64_t frag_duration = 0;
4194 if (!pkt->
size)
return 0;
4223 if (ret < 0)
return ret;
4244 track->
tag =
MKTAG(
't',
'e',
'x',
't');
4252 uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, };
4255 memcpy(track->
enc->
extradata, chapter_properties,
sizeof(chapter_properties));
4310 if ((t =
av_dict_get(
c->metadata,
"title", NULL, 0))) {
4311 const char encd[12] = {
4312 0x00, 0x00, 0x00, 0x0C,
4314 0x00, 0x00, 0x01, 0x00 };
4315 len = strlen(t->value);
4322 memcpy(
pkt.
data +
len + 2, encd,
sizeof(encd));
4348 track->
tag =
MKTAG(
't',
'm',
'c',
'd');
4416 if (!enabled[i] && first[i] >= 0)
4454 r = (rgb >> 16) & 0xFF;
4455 g = (rgb >> 8) & 0xFF;
4458 y = av_clip_uint8( 16. + 0.257 * r + 0.504 * g + 0.098 * b);
4459 cb = av_clip_uint8(128. - 0.148 * r - 0.291 * g + 0.439 * b);
4460 cr = av_clip_uint8(128. + 0.439 * r - 0.368 * g - 0.071 * b);
4462 return (y << 16) | (cr << 8) | cb;
4469 int have_palette = 0, have_size = 0;
4473 while (cur && *cur) {
4474 if (strncmp(
"palette:", cur, 8) == 0) {
4476 count = sscanf(cur + 8,
4477 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
", "
4478 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
", "
4479 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
", "
4480 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
"",
4481 &palette[ 0], &palette[ 1], &palette[ 2], &palette[ 3],
4482 &palette[ 4], &palette[ 5], &palette[ 6], &palette[ 7],
4483 &palette[ 8], &palette[ 9], &palette[10], &palette[11],
4484 &palette[12], &palette[13], &palette[14], &palette[15]);
4486 for (i = 0; i <
count; i++) {
4490 }
else if (!strncmp(
"size:", cur, 5)) {
4491 sscanf(cur + 5,
"%dx%d", &width, &
height);
4494 if (have_palette && have_size)
4496 cur += strcspn(cur,
"\n\r");
4497 cur += strspn(cur,
"\n\r");
4503 for (i = 0; i < 16; i++) {
4519 int i,
ret, hint_track = 0, tmcd_track = 0;
4586 int video_streams_nb = 0, audio_streams_nb = 0, other_streams_nb = 0;
4597 if (video_streams_nb != 1 || audio_streams_nb != 1 || other_streams_nb) {
4637 "so timecode metadata are now ignored\n");
4666 "codec not currently supported in container\n",
4676 if (track->
tag ==
MKTAG(
'm',
'x',
'3',
'p') || track->
tag ==
MKTAG(
'm',
'x',
'3',
'n') ||
4677 track->
tag ==
MKTAG(
'm',
'x',
'4',
'p') || track->
tag ==
MKTAG(
'm',
'x',
'4',
'n') ||
4678 track->
tag ==
MKTAG(
'm',
'x',
'5',
'p') || track->
tag ==
MKTAG(
'm',
'x',
'5',
'n')) {
4684 track->
height = track->
tag >> 24 ==
'n' ? 486 : 576;
4700 "WARNING codec timebase is very high. If duration is too long,\n"
4701 "file may not be playable by quicktime. Specify a shorter timebase\n"
4702 "or choose different container.\n");
4779 trackj->
tag != track->
tag
4810 mov->
time += 0x7C25B080;
4897 int i, moov_size, moov_size2;
4913 if (moov_size2 != moov_size)
4937 int ret = 0, moov_size;
4941 int read_buf_id = 0;
4956 read_buf[1] = buf + moov_size;
4965 "the second pass (faststart)\n", s->
filename);
4978 #define READ_BLOCK do { \
4979 read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], moov_size); \
4988 n = read_size[read_buf_id];
4993 }
while (pos < pos_end);
5052 av_log(s,
AV_LOG_INFO,
"Starting second pass: moving the moov atom to the beginning of the file\n");
5063 av_log(s,
AV_LOG_ERROR,
"reserved_moov_size is too small, needed %"PRId64
" additional\n", 8-size);
5111 #if CONFIG_MOV_MUXER
5116 .extensions =
"mov",
5119 .video_codec = CONFIG_LIBX264_ENCODER ?
5128 .priv_class = &mov_muxer_class,
5131 #if CONFIG_TGP_MUXER
5136 .extensions =
"3gp",
5145 .priv_class = &tgp_muxer_class,
5148 #if CONFIG_MP4_MUXER
5153 .mime_type =
"application/mp4",
5154 .extensions =
"mp4",
5157 .video_codec = CONFIG_LIBX264_ENCODER ?
5164 .priv_class = &mp4_muxer_class,
5167 #if CONFIG_PSP_MUXER
5172 .extensions =
"mp4,psp",
5175 .video_codec = CONFIG_LIBX264_ENCODER ?
5182 .priv_class = &psp_muxer_class,
5185 #if CONFIG_TG2_MUXER
5190 .extensions =
"3g2",
5199 .priv_class = &tg2_muxer_class,
5202 #if CONFIG_IPOD_MUXER
5207 .mime_type =
"application/mp4",
5208 .extensions =
"m4v,m4a",
5217 .priv_class = &ipod_muxer_class,
5220 #if CONFIG_ISMV_MUXER
5225 .mime_type =
"application/mp4",
5226 .extensions =
"ismv,isma",
5235 .priv_class = &ismv_muxer_class,
5238 #if CONFIG_F4V_MUXER
5243 .mime_type =
"application/f4v",
5244 .extensions =
"f4v",
5253 .priv_class = &f4v_muxer_class,