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
1136bd36
Commit
1136bd36
authored
Aug 14, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avtools: add -h demuxer/muxer
parent
a3ad68d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
cmdutils.c
cmdutils.c
+55
-0
avtools-common-opts.texi
doc/avtools-common-opts.texi
+9
-0
No files found.
cmdutils.c
View file @
1136bd36
...
...
@@ -936,6 +936,57 @@ static void show_help_codec(const char *name, int encoder)
}
}
static
void
show_help_demuxer
(
const
char
*
name
)
{
const
AVInputFormat
*
fmt
=
av_find_input_format
(
name
);
if
(
!
fmt
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown format '%s'.
\n
"
,
name
);
return
;
}
printf
(
"Demuxer %s [%s]:
\n
"
,
fmt
->
name
,
fmt
->
long_name
);
if
(
fmt
->
extensions
)
printf
(
" Common extensions: %s.
\n
"
,
fmt
->
extensions
);
if
(
fmt
->
priv_class
)
show_help_children
(
fmt
->
priv_class
,
AV_OPT_FLAG_DECODING_PARAM
);
}
static
void
show_help_muxer
(
const
char
*
name
)
{
const
AVCodecDescriptor
*
desc
;
const
AVOutputFormat
*
fmt
=
av_guess_format
(
name
,
NULL
,
NULL
);
if
(
!
fmt
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown format '%s'.
\n
"
,
name
);
return
;
}
printf
(
"Muxer %s [%s]:
\n
"
,
fmt
->
name
,
fmt
->
long_name
);
if
(
fmt
->
extensions
)
printf
(
" Common extensions: %s.
\n
"
,
fmt
->
extensions
);
if
(
fmt
->
mime_type
)
printf
(
" Mime type: %s.
\n
"
,
fmt
->
mime_type
);
if
(
fmt
->
video_codec
!=
AV_CODEC_ID_NONE
&&
(
desc
=
avcodec_descriptor_get
(
fmt
->
video_codec
)))
{
printf
(
" Default video codec: %s.
\n
"
,
desc
->
name
);
}
if
(
fmt
->
audio_codec
!=
AV_CODEC_ID_NONE
&&
(
desc
=
avcodec_descriptor_get
(
fmt
->
audio_codec
)))
{
printf
(
" Default audio codec: %s.
\n
"
,
desc
->
name
);
}
if
(
fmt
->
subtitle_codec
!=
AV_CODEC_ID_NONE
&&
(
desc
=
avcodec_descriptor_get
(
fmt
->
subtitle_codec
)))
{
printf
(
" Default subtitle codec: %s.
\n
"
,
desc
->
name
);
}
if
(
fmt
->
priv_class
)
show_help_children
(
fmt
->
priv_class
,
AV_OPT_FLAG_ENCODING_PARAM
);
}
int
show_help
(
const
char
*
opt
,
const
char
*
arg
)
{
char
*
topic
,
*
par
;
...
...
@@ -952,6 +1003,10 @@ int show_help(const char *opt, const char *arg)
show_help_codec
(
par
,
0
);
}
else
if
(
!
strcmp
(
topic
,
"encoder"
))
{
show_help_codec
(
par
,
1
);
}
else
if
(
!
strcmp
(
topic
,
"demuxer"
))
{
show_help_demuxer
(
par
);
}
else
if
(
!
strcmp
(
topic
,
"muxer"
))
{
show_help_muxer
(
par
);
}
else
{
show_help_default
(
topic
,
par
);
}
...
...
doc/avtools-common-opts.texi
View file @
1136bd36
...
...
@@ -64,6 +64,15 @@ Print detailed information about the decoder named @var{decoder_name}. Use the
@item encoder=@var{encoder_name}
Print detailed information about the encoder named @var{encoder_name}. Use the
@option{-encoders} option to get a list of all encoders.
@item demuxer=@var{demuxer_name}
Print detailed information about the demuxer named @var{demuxer_name}. Use the
@option{-formats} option to get a list of all demuxers and muxers.
@item muxer=@var{muxer_name}
Print detailed information about the muxer named @var{muxer_name}. Use the
@option{-formats} option to get a list of all muxers and demuxers.
@end table
@item -version
...
...
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