diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-08-09 14:25:55 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-08-10 11:47:29 +0200 |
commit | 65001aa93e8393c31c417b45761a318bc8cdd6ef (patch) | |
tree | 4b283b1f7b76eb79394541d5154e914474ea3108 /fftools/ffmpeg_opt.c | |
parent | d931554f668186729bf290ed9afa6e9a4417328b (diff) |
fftools/ffmpeg: add a live mux modelive
Track the wallclock time at which each input packet is demuxed and
propagate it through decoding and encoding.
When the live mux option is used, drop all packets demuxed before the
muxer is opened. This is intended to avoid latency when opening the
muxer takes a long time.
Diffstat (limited to 'fftools/ffmpeg_opt.c')
-rw-r--r-- | fftools/ffmpeg_opt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 97f14b2a5b..151b3bad07 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2892,6 +2892,7 @@ static int open_output_file(OptionsContext *o, const char *filename) of->recording_time = o->recording_time; of->start_time = o->start_time; of->shortest = o->shortest; + of->live = o->live; av_dict_copy(&format_opts, o->g->format_opts, 0); if (!strcmp(filename, "-")) @@ -3969,6 +3970,7 @@ const OptionDef options[] = { { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(bits_per_raw_sample) }, "set the number of bits per raw sample", "number" }, + { "live", OPT_BOOL | OPT_OUTPUT | OPT_OFFSET, { .off = OFFSET(live) }, "live output" }, /* video options */ { "vframes", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_video_frames }, |