Skip to content

Flac compression level #60

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

Open
wants to merge 1 commit into
base: base-sha/d451fff587558c118c1097e27d6051cb13f31803
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ttt.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ def audio_notification(audiofile, apobj, body, title):
"-c:a",
"flac",
flacfile,
"-compression_level",
"12",
Comment on lines +238 to +239

Choose a reason for hiding this comment

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

suggestion (edge_case_not_handled): Consider validating the compression level for ffmpeg.

Ensure that the compression level '12' is within the valid range for ffmpeg to prevent runtime errors or unexpected behavior.

Suggested change
"-compression_level",
"12",
"-compression_level",
str(max(0, min(12, 12))),

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

Choose a reason for hiding this comment

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

Is the comment type correct?

Choose a reason for hiding this comment

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

Is the comment area correct?

Choose a reason for hiding this comment

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

Should this comment become an LLM test?

Comment on lines +238 to +239

Choose a reason for hiding this comment

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

suggestion (testing): Missing tests for the new compression level parameter in FLAC encoding.

The addition of a new parameter to the ffmpeg command line should be accompanied by tests to verify that the parameter is correctly applied and that it affects the output as expected. Please add unit tests to cover this new functionality.

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

Choose a reason for hiding this comment

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

Is the comment type correct?

Choose a reason for hiding this comment

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

Is the comment area correct?

Choose a reason for hiding this comment

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

Should this comment become an LLM test?

]
subprocess.run(ffmpeg_cmd, check=True, capture_output=True)

Expand Down