Skip to main content

Convenience facilities for using FFmpeg (ffmpeg.org), with invocation via `ffmpeg-python`.

Project description

Convenience facilities for using FFmpeg (ffmpeg.org), with invocation via ffmpeg-python.

Latest release 20240201:

  • New $FFMPEG_EXE envvar.
  • convert: use $FFMPEG_EXE, return the ffmpeg argv.
  • convert: include the media type in DEFAULT_CONVERSIONS, refactor the choice of codec conversion.
  • convert: supply dummy results if doit is false - could do with some finesse.
  • ffmpeg_docker: use DockerRun.{add_input,add_output}.
  • New main_ffmpeg_docker to support the ffmpeg-docker command, add ffmpeg-docker to DISTINFO scripts.

Class ConversionSource(builtins.tuple)

ConversionSource(src, srcfmt, start_s, end_s)

Method ConversionSource.__new__(_cls, src, srcfmt, start_s, end_s): Create new instance of ConversionSource(src, srcfmt, start_s, end_s)

Function convert(*srcs, dstpath: str, doit=True, dstfmt=None, ffmpeg_exe=None, fstags: cs.fstags.FSTags, conversions=None, metadata: Optional[dict] = None, timespans=(), overwrite=False, acodec=None, vcodec=None, extra_opts=None) -> List[str]

Transcode video to dstpath in FFMPEG compatible dstfmt.

Function ffmpeg_docker(*ffmpeg_args: Iterable[str], docker_run_opts: Union[List[str], Mapping, NoneType] = None, doit: Optional[bool] = None, quiet: Optional[bool] = None, ffmpeg_exe: Optional[str] = None, docker_exe: Optional[str] = None, image: Optional[str] = None, outputpath: str = '.') -> Optional[subprocess.CompletedProcess]

Invoke ffmpeg using docker.

Class FFmpegSource

A representation of an ffmpeg input source.

Function ffprobe(input_file, *, doit=True, ffprobe_exe='ffprobe', quiet=False)

Run ffprobe -print_format json on input_file, return format, stream, program and chapter information as an AttrableMapping (a dict subclass).

Function main_ffmpeg_docker(argv=None)

The ffm[peg-docker command line implementation.

Class MetaData(cs.tagset.TagSet, builtins.dict, cs.dateutils.UNIXTimeMixin, cs.lex.FormatableMixin, cs.lex.FormatableFormatter, string.Formatter, cs.mappings.AttrableMappingMixin)

Object containing fields which may be supplied to ffmpeg's -metadata option.

Method MetaData.__init__(self, format, **kw): pylint: disable=redefined-builtin

Release Log

Release 20240201:

  • New $FFMPEG_EXE envvar.
  • convert: use $FFMPEG_EXE, return the ffmpeg argv.
  • convert: include the media type in DEFAULT_CONVERSIONS, refactor the choice of codec conversion.
  • convert: supply dummy results if doit is false - could do with some finesse.
  • ffmpeg_docker: use DockerRun.{add_input,add_output}.
  • New main_ffmpeg_docker to support the ffmpeg-docker command, add ffmpeg-docker to DISTINFO scripts.

Release 20231202: Initial PyPI release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs.ffmpegutils-20240201.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

cs.ffmpegutils-20240201-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file cs.ffmpegutils-20240201.tar.gz.

File metadata

  • Download URL: cs.ffmpegutils-20240201.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for cs.ffmpegutils-20240201.tar.gz
Algorithm Hash digest
SHA256 976bbef4be6b43bd24be012c6d1fcaaad67c5180d52dd478f0bc7b239f210766
MD5 ec9f1c5195206296b2bb4abab03eba30
BLAKE2b-256 4d23b4e804daae1a1139028f69bc6386f5f7d898139531e1bf0851a204c3364d

See more details on using hashes here.

File details

Details for the file cs.ffmpegutils-20240201-py3-none-any.whl.

File metadata

File hashes

Hashes for cs.ffmpegutils-20240201-py3-none-any.whl
Algorithm Hash digest
SHA256 6f441f74fa8916fd9ab55abdb5534d374a1f28bed70f120a8177e3cb52ae0c6d
MD5 934bac9ecc0555ea647e0642727a18ba
BLAKE2b-256 bc741598143560682202e2fa198bf6e9b6cd181f4c572c8ae7d3eaa616e31bfb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page