Skip to content

Conversation

@lcapriotti
Copy link
Contributor

The change is introducing two new optional cmdline options:

--ffmpeg-fout: The output file format when muxing with ffmpeg
--ffmpeg-start-at-zero: When used with ffmpeg and copyts, shift input timestamps so they start at zero

Both options defaults are keeping the predefined values, hence backwards compatibility is enforced.

@lcapriotti lcapriotti requested a review from beardypig January 18, 2020 12:01
@back-to back-to added the awaiting response Waiting for a response label Mar 21, 2020
@beardypig
Copy link
Member

Thanks for the contribution @lcapriotti, this looks like a good idea.

I recommend changing the option to --ffmpeg-no-start-at-zero to disable -start_at_zero.

lcapriotti and others added 5 commits April 7, 2020 13:17
Co-Authored-By: beardypig <beardypig@protonmail.com>
Co-Authored-By: beardypig <beardypig@protonmail.com>
Co-Authored-By: beardypig <beardypig@protonmail.com>
Co-Authored-By: beardypig <beardypig@protonmail.com>
Co-Authored-By: beardypig <beardypig@protonmail.com>
@lcapriotti
Copy link
Contributor Author

Thanks for the contribution @lcapriotti, this looks like a good idea.
TKS!

Co-Authored-By: beardypig <beardypig@protonmail.com>
@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #2774 into master will decrease coverage by 0.17%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #2774      +/-   ##
==========================================
- Coverage   52.87%   52.69%   -0.18%     
==========================================
  Files         246      251       +5     
  Lines       15428    15748     +320     
==========================================
+ Hits         8157     8298     +141     
- Misses       7271     7450     +179     

@back-to back-to removed the awaiting response Waiting for a response label Apr 9, 2020
Co-Authored-By: beardypig <beardypig@protonmail.com>
metadata = options.pop("metadata", {})
maps = options.pop("maps", [])
copyts = options.pop("copyts", False)
start_at_zero = session.options.get("ffmpeg-start-at-zero", True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeError: get() takes 2 positional arguments but 3 were given

there is no default

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should extend Options to support a default, easy to do without making any breaking changes.

diff --git a/src/streamlink/options.py b/src/streamlink/options.py
index 5a208c16..0f442d48 100644
--- a/src/streamlink/options.py
+++ b/src/streamlink/options.py
@@ -33,10 +33,11 @@ class Options(object):
     def set(self, key, value):
         self.options[_normalise_option_name(key)] = value

-    def get(self, key):
+    def get(self, key, default=None):
         key = _normalise_option_name(key)
         if key in self.options:
             return self.options[key]
+        return default

     def update(self, options):
         for key, value in options.items():

@back-to
Copy link
Collaborator

back-to commented Jul 11, 2020

#2892

@back-to back-to closed this Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants