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
c8a5365d
Commit
c8a5365d
authored
Nov 19, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: implement -sections option
parent
196765a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
Changelog
Changelog
+1
-0
ffprobe.texi
doc/ffprobe.texi
+8
-0
ffprobe.c
ffprobe.c
+30
-0
No files found.
Changelog
View file @
c8a5365d
...
@@ -28,6 +28,7 @@ version <next>:
...
@@ -28,6 +28,7 @@ version <next>:
- new expansion syntax for drawtext
- new expansion syntax for drawtext
- BRender PIX image decoder
- BRender PIX image decoder
- ffprobe -show_entries option
- ffprobe -show_entries option
- ffprobe -sections option
version 1.0:
version 1.0:
...
...
doc/ffprobe.texi
View file @
c8a5365d
...
@@ -45,6 +45,10 @@ ffprobe output is designed to be easily parsable by a textual filter,
...
@@ -45,6 +45,10 @@ ffprobe output is designed to be easily parsable by a textual filter,
and consists of one or more sections of a form defined by the selected
and consists of one or more sections of a form defined by the selected
writer, which is specified by the @option
{
print
_
format
}
option.
writer, which is specified by the @option
{
print
_
format
}
option.
Sections may contain other nested sections, and are identified by a
name (which may be shared by other sections), and an unique
name. See the output of @option
{
sections
}
.
Metadata tags stored in the container or in the streams are recognized
Metadata tags stored in the container or in the streams are recognized
and printed in the corresponding "FORMAT" or "STREAM" section.
and printed in the corresponding "FORMAT" or "STREAM" section.
...
@@ -94,6 +98,10 @@ For example for printing the output in JSON format, specify:
...
@@ -94,6 +98,10 @@ For example for printing the output in JSON format, specify:
For more details on the available output printing formats, see the
For more details on the available output printing formats, see the
Writers section below.
Writers section below.
@item -sections
Print sections structure and section information, and exit. The output
is not meant to be parsed by a machine.
@item -select
_
streams @var
{
stream
_
specifier
}
@item -select
_
streams @var
{
stream
_
specifier
}
Select only the streams specified by @var
{
stream
_
specifier
}
. This
Select only the streams specified by @var
{
stream
_
specifier
}
. This
option affects only the options related to streams
option affects only the options related to streams
...
...
ffprobe.c
View file @
c8a5365d
...
@@ -2105,6 +2105,35 @@ static int opt_pretty(void *optctx, const char *opt, const char *arg)
...
@@ -2105,6 +2105,35 @@ static int opt_pretty(void *optctx, const char *opt, const char *arg)
return
0
;
return
0
;
}
}
static
void
print_section
(
SectionID
id
,
int
level
)
{
const
SectionID
*
pid
;
const
struct
section
*
section
=
&
sections
[
id
];
printf
(
"%c%c%c"
,
section
->
flags
&
SECTION_FLAG_IS_WRAPPER
?
'W'
:
'.'
,
section
->
flags
&
SECTION_FLAG_IS_ARRAY
?
'A'
:
'.'
,
section
->
flags
&
SECTION_FLAG_HAS_VARIABLE_FIELDS
?
'V'
:
'.'
);
printf
(
"%*c %s"
,
level
*
4
,
' '
,
section
->
name
);
if
(
section
->
unique_name
)
printf
(
"/%s"
,
section
->
unique_name
);
printf
(
"
\n
"
);
for
(
pid
=
section
->
children_ids
;
*
pid
!=
-
1
;
pid
++
)
print_section
(
*
pid
,
level
+
1
);
}
static
int
opt_sections
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
)
{
printf
(
"Sections:
\n
"
"W.. = Section is a wrapper (contains other sections, no local entries)
\n
"
".A. = Section contains an array of elements of the same type
\n
"
"..V = Section may contain a variable number of fields with variable keys
\n
"
"FLAGS NAME/UNIQUE_NAME
\n
"
"---
\n
"
);
print_section
(
SECTION_ID_ROOT
,
0
);
return
0
;
}
static
int
opt_show_versions
(
const
char
*
opt
,
const
char
*
arg
)
static
int
opt_show_versions
(
const
char
*
opt
,
const
char
*
arg
)
{
{
mark_section_show_entries
(
SECTION_ID_PROGRAM_VERSION
,
1
,
NULL
);
mark_section_show_entries
(
SECTION_ID_PROGRAM_VERSION
,
1
,
NULL
);
...
@@ -2142,6 +2171,7 @@ static const OptionDef real_options[] = {
...
@@ -2142,6 +2171,7 @@ static const OptionDef real_options[] = {
"set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)"
,
"format"
},
"set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)"
,
"format"
},
{
"of"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
print_format
},
"alias for -print_format"
,
"format"
},
{
"of"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
print_format
},
"alias for -print_format"
,
"format"
},
{
"select_streams"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
stream_specifier
},
"select the specified streams"
,
"stream_specifier"
},
{
"select_streams"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
stream_specifier
},
"select the specified streams"
,
"stream_specifier"
},
{
"sections"
,
OPT_EXIT
,
{.
func_arg
=
opt_sections
},
"print sections structure and section information, and exit"
},
{
"show_data"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_data
},
"show packets data"
},
{
"show_data"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_data
},
"show packets data"
},
{
"show_error"
,
0
,
{(
void
*
)
&
opt_show_error
},
"show probing error"
},
{
"show_error"
,
0
,
{(
void
*
)
&
opt_show_error
},
"show probing error"
},
{
"show_format"
,
0
,
{(
void
*
)
&
opt_show_format
},
"show format/container info"
},
{
"show_format"
,
0
,
{(
void
*
)
&
opt_show_format
},
"show format/container info"
},
...
...
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