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
0a4f0211
Commit
0a4f0211
authored
Nov 24, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option -n to exit if output file exists.
parent
0232f788
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
avconv.c
avconv.c
+4
-2
avconv.texi
doc/avconv.texi
+3
-0
ffmpeg.texi
doc/ffmpeg.texi
+3
-0
ffmpeg.c
ffmpeg.c
+4
-2
No files found.
avconv.c
View file @
0a4f0211
...
@@ -119,6 +119,7 @@ static int intra_dc_precision = 8;
...
@@ -119,6 +119,7 @@ static int intra_dc_precision = 8;
static
int
qp_hist
=
0
;
static
int
qp_hist
=
0
;
static
int
file_overwrite
=
0
;
static
int
file_overwrite
=
0
;
static
int
no_file_overwrite
=
0
;
static
int
do_benchmark
=
0
;
static
int
do_benchmark
=
0
;
static
int
do_hex_dump
=
0
;
static
int
do_hex_dump
=
0
;
static
int
do_pkt_dump
=
0
;
static
int
do_pkt_dump
=
0
;
...
@@ -3016,11 +3017,11 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
...
@@ -3016,11 +3017,11 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
static
void
assert_file_overwrite
(
const
char
*
filename
)
static
void
assert_file_overwrite
(
const
char
*
filename
)
{
{
if
(
!
file_overwrite
&&
if
(
(
!
file_overwrite
||
no_file_overwrite
)
&&
(
strchr
(
filename
,
':'
)
==
NULL
||
filename
[
1
]
==
':'
||
(
strchr
(
filename
,
':'
)
==
NULL
||
filename
[
1
]
==
':'
||
av_strstart
(
filename
,
"file:"
,
NULL
)))
{
av_strstart
(
filename
,
"file:"
,
NULL
)))
{
if
(
avio_check
(
filename
,
0
)
==
0
)
{
if
(
avio_check
(
filename
,
0
)
==
0
)
{
if
(
!
using_stdin
)
{
if
(
!
using_stdin
&&
(
!
no_file_overwrite
||
file_overwrite
)
)
{
fprintf
(
stderr
,
"File '%s' already exists. Overwrite ? [y/N] "
,
filename
);
fprintf
(
stderr
,
"File '%s' already exists. Overwrite ? [y/N] "
,
filename
);
fflush
(
stderr
);
fflush
(
stderr
);
if
(
!
read_yesno
())
{
if
(
!
read_yesno
())
{
...
@@ -4268,6 +4269,7 @@ static const OptionDef options[] = {
...
@@ -4268,6 +4269,7 @@ static const OptionDef options[] = {
{
"f"
,
HAS_ARG
|
OPT_STRING
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
format
)},
"force format"
,
"fmt"
},
{
"f"
,
HAS_ARG
|
OPT_STRING
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
format
)},
"force format"
,
"fmt"
},
{
"i"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_input_file
},
"input file name"
,
"filename"
},
{
"i"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_input_file
},
"input file name"
,
"filename"
},
{
"y"
,
OPT_BOOL
,
{(
void
*
)
&
file_overwrite
},
"overwrite output files"
},
{
"y"
,
OPT_BOOL
,
{(
void
*
)
&
file_overwrite
},
"overwrite output files"
},
{
"n"
,
OPT_BOOL
,
{(
void
*
)
&
no_file_overwrite
},
"do not overwrite output files"
},
{
"c"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"c"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"codec"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"codec"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"pre"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
presets
)},
"preset name"
,
"preset"
},
{
"pre"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
presets
)},
"preset name"
,
"preset"
},
...
...
doc/avconv.texi
View file @
0a4f0211
...
@@ -113,6 +113,9 @@ input file name
...
@@ -113,6 +113,9 @@ input file name
@item -y (@emph
{
global
}
)
@item -y (@emph
{
global
}
)
Overwrite output files without asking.
Overwrite output files without asking.
@item -n (@emph
{
global
}
)
Do not overwrite output files but exit if file exists.
@item -c[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@item -c[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@itemx -codec[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@itemx -codec[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
Select an encoder (when used before an output file) or a decoder (when used
Select an encoder (when used before an output file) or a decoder (when used
...
...
doc/ffmpeg.texi
View file @
0a4f0211
...
@@ -94,6 +94,9 @@ input file name
...
@@ -94,6 +94,9 @@ input file name
@item -y (@emph
{
global
}
)
@item -y (@emph
{
global
}
)
Overwrite output files without asking.
Overwrite output files without asking.
@item -n (@emph
{
global
}
)
Do not overwrite output files but exit if file exists.
@item -c[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@item -c[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@itemx -codec[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
@itemx -codec[:@var
{
stream
_
specifier
}
] @var
{
codec
}
(@emph
{
input/output,per-stream
}
)
Select an encoder (when used before an output file) or a decoder (when used
Select an encoder (when used before an output file) or a decoder (when used
...
...
ffmpeg.c
View file @
0a4f0211
...
@@ -131,6 +131,7 @@ static const char *audio_codec_name = NULL;
...
@@ -131,6 +131,7 @@ static const char *audio_codec_name = NULL;
static
const
char
*
subtitle_codec_name
=
NULL
;
static
const
char
*
subtitle_codec_name
=
NULL
;
static
int
file_overwrite
=
0
;
static
int
file_overwrite
=
0
;
static
int
no_file_overwrite
=
0
;
static
int
do_benchmark
=
0
;
static
int
do_benchmark
=
0
;
static
int
do_hex_dump
=
0
;
static
int
do_hex_dump
=
0
;
static
int
do_pkt_dump
=
0
;
static
int
do_pkt_dump
=
0
;
...
@@ -3247,11 +3248,11 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
...
@@ -3247,11 +3248,11 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
static
void
assert_file_overwrite
(
const
char
*
filename
)
static
void
assert_file_overwrite
(
const
char
*
filename
)
{
{
if
(
!
file_overwrite
&&
if
(
(
!
file_overwrite
||
no_file_overwrite
)
&&
(
strchr
(
filename
,
':'
)
==
NULL
||
filename
[
1
]
==
':'
||
(
strchr
(
filename
,
':'
)
==
NULL
||
filename
[
1
]
==
':'
||
av_strstart
(
filename
,
"file:"
,
NULL
)))
{
av_strstart
(
filename
,
"file:"
,
NULL
)))
{
if
(
avio_check
(
filename
,
0
)
==
0
)
{
if
(
avio_check
(
filename
,
0
)
==
0
)
{
if
(
!
using_stdin
)
{
if
(
!
using_stdin
&&
(
!
no_file_overwrite
||
file_overwrite
)
)
{
fprintf
(
stderr
,
"File '%s' already exists. Overwrite ? [y/N] "
,
filename
);
fprintf
(
stderr
,
"File '%s' already exists. Overwrite ? [y/N] "
,
filename
);
fflush
(
stderr
);
fflush
(
stderr
);
term_exit
();
term_exit
();
...
@@ -4619,6 +4620,7 @@ static const OptionDef options[] = {
...
@@ -4619,6 +4620,7 @@ static const OptionDef options[] = {
{
"f"
,
HAS_ARG
|
OPT_STRING
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
format
)},
"force format"
,
"fmt"
},
{
"f"
,
HAS_ARG
|
OPT_STRING
|
OPT_OFFSET
,
{.
off
=
OFFSET
(
format
)},
"force format"
,
"fmt"
},
{
"i"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_input_file
},
"input file name"
,
"filename"
},
{
"i"
,
HAS_ARG
|
OPT_FUNC2
,
{(
void
*
)
opt_input_file
},
"input file name"
,
"filename"
},
{
"y"
,
OPT_BOOL
,
{(
void
*
)
&
file_overwrite
},
"overwrite output files"
},
{
"y"
,
OPT_BOOL
,
{(
void
*
)
&
file_overwrite
},
"overwrite output files"
},
{
"n"
,
OPT_BOOL
,
{(
void
*
)
&
no_file_overwrite
},
"do not overwrite output files"
},
{
"c"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"c"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"codec"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"codec"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
codec_names
)},
"codec name"
,
"codec"
},
{
"pre"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
presets
)},
"preset name"
,
"preset"
},
{
"pre"
,
HAS_ARG
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
presets
)},
"preset name"
,
"preset"
},
...
...
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