fix(audio): use_wallclock_as_timestamps on both raw FIFOs to align A/V by arrival time (no deadlock, replaces barrier)
This commit is contained in:
parent
d0d881c735
commit
228f68ab6d
1 changed files with 11 additions and 0 deletions
|
|
@ -613,11 +613,22 @@ class CaptureManager {
|
|||
|
||||
return {
|
||||
inputArgs: [
|
||||
// Both raw FIFOs are timestampless. ffmpeg opens input 0 (video) and
|
||||
// input 1 (audio) at slightly different moments, so PTS-zeroing each
|
||||
// stream's first byte would bake in a fixed A/V offset. Stamping each
|
||||
// input by wall-clock ARRIVAL time aligns them by real time regardless
|
||||
// of FIFO open order — the robust fix for the A/V start offset.
|
||||
// Large thread_queue_size avoids "thread message queue blocking" on
|
||||
// the high-bitrate raw video FIFO.
|
||||
'-use_wallclock_as_timestamps', '1',
|
||||
'-thread_queue_size', '512',
|
||||
'-f', 'rawvideo',
|
||||
'-pix_fmt', 'uyvy422',
|
||||
'-video_size', dcSize,
|
||||
'-framerate', dcFps,
|
||||
'-i', videoFifo,
|
||||
'-use_wallclock_as_timestamps', '1',
|
||||
'-thread_queue_size', '512',
|
||||
'-f', 's16le',
|
||||
'-ar', '48000',
|
||||
'-ac', '2',
|
||||
|
|
|
|||
Loading…
Reference in a new issue