pyguymer3.media.return_subtitle_format

pyguymer3.media.return_subtitle_format(fname, /, *, cwd=None, debug=True, ensureNFC=True, ffprobePath=None, playlist=-1, timeout=60.0)[source]

Return the format of the first subtitle stream in a media file

This function will return a pretty string of the format of the first subtitle stream in a media file.

Parameters:
  • fname (str) – the media file

  • cwd (str, optional) – the directory to change to before running “ffprobe”

  • debug (bool, optional) – print debug messages

  • ffprobePath (str, optional) – the path to the “ffprobe” binary (if not provided then Python will attempt to find the binary itself)

  • playlist (int, optional) – for media files containing playlists, specify which playlist wants to be surveyed

  • timeout (float, optional) – the timeout for any requests/subprocess calls

Returns:

fmt – the format as a pretty string

Return type:

str

Notes

Copyright 2017 Thomas Guymer [1]

References