fftools/ffmpeg: optimize inter-thread queue sizes

Use 8 packets/frames by default rather than 1, which seems to provide
better throughput.

Allow -thread_queue_size to set the muxer queue size manually again.
This commit is contained in:
Anton Khirnov
2024-01-24 20:21:37 +01:00
parent 341d0419e1
commit e0da916b8f
6 changed files with 15 additions and 16 deletions

View File

@@ -3047,7 +3047,6 @@ int of_open(const OptionsContext *o, const char *filename, Scheduler *sch)
of->start_time = o->start_time;
of->shortest = o->shortest;
mux->thread_queue_size = o->thread_queue_size > 0 ? o->thread_queue_size : 8;
mux->limit_filesize = o->limit_filesize;
av_dict_copy(&mux->opts, o->g->format_opts, 0);
@@ -3081,7 +3080,7 @@ int of_open(const OptionsContext *o, const char *filename, Scheduler *sch)
}
err = sch_add_mux(sch, muxer_thread, mux_check_init, mux,
!strcmp(oc->oformat->name, "rtp"));
!strcmp(oc->oformat->name, "rtp"), o->thread_queue_size);
if (err < 0)
return err;
mux->sch = sch;