Codec

bgetlib.codec.extract_audio(audio: bytes, dest: str, is_dolby: bool) subprocess.CompletedProcess[source]

Extract the audio from MP4 container stream

Parameters
  • audio – bytes of audio stream

  • dest – destination of output file

  • is_dolby – weather the codec is dolby (AC-3 or EC-3)

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