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

Enforce transcoding of incompatible audio track(s) #220

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

izzytwosheds
Copy link
Contributor

We had special handling for VP8/VP9 video transcoding when we enforced audio to OPUS codec. Recently an issue #215 was reported where transcoding from MOV to MP4 failed because MOV file contained an audio track in audio/raw format which did not have an encoder, which could be fixed by enforcing AAC codec for AVC/HEVC videos. In this PR we fix both problems by introducing more general approach to audio codec enforcement:

  • we use video MIME type to determine if audio codec is compatible with video codec in target video. If not compatible, we transcode audio as well if incompatible audio is asked to be coped to target "as is"
  • for H.264 formats (AVC, HEVC) audio/raw is listed as incompatible and will be transcoded to AAC
  • for VP8/VP9 format any non-OPUS or non-VORBIS audio track is listed as incompatible and will be transcoded to OPUS
  • if target audio format is passed, we respect that and do not enforce audio transcoding

@izzytwosheds izzytwosheds merged commit 12c4536 into linkedin:main Oct 17, 2022
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