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
fccd8c21
Commit
fccd8c21
authored
Dec 31, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: add -guess_layout_max option.
parent
9648e149
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
ffmpeg.texi
doc/ffmpeg.texi
+6
-0
ffmpeg.c
ffmpeg.c
+2
-0
ffmpeg.h
ffmpeg.h
+3
-0
ffmpeg_opt.c
ffmpeg_opt.c
+4
-0
No files found.
doc/ffmpeg.texi
View file @
fccd8c21
...
...
@@ -611,6 +611,12 @@ This is an alias for @code{-filter:a}, see the @ref{filter_option,,-filter optio
Force audio tag/fourcc. This is an alias for @code
{
-tag:a
}
.
@item -absf @var
{
bitstream
_
filter
}
Deprecated, see -bsf
@item -guess
_
layout
_
max @var
{
channels
}
(@emph
{
input,per-stream
}
)
If some input channel layout is not known, try to guess only if it
corresponds to at most the specified number of channels. For example, 2
tells to @command
{
ffmpeg
}
to recognize 1 channel as mono and 2 channels as
stereo but not 6 channels as 5.1. The default is to always try to guess. Use
0 to disable all guessing.
@end table
@section Subtitle options:
...
...
ffmpeg.c
View file @
fccd8c21
...
...
@@ -1443,6 +1443,8 @@ int guess_input_channel_layout(InputStream *ist)
if
(
!
dec
->
channel_layout
)
{
char
layout_name
[
256
];
if
(
dec
->
channels
>
ist
->
guess_layout_max
)
return
0
;
dec
->
channel_layout
=
av_get_default_channel_layout
(
dec
->
channels
);
if
(
!
dec
->
channel_layout
)
return
0
;
...
...
ffmpeg.h
View file @
fccd8c21
...
...
@@ -171,6 +171,8 @@ typedef struct OptionsContext {
int
nb_pass
;
SpecifierOpt
*
passlogfiles
;
int
nb_passlogfiles
;
SpecifierOpt
*
guess_layout_max
;
int
nb_guess_layout_max
;
}
OptionsContext
;
typedef
struct
InputFilter
{
...
...
@@ -229,6 +231,7 @@ typedef struct InputStream {
AVDictionary
*
opts
;
AVRational
framerate
;
/* framerate forced with -r */
int
top_field_first
;
int
guess_layout_max
;
int
resample_height
;
int
resample_width
;
...
...
ffmpeg_opt.c
View file @
fccd8c21
...
...
@@ -616,6 +616,8 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
break
;
case
AVMEDIA_TYPE_AUDIO
:
ist
->
guess_layout_max
=
INT_MAX
;
MATCH_PER_STREAM_OPT
(
guess_layout_max
,
i
,
ist
->
guess_layout_max
,
ic
,
st
);
guess_input_channel_layout
(
ist
);
ist
->
resample_sample_fmt
=
dec
->
sample_fmt
;
...
...
@@ -2581,6 +2583,8 @@ const OptionDef options[] = {
"set channel layout"
,
"layout"
},
{
"af"
,
OPT_AUDIO
|
HAS_ARG
|
OPT_PERFILE
,
{
.
func_arg
=
opt_audio_filters
},
"set audio filters"
,
"filter_graph"
},
{
"guess_layout_max"
,
OPT_AUDIO
|
HAS_ARG
|
OPT_INT
|
OPT_SPEC
|
OPT_EXPERT
,
{
.
off
=
OFFSET
(
guess_layout_max
)
},
"set the maximum number of channels to try to guess the channel layout"
},
/* subtitle options */
{
"sn"
,
OPT_SUBTITLE
|
OPT_BOOL
|
OPT_OFFSET
,
{
.
off
=
OFFSET
(
subtitle_disable
)
},
...
...
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