Restore stream recorder functionality and add discontinuity support (#46772)
* Add discontinuity support to stream recorder * Use same container options for both StreamOutputs * Fix pts adjuster * Remove redundant/incorrect duplicate hls segment check * Use same StreamBuffer across outputs * Remove keepalive check for recorder * Set output video timescale explicitly * Disable avoid_negative_ts
This commit is contained in:
parent
1cecf229b9
commit
f005c68630
7 changed files with 107 additions and 130 deletions
|
@ -174,7 +174,20 @@ async def test_recorder_save(tmpdir):
|
|||
filename = f"{tmpdir}/test.mp4"
|
||||
|
||||
# Run
|
||||
recorder_save_worker(filename, [Segment(1, source, 4)], "mp4")
|
||||
recorder_save_worker(filename, [Segment(1, source, 4)])
|
||||
|
||||
# Assert
|
||||
assert os.path.exists(filename)
|
||||
|
||||
|
||||
async def test_recorder_discontinuity(tmpdir):
|
||||
"""Test recorder save across a discontinuity."""
|
||||
# Setup
|
||||
source = generate_h264_video()
|
||||
filename = f"{tmpdir}/test.mp4"
|
||||
|
||||
# Run
|
||||
recorder_save_worker(filename, [Segment(1, source, 4, 0), Segment(2, source, 4, 1)])
|
||||
|
||||
# Assert
|
||||
assert os.path.exists(filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue