Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix framerate autodetection edge case #128

Merged

Conversation

joeyparrish
Copy link
Member

Closes #127

@joeyparrish joeyparrish requested a review from theodab November 3, 2022 20:15
@joeyparrish joeyparrish merged commit aacabdc into shaka-project:main Nov 3, 2022
@joeyparrish joeyparrish deleted the fix-frame-rate-detection branch November 3, 2022 20:17
# float.
fraction = frame_rate_string.split('/')
fraction = frame_rate_string.split('|')[0].split('/')
Copy link
Contributor

Choose a reason for hiding this comment

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

@joeyparrish, sorry for the late comment, but I observed the same issue for the resolution_string too.

Traceback (most recent call last):
  File "/usr/local/bin/shaka-streamer", line 126, in <module>
    sys.exit(main())
  File "/usr/local/bin/shaka-streamer", line 105, in main
    with controller.start(args.output, input_config_dict, pipeline_config_dict,
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/controller_node.py", line 179, in start
    self._input_config = InputConfig(input_config_dict)
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/input_configuration.py", line 405, in __init__
    super().__init__(dictionary)
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/configuration.py", line 325, in __init__
    value = self._check_and_convert_type(field, key, value)
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/configuration.py", line 381, in _check_and_convert_type
    return [self._check_and_convert_type(subfield, key, v) for v in value]
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/configuration.py", line 381, in <listcomp>
    return [self._check_and_convert_type(subfield, key, v) for v in value]
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/configuration.py", line 368, in _check_and_convert_type
    sub_object = field.type(value)
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/input_configuration.py", line 248, in __init__
    self.resolution = autodetect.get_resolution(self)
  File "/Users/hmishinev/Projects/Reedsy/shaka-streamer/streamer/autodetect.py", line 156, in get_resolution
    width_string, height_string = resolution_string.split('|')
ValueError: too many values to unpack (expected 2)

Copy link
Member Author

Choose a reason for hiding this comment

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

Since I don't have the content that is triggering this, can you please fork and send a PR that resolves all autodetect issues for you?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure thing 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

@joeyparrish, #129 addresses all the issues that I met.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you!

@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to parse the frame rate string
3 participants