Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
8f948b62
Commit
8f948b62
authored
Dec 10, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: Add basic support to mux multiple programs
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
676a93f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
0 deletions
+45
-0
ffmpeg.texi
doc/ffmpeg.texi
+5
-0
ffmpeg.h
ffmpeg.h
+2
-0
ffmpeg_opt.c
ffmpeg_opt.c
+38
-0
No files found.
doc/ffmpeg.texi
View file @
8f948b62
...
...
@@ -355,6 +355,11 @@ To set the language of the first audio stream:
ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
@end example
@item -program [title=@var
{
title
}
:]st=@var
{
stream
}
[:st=@var
{
stream
}
...] (@emph
{
output
}
)
Creates a program with the specified @var
{
title
}
and adds the specified
@var
{
stream
}
(s) to it.
@item -target @var
{
type
}
(@emph
{
output
}
)
Specify target file type (@code
{
vcd
}
, @code
{
svcd
}
, @code
{
dvd
}
, @code
{
dv
}
,
@code
{
dv50
}
). @var
{
type
}
may be prefixed with @code
{
pal-
}
, @code
{
ntsc-
}
or
...
...
ffmpeg.h
View file @
8f948b62
...
...
@@ -216,6 +216,8 @@ typedef struct OptionsContext {
int
nb_discard
;
SpecifierOpt
*
disposition
;
int
nb_disposition
;
SpecifierOpt
*
program
;
int
nb_program
;
}
OptionsContext
;
typedef
struct
InputFilter
{
...
...
ffmpeg_opt.c
View file @
8f948b62
...
...
@@ -2414,6 +2414,42 @@ loop_end:
}
}
/* process manually set programs */
for
(
i
=
0
;
i
<
o
->
nb_program
;
i
++
)
{
const
char
*
p
=
o
->
program
[
i
].
u
.
str
;
int
progid
=
i
+
1
;
AVProgram
*
program
=
av_new_program
(
oc
,
progid
);
while
(
*
p
)
{
const
char
*
p2
=
av_get_token
(
&
p
,
":"
);
char
*
key
;
if
(
!
p2
)
break
;
if
(
*
p
)
p
++
;
key
=
av_get_token
(
&
p2
,
"="
);
if
(
!
key
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"No '=' character in program string %s.
\n
"
,
p2
);
exit_program
(
1
);
}
if
(
!*
p2
)
exit_program
(
1
);
p2
++
;
if
(
!
strcmp
(
key
,
"title"
))
{
av_dict_set
(
&
program
->
metadata
,
"title"
,
p2
,
0
);
}
else
if
(
!
strcmp
(
key
,
"st"
))
{
int
st_num
=
strtol
(
p2
,
NULL
,
0
);
av_program_add_stream_index
(
oc
,
progid
,
st_num
);
}
else
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Unknown program key %s.
\n
"
,
key
);
exit_program
(
1
);
}
}
}
return
0
;
}
...
...
@@ -3093,6 +3129,8 @@ const OptionDef options[] = {
"set the recording timestamp ('now' to set the current time)"
,
"time"
},
{
"metadata"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
metadata
)
},
"add metadata"
,
"string=string"
},
{
"program"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
program
)
},
"add program with specified streams"
,
"title=string:st=number..."
},
{
"dframes"
,
HAS_ARG
|
OPT_PERFILE
|
OPT_EXPERT
|
OPT_OUTPUT
,
{
.
func_arg
=
opt_data_frames
},
"set the number of data frames to output"
,
"number"
},
...
...
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