Skip to content

needs_transcode

Function · tgrtmp 0.5.0

Whether source must be transcoded before it can be published. Accepts a path or an open seekable binary file: True means the container is unsupported, the video is not H.264, the audio is not AAC, or there is no video track; False means it can be published as is. It samples the head of the source (a few megabytes), so a pathological file that hides its headers deeper than that reads as needing a transcode.

needs_transcode()(
  source:
) → <class 'bool'>