Closed sushilicious closed 1 year ago
Nice solution! Would you be willing to make a PR so I can give you credit?
As @2bc4 pointed out, the above patch doesn't work when reexecuting more than once.
Instead, it is recommended that you add a timestamp to the end of your output file using streamlink's meta variables to ensure you don't overwrite the previous output segements. For example (untested):
-o '{author} - {title} - {time:%Y-%m-%dT%H%M%S%z}.ts'
When running streamlink with
-o
or-r
arguments and--twitch-reexec-on-ad
, encountering an ad segment will try to overwrite the initial saved portion (since it's just calling the same streamlink command with the same output file argument).This is a simple hack which appends a counter to the output file to avoid the problem:
Also, thanks for this fantastic plugin.