Codec

bgetlib.codec.extract_audio(audio: bytes, dest: str, quality: bgetlib.models.QualityOptions) subprocess.CompletedProcess[source]

Extract the audio from MP4 container stream

Parameters
  • audio – bytes of audio stream

  • dest – destination of output file

  • quality – Quality Options, contain dolby_audio: bool, flac_audio: bool

Returns

CompletedProcess

bgetlib.codec.merge(audio: bytes, video: bytes, dest: str) subprocess.CompletedProcess[source]

Merge the video and audio stream downloaded

Parameters
  • audio – bytes of audio stream

  • video – bytes of video stream

  • dest – destination of output file

Returns

CompletedProcess