Metadata-Version: 2.1
Name: cs.ffmpegutils
Version: 20240201
Summary: Convenience facilities for using FFmpeg (ffmpeg.org), with invocation via `ffmpeg-python`.
Home-page: https://bitbucket.org/cameron_simpson/css/commits/all
Author: Cameron Simpson
Author-email: Cameron Simpson <cs@cskk.id.au>
License: GNU General Public License v3 or later (GPLv3+)
Project-URL: URL, https://bitbucket.org/cameron_simpson/css/commits/all
Keywords: python3
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Description-Content-Type: text/markdown
Requires-Dist: cs.dockerutils >=20240201
Requires-Dist: cs.fstags >=20240201
Requires-Dist: cs.lex >=20231018
Requires-Dist: cs.logutils >=20230212
Requires-Dist: cs.mappings >=20231129
Requires-Dist: cs.pfx >=20230604
Requires-Dist: cs.psutils >=20231129
Requires-Dist: cs.tagset >=20240201
Requires-Dist: ffmpeg-python
Requires-Dist: typeguard

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.
