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

Add feature: audio normalization during transcoding #1230

Closed
wants to merge 2 commits into from

Conversation

YiranDuan721
Copy link
Contributor

@YiranDuan721 YiranDuan721 commented Nov 7, 2023

Motivation and Context

Reason for this feature: #1206
With the new feature, this problem can be avoided: #1186

Description

Applies the loudnorm filter of ffmpeg during transcoding. Parameters are chosen according to the EBU recommendation R128.
Results of some experiments with this method

Steps for Testing

Prerequisites:

  • Any video(s) with one audio track
  • To test locally:
    • Mock the struct StreamContext with only one member variable transcodingCmd: *exec.Cmd;
    • Mock the method StreamContext.getStreamName(void): string by returning any string (will be used in log information);
    • Mock the method StreamContext.getRecordingFileName(void): string by returning the directory of the video to test;
    • Mock the method StreamContext.getTranscodingFileName(void): string by returning the directory of the output video (with a proper file extension, such as .mp4)
  1. Initialize a variable, say sc, of the mocked type StreamContext, with transcodingCmd = nil
  2. Call function transcode(streamCtx: *StreamContext): error with the parameter &sc
  3. Get transcoded video, of which the audio is normalized

…first pass of loudnorm filter, and store the information in the struct InfoForAudioNormalization. The information will be used in the second pass.
…eg: Apply the second pass of ffmpeg's loudnorm filter, by adding the filter to the ffmpeg command of transcoding.

fixed #1186 fixed #1206
Copy link

github-actions bot commented Nov 7, 2023

Your Testserver will be ready at https://1230.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

Copy link
Collaborator

@alexanderstephan alexanderstephan left a comment

Choose a reason for hiding this comment

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

Maybe we should wait here and rebase onto https://github.com/TUM-Dev/gocast/tree/enh/runner.

@YiranDuan721 YiranDuan721 reopened this Nov 8, 2023
@YiranDuan721
Copy link
Contributor Author

I'll rewrite the change to runner once possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants