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
3738fe1a
Commit
3738fe1a
authored
Mar 11, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nicer output for 'ffmpeg -formats'
Originally committed as revision 2870 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b98202a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
38 deletions
+86
-38
ffmpeg.c
ffmpeg.c
+86
-38
No files found.
ffmpeg.c
View file @
3738fe1a
...
...
@@ -2838,59 +2838,101 @@ static void show_formats(void)
AVOutputFormat
*
ofmt
;
AVImageFormat
*
image_fmt
;
URLProtocol
*
up
;
AVCodec
*
p
;
const
char
**
pp
;
printf
(
"Output audio/video file formats:"
);
for
(
ofmt
=
first_oformat
;
ofmt
!=
NULL
;
ofmt
=
ofmt
->
next
)
{
printf
(
" %s"
,
ofmt
->
name
);
}
printf
(
"
\n
"
);
printf
(
"Input audio/video file formats:"
);
for
(
ifmt
=
first_iformat
;
ifmt
!=
NULL
;
ifmt
=
ifmt
->
next
)
{
printf
(
" %s"
,
ifmt
->
name
);
}
printf
(
"
\n
"
);
printf
(
"Output image formats:"
);
for
(
image_fmt
=
first_image_format
;
image_fmt
!=
NULL
;
image_fmt
=
image_fmt
->
next
)
{
if
(
image_fmt
->
img_write
)
printf
(
" %s"
,
image_fmt
->
name
);
AVCodec
*
p
,
*
p2
;
const
char
**
pp
,
*
last_name
;
printf
(
"File formats:
\n
"
);
last_name
=
"000"
;
for
(;;){
int
decode
=
0
;
int
encode
=
0
;
const
char
*
name
=
NULL
;
for
(
ofmt
=
first_oformat
;
ofmt
!=
NULL
;
ofmt
=
ofmt
->
next
)
{
if
((
name
==
NULL
||
strcmp
(
ofmt
->
name
,
name
)
<
0
)
&&
strcmp
(
ofmt
->
name
,
last_name
)
>
0
){
name
=
ofmt
->
name
;
encode
=
1
;
}
}
for
(
ifmt
=
first_iformat
;
ifmt
!=
NULL
;
ifmt
=
ifmt
->
next
)
{
if
((
name
==
NULL
||
strcmp
(
ifmt
->
name
,
name
)
<
0
)
&&
strcmp
(
ifmt
->
name
,
last_name
)
>
0
){
name
=
ifmt
->
name
;
encode
=
0
;
}
if
(
name
&&
strcmp
(
ifmt
->
name
,
name
)
==
0
)
decode
=
1
;
}
if
(
name
==
NULL
)
break
;
last_name
=
name
;
printf
(
" %s%s %s
\n
"
,
decode
?
"D"
:
" "
,
encode
?
"E"
:
" "
,
name
);
}
printf
(
"
\n
"
);
printf
(
"I
nput image formats:
"
);
printf
(
"I
mage formats:
\n
"
);
for
(
image_fmt
=
first_image_format
;
image_fmt
!=
NULL
;
image_fmt
=
image_fmt
->
next
)
{
if
(
image_fmt
->
img_read
)
printf
(
" %s"
,
image_fmt
->
name
);
printf
(
" %s%s %s
\n
"
,
image_fmt
->
img_read
?
"D"
:
" "
,
image_fmt
->
img_write
?
"E"
:
" "
,
image_fmt
->
name
);
}
printf
(
"
\n
"
);
printf
(
"Codecs:
\n
"
);
printf
(
" Encoders:"
);
for
(
p
=
first_avcodec
;
p
!=
NULL
;
p
=
p
->
next
)
{
if
(
p
->
encode
)
printf
(
" %s"
,
p
->
name
);
}
printf
(
"
\n
"
);
printf
(
" Decoders:"
);
for
(
p
=
first_avcodec
;
p
!=
NULL
;
p
=
p
->
next
)
{
if
(
p
->
decode
)
printf
(
" %s"
,
p
->
name
);
last_name
=
"000"
;
for
(;;){
int
decode
=
0
;
int
encode
=
0
;
int
cap
=
0
;
p2
=
NULL
;
for
(
p
=
first_avcodec
;
p
!=
NULL
;
p
=
p
->
next
)
{
if
((
p2
==
NULL
||
strcmp
(
p
->
name
,
p2
->
name
)
<
0
)
&&
strcmp
(
p
->
name
,
last_name
)
>
0
){
p2
=
p
;
decode
=
encode
=
cap
=
0
;
}
if
(
p2
&&
strcmp
(
p
->
name
,
p2
->
name
)
==
0
){
if
(
p
->
decode
)
decode
=
1
;
if
(
p
->
encode
)
encode
=
1
;
cap
|=
p
->
capabilities
;
}
}
if
(
p2
==
NULL
)
break
;
last_name
=
p2
->
name
;
printf
(
" %s%s%s%s%s%s %s"
,
decode
?
"D"
:
(
/*p2->decoder ? "d":*/
" "
),
encode
?
"E"
:
" "
,
p2
->
type
==
CODEC_TYPE_AUDIO
?
"A"
:
"V"
,
cap
&
CODEC_CAP_DRAW_HORIZ_BAND
?
"S"
:
" "
,
cap
&
CODEC_CAP_DR1
?
"D"
:
" "
,
cap
&
CODEC_CAP_TRUNCATED
?
"T"
:
" "
,
p2
->
name
);
/* if(p2->decoder && decode==0)
printf(" use %s for decoding", p2->decoder->name);*/
printf
(
"
\n
"
);
}
printf
(
"
\n
"
);
printf
(
"Supported file protocols:"
);
printf
(
"Supported file protocols:
\n
"
);
for
(
up
=
first_protocol
;
up
!=
NULL
;
up
=
up
->
next
)
printf
(
" %s:"
,
up
->
name
);
printf
(
"
\n
"
);
printf
(
"Frame size, frame rate abbreviations: ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif
\n
"
);
printf
(
"Motion estimation methods:"
);
printf
(
"Frame size, frame rate abbreviations:
\n
ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif
\n
"
);
printf
(
"Motion estimation methods:
\n
"
);
pp
=
motion_str
;
while
(
*
pp
)
{
printf
(
" %s"
,
*
pp
);
...
...
@@ -2902,7 +2944,13 @@ static void show_formats(void)
printf
(
"(default)"
);
pp
++
;
}
printf
(
"
\n
"
);
printf
(
"
\n\n
"
);
printf
(
"Note, the names of encoders and decoders dont always match, so there are
\n
"
"several cases where the above table shows encoder only or decoder only entries
\n
"
"even though both encoding and decoding are supported for example, the h263
\n
"
"decoder corresponds to the h263 and h263p encoders, for file formats its even
\n
"
"worse
\n
"
);
exit
(
1
);
}
...
...
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