Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
46aae846
Commit
46aae846
authored
Sep 26, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/movenc: Allow to disable writing the timecode track.
Fixes ticket #5492.
parent
fb37da37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
muxers.texi
doc/muxers.texi
+3
-0
movenc.c
libavformat/movenc.c
+4
-2
movenc.h
libavformat/movenc.h
+1
-0
No files found.
doc/muxers.texi
View file @
46aae846
...
@@ -884,6 +884,9 @@ the new default-base-is-moof flag instead. This flag is new from
...
@@ -884,6 +884,9 @@ the new default-base-is-moof flag instead. This flag is new from
14496-12:2012. This may make the fragments easier to parse in certain
14496-12:2012. This may make the fragments easier to parse in certain
circumstances (avoiding basing track fragment location calculations
circumstances (avoiding basing track fragment location calculations
on the implicit end of the previous track fragment).
on the implicit end of the previous track fragment).
@item -write_tmcd
Specify @code{on} to force writing a timecode track, @code{off} to disable it
and @code{auto} to write a timecode track only for mov and mp4 output (default).
@end table
@end table
@subsection Example
@subsection Example
...
...
libavformat/movenc.c
View file @
46aae846
...
@@ -90,6 +90,7 @@ static const AVOption options[] = {
...
@@ -90,6 +90,7 @@ static const AVOption options[] = {
{
"encryption_key"
,
"The media encryption key (hex)"
,
offsetof
(
MOVMuxContext
,
encryption_key
),
AV_OPT_TYPE_BINARY
,
.
flags
=
AV_OPT_FLAG_ENCODING_PARAM
},
{
"encryption_key"
,
"The media encryption key (hex)"
,
offsetof
(
MOVMuxContext
,
encryption_key
),
AV_OPT_TYPE_BINARY
,
.
flags
=
AV_OPT_FLAG_ENCODING_PARAM
},
{
"encryption_kid"
,
"The media encryption key identifier (hex)"
,
offsetof
(
MOVMuxContext
,
encryption_kid
),
AV_OPT_TYPE_BINARY
,
.
flags
=
AV_OPT_FLAG_ENCODING_PARAM
},
{
"encryption_kid"
,
"The media encryption key identifier (hex)"
,
offsetof
(
MOVMuxContext
,
encryption_kid
),
AV_OPT_TYPE_BINARY
,
.
flags
=
AV_OPT_FLAG_ENCODING_PARAM
},
{
"use_stream_ids_as_track_ids"
,
"use stream ids as track ids"
,
offsetof
(
MOVMuxContext
,
use_stream_ids_as_track_ids
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"use_stream_ids_as_track_ids"
,
"use stream ids as track ids"
,
offsetof
(
MOVMuxContext
,
use_stream_ids_as_track_ids
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"write_tmcd"
,
"force or disable writing tmcd"
,
offsetof
(
MOVMuxContext
,
write_tmcd
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
-
1
},
-
1
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
NULL
},
{
NULL
},
};
};
...
@@ -2312,7 +2313,7 @@ static int mov_write_minf_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext
...
@@ -2312,7 +2313,7 @@ static int mov_write_minf_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext
}
else
if
(
track
->
tag
==
MKTAG
(
'r'
,
't'
,
'p'
,
' '
))
{
}
else
if
(
track
->
tag
==
MKTAG
(
'r'
,
't'
,
'p'
,
' '
))
{
mov_write_hmhd_tag
(
pb
);
mov_write_hmhd_tag
(
pb
);
}
else
if
(
track
->
tag
==
MKTAG
(
't'
,
'm'
,
'c'
,
'd'
))
{
}
else
if
(
track
->
tag
==
MKTAG
(
't'
,
'm'
,
'c'
,
'd'
))
{
if
(
track
->
mode
==
MODE_MP4
)
if
(
track
->
mode
!=
MODE_MOV
)
mov_write_nmhd_tag
(
pb
);
mov_write_nmhd_tag
(
pb
);
else
else
mov_write_gmhd_tag
(
pb
,
track
);
mov_write_gmhd_tag
(
pb
,
track
);
...
@@ -5539,7 +5540,8 @@ static int mov_write_header(AVFormatContext *s)
...
@@ -5539,7 +5540,8 @@ static int mov_write_header(AVFormatContext *s)
}
}
}
}
if
(
mov
->
mode
==
MODE_MOV
||
mov
->
mode
==
MODE_MP4
)
{
if
(
mov
->
write_tmcd
==
-
1
&&
(
mov
->
mode
==
MODE_MOV
||
mov
->
mode
==
MODE_MP4
)
||
mov
->
write_tmcd
==
1
)
{
tmcd_track
=
mov
->
nb_streams
;
tmcd_track
=
mov
->
nb_streams
;
/* +1 tmcd track for each video stream with a timecode */
/* +1 tmcd track for each video stream with a timecode */
...
...
libavformat/movenc.h
View file @
46aae846
...
@@ -219,6 +219,7 @@ typedef struct MOVMuxContext {
...
@@ -219,6 +219,7 @@ typedef struct MOVMuxContext {
int
use_stream_ids_as_track_ids
;
int
use_stream_ids_as_track_ids
;
int
track_ids_ok
;
int
track_ids_ok
;
int
write_tmcd
;
}
MOVMuxContext
;
}
MOVMuxContext
;
#define FF_MOV_FLAG_RTP_HINT (1 << 0)
#define FF_MOV_FLAG_RTP_HINT (1 << 0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment