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
d6da16dc
Commit
d6da16dc
authored
Dec 29, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: add support to option -show_error
parent
55ed19bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
Changelog
Changelog
+1
-0
ffprobe.texi
doc/ffprobe.texi
+5
-0
ffprobe.xsd
doc/ffprobe.xsd
+6
-0
ffprobe.c
ffprobe.c
+20
-0
No files found.
Changelog
View file @
d6da16dc
...
@@ -15,6 +15,7 @@ version next:
...
@@ -15,6 +15,7 @@ version next:
- amerge audio filter
- amerge audio filter
- Automatic thread count based on detection number of (available) CPU cores
- Automatic thread count based on detection number of (available) CPU cores
- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
- ffprobe -show_error option
version 0.9:
version 0.9:
...
...
doc/ffprobe.texi
View file @
d6da16dc
...
@@ -94,6 +94,11 @@ For example for printing the output in JSON format, specify:
...
@@ -94,6 +94,11 @@ 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 -show
_
error
Show information about the error found when trying to probe the input.
The error information is printed within a section with name "ERROR".
@item -show
_
format
@item -show
_
format
Show information about the container format of the input multimedia
Show information about the container format of the input multimedia
stream.
stream.
...
...
doc/ffprobe.xsd
View file @
d6da16dc
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<xsd:element
name=
"packets"
type=
"ffprobe:packetsType"
minOccurs=
"0"
maxOccurs=
"1"
/>
<xsd:element
name=
"packets"
type=
"ffprobe:packetsType"
minOccurs=
"0"
maxOccurs=
"1"
/>
<xsd:element
name=
"streams"
type=
"ffprobe:streamsType"
minOccurs=
"0"
maxOccurs=
"1"
/>
<xsd:element
name=
"streams"
type=
"ffprobe:streamsType"
minOccurs=
"0"
maxOccurs=
"1"
/>
<xsd:element
name=
"format"
type=
"ffprobe:formatType"
minOccurs=
"0"
maxOccurs=
"1"
/>
<xsd:element
name=
"format"
type=
"ffprobe:formatType"
minOccurs=
"0"
maxOccurs=
"1"
/>
<xsd:element
name=
"error"
type=
"ffprobe:errorType"
minOccurs=
"0"
maxOccurs=
"1"
/>
</xsd:sequence>
</xsd:sequence>
</xsd:complexType>
</xsd:complexType>
...
@@ -93,4 +94,9 @@
...
@@ -93,4 +94,9 @@
<xsd:attribute
name=
"key"
type=
"xsd:string"
use=
"required"
/>
<xsd:attribute
name=
"key"
type=
"xsd:string"
use=
"required"
/>
<xsd:attribute
name=
"value"
type=
"xsd:string"
use=
"required"
/>
<xsd:attribute
name=
"value"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:complexType>
<xsd:complexType
name=
"errorType"
>
<xsd:attribute
name=
"code"
type=
"xsd:int"
use=
"required"
/>
<xsd:attribute
name=
"string"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:schema>
</xsd:schema>
ffprobe.c
View file @
d6da16dc
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
const
char
program_name
[]
=
"ffprobe"
;
const
char
program_name
[]
=
"ffprobe"
;
const
int
program_birth_year
=
2007
;
const
int
program_birth_year
=
2007
;
static
int
do_show_error
=
0
;
static
int
do_show_format
=
0
;
static
int
do_show_format
=
0
;
static
int
do_show_packets
=
0
;
static
int
do_show_packets
=
0
;
static
int
do_show_streams
=
0
;
static
int
do_show_streams
=
0
;
...
@@ -1322,6 +1323,22 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
...
@@ -1322,6 +1323,22 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
fflush
(
stdout
);
fflush
(
stdout
);
}
}
static
void
show_error
(
WriterContext
*
w
,
int
err
)
{
char
errbuf
[
128
];
const
char
*
errbuf_ptr
=
errbuf
;
if
(
av_strerror
(
err
,
errbuf
,
sizeof
(
errbuf
))
<
0
)
errbuf_ptr
=
strerror
(
AVUNERROR
(
err
));
writer_print_chapter_header
(
w
,
"error"
);
print_section_header
(
"error"
);
print_int
(
"code"
,
err
);
print_str
(
"string"
,
errbuf_ptr
);
print_section_footer
(
"error"
);
writer_print_chapter_footer
(
w
,
"error"
);
}
static
int
open_input_file
(
AVFormatContext
**
fmt_ctx_ptr
,
const
char
*
filename
)
static
int
open_input_file
(
AVFormatContext
**
fmt_ctx_ptr
,
const
char
*
filename
)
{
{
int
err
,
i
;
int
err
,
i
;
...
@@ -1405,6 +1422,8 @@ static int probe_file(const char *filename)
...
@@ -1405,6 +1422,8 @@ static int probe_file(const char *filename)
PRINT_CHAPTER
(
streams
);
PRINT_CHAPTER
(
streams
);
PRINT_CHAPTER
(
format
);
PRINT_CHAPTER
(
format
);
avformat_close_input
(
&
fmt_ctx
);
avformat_close_input
(
&
fmt_ctx
);
}
else
if
(
do_show_error
)
{
show_error
(
wctx
,
ret
);
}
}
writer_print_footer
(
wctx
);
writer_print_footer
(
wctx
);
writer_close
(
&
wctx
);
writer_close
(
&
wctx
);
...
@@ -1478,6 +1497,7 @@ static const OptionDef options[] = {
...
@@ -1478,6 +1497,7 @@ static const OptionDef options[] = {
"prettify the format of displayed values, make it more human readable"
},
"prettify the format of displayed values, make it more human readable"
},
{
"print_format"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
print_format
},
{
"print_format"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
print_format
},
"set the output printing format (available formats are: default, compact, csv, json, xml)"
,
"format"
},
"set the output printing format (available formats are: default, compact, csv, json, xml)"
,
"format"
},
{
"show_error"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_error
}
,
"show probing error"
},
{
"show_format"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_format
}
,
"show format/container info"
},
{
"show_format"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_format
}
,
"show format/container info"
},
{
"show_packets"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_packets
},
"show packets info"
},
{
"show_packets"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_packets
},
"show packets info"
},
{
"show_streams"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_streams
},
"show streams info"
},
{
"show_streams"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_streams
},
"show streams 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