diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-27 03:37:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-27 03:52:31 +0200 |
commit | 65f7aee63b6283a2336d03046faa37f2391d98e0 (patch) | |
tree | 4d4e8cceeb08c916f0b6d73a032a8ccc9f10be26 /ffmpeg_opt.c | |
parent | d37044647f83f53a1cb711ea4655b944ff4af0e5 (diff) | |
download | ffmpeg-65f7aee63b6283a2336d03046faa37f2391d98e0.tar.gz |
ffmpeg: add option to control copying of frames prior to start.
Normally we discard things prior to the intended start
for stream copy this is not always possible, and its not done by default
this option allows discarding to be enabled
this is primarely usefull when transcoding a video and stream copying an
audio stream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 3d73564aa2..2c5fbfb6b2 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -960,6 +960,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e ost->max_frames = INT64_MAX; MATCH_PER_STREAM_OPT(max_frames, i64, ost->max_frames, oc, st); + ost->copy_prior_start = -1; + MATCH_PER_STREAM_OPT(copy_prior_start, i, ost->copy_prior_start, oc ,st); + MATCH_PER_STREAM_OPT(bitstream_filters, str, bsf, oc, st); while (bsf) { if (next = strchr(bsf, ',')) @@ -2316,6 +2319,8 @@ const OptionDef options[] = { "exit on error", "error" }, { "copyinkf", OPT_BOOL | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(copy_initial_nonkeyframes) }, "copy initial non-keyframes" }, + { "copypriorss", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC, { .off = OFFSET(copy_prior_start) }, + "copy or discard frames before start time" }, { "frames", OPT_INT64 | HAS_ARG | OPT_SPEC, { .off = OFFSET(max_frames) }, "set the number of frames to record", "number" }, { "tag", OPT_STRING | HAS_ARG | OPT_SPEC | OPT_EXPERT,{ .off = OFFSET(codec_tags) }, |