Skip to content

Commit f4709a5

Browse files
committed
Fix MKV args
1 parent 402269e commit f4709a5

4 files changed

Lines changed: 10 additions & 13 deletions

File tree

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
**<span style="color:#56adda">0.0.2</span>**
2+
- Fix MKV outputs to be written as normal finished Matroska files instead of live-style MKV streams
3+
- Remove live/cluster muxing flags that interfered with duration and seekability in Plex playback
4+
- Keep timestamp normalization focused on repair and playback stability with `-avoid_negative_ts make_zero`
5+
16
**<span style="color:#56adda">0.0.1</span>**
27
- Initial version
38
- Adds Plex DVR copy-fragment detection, grouping, repair stitching, chapter preservation, and cleanup controls

info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
"on_worker_process": 1
1515
},
1616
"tags": "video,plex,dvr,ffmpeg",
17-
"version": "0.0.1"
17+
"version": "0.0.2"
1818
}

lib/logic.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -854,15 +854,15 @@ def build_ffmpeg_command(
854854
"4096",
855855
"-max_interleave_delta",
856856
"0",
857+
"-avoid_negative_ts",
858+
"make_zero",
857859
]
858860
if output_target["container"] == "mpegts":
859861
command += [
860862
"-muxdelay",
861863
"0",
862864
"-muxpreload",
863865
"0",
864-
"-avoid_negative_ts",
865-
"make_zero",
866866
"-mpegts_flags",
867867
"+resend_headers",
868868
"-f",
@@ -871,14 +871,6 @@ def build_ffmpeg_command(
871871
]
872872
else:
873873
command += [
874-
"-flush_packets",
875-
"1",
876-
"-cluster_time_limit",
877-
"1000",
878-
"-cluster_size_limit",
879-
"1048576",
880-
"-live",
881-
"1",
882874
"-f",
883875
"matroska",
884876
str(output_file),

tests/test_logic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ def test_build_ffmpeg_command_for_h265_mkv_profile(self):
247247
self.assertIn("0:2?", command)
248248
self.assertIn("-c:s", command)
249249
self.assertIn("copy", command)
250-
self.assertIn("-cluster_time_limit", command)
251-
self.assertIn("-flush_packets", command)
250+
self.assertIn("-avoid_negative_ts", command)
251+
self.assertIn("make_zero", command)
252252

253253
def test_select_dominant_profile_prefers_longest_video_fragment(self):
254254
short_fragment = Fragment(

0 commit comments

Comments
 (0)