Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
e4f4d99d
Commit
e4f4d99d
authored
12 years ago
by
Nicolas George
Browse files
Options
Downloads
Patches
Plain Diff
ffmpeg: make -s work for subtitles too.
Some codecs allow to encode the frame size and some players use it.
parent
17e40236
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ffmpeg_opt.c
+11
-1
11 additions, 1 deletion
ffmpeg_opt.c
with
11 additions
and
1 deletion
ffmpeg_opt.c
+
11
−
1
View file @
e4f4d99d
...
@@ -1218,6 +1218,16 @@ static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc,
...
@@ -1218,6 +1218,16 @@ static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc,
MATCH_PER_STREAM_OPT
(
copy_initial_nonkeyframes
,
i
,
ost
->
copy_initial_nonkeyframes
,
oc
,
st
);
MATCH_PER_STREAM_OPT
(
copy_initial_nonkeyframes
,
i
,
ost
->
copy_initial_nonkeyframes
,
oc
,
st
);
if
(
!
ost
->
stream_copy
)
{
char
*
frame_size
=
NULL
;
MATCH_PER_STREAM_OPT
(
frame_sizes
,
str
,
frame_size
,
oc
,
st
);
if
(
frame_size
&&
av_parse_video_size
(
&
subtitle_enc
->
width
,
&
subtitle_enc
->
height
,
frame_size
)
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Invalid frame size: %s.
\n
"
,
frame_size
);
exit_program
(
1
);
}
}
return
ost
;
return
ost
;
}
}
...
@@ -2219,7 +2229,7 @@ const OptionDef options[] = {
...
@@ -2219,7 +2229,7 @@ const OptionDef options[] = {
/* video options */
/* video options */
{
"vframes"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_FUNC2
,
{(
void
*
)
opt_video_frames
},
"set the number of video frames to record"
,
"number"
},
{
"vframes"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_FUNC2
,
{(
void
*
)
opt_video_frames
},
"set the number of video frames to record"
,
"number"
},
{
"r"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_rates
)},
"set frame rate (Hz value, fraction or abbreviation)"
,
"rate"
},
{
"r"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_rates
)},
"set frame rate (Hz value, fraction or abbreviation)"
,
"rate"
},
{
"s"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_sizes
)},
"set frame size (WxH or abbreviation)"
,
"size"
},
{
"s"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_SUBTITLE
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_sizes
)},
"set frame size (WxH or abbreviation)"
,
"size"
},
{
"aspect"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_aspect_ratios
)},
"set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)"
,
"aspect"
},
{
"aspect"
,
HAS_ARG
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_aspect_ratios
)},
"set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)"
,
"aspect"
},
{
"pix_fmt"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_pix_fmts
)},
"set pixel format"
,
"format"
},
{
"pix_fmt"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
|
OPT_STRING
|
OPT_SPEC
,
{.
off
=
OFFSET
(
frame_pix_fmts
)},
"set pixel format"
,
"format"
},
{
"bits_per_raw_sample"
,
OPT_INT
|
HAS_ARG
|
OPT_VIDEO
,
{(
void
*
)
&
frame_bits_per_raw_sample
},
"set the number of bits per raw sample"
,
"number"
},
{
"bits_per_raw_sample"
,
OPT_INT
|
HAS_ARG
|
OPT_VIDEO
,
{(
void
*
)
&
frame_bits_per_raw_sample
},
"set the number of bits per raw sample"
,
"number"
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment