cs-ffmpegutils


Namecs-ffmpegutils JSON
Version 20241122 PyPI version JSON
download
home_pageNone
SummaryConvenience facilities for using FFmpeg (ffmpeg.org), with invocation via `ffmpeg-python`.
upload_time2024-11-22 09:29:34
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseGNU General Public License v3 or later (GPLv3+)
keywords python3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Convenience facilities for using FFmpeg (ffmpeg.org),
with invocation via `ffmpeg-python`.

*Latest release 20241122*:
Honour the $FFMPEG_DOCKER_IMAGE environment variable.

## <a name="ConversionSource"></a>Class `ConversionSource(builtins.tuple)`

ConversionSource(src, srcfmt, start_s, end_s)

*`ConversionSource.end_s`*:
Alias for field number 3

*`ConversionSource.src`*:
Alias for field number 0

*`ConversionSource.srcfmt`*:
Alias for field number 1

*`ConversionSource.start_s`*:
Alias for field number 2

## <a name="convert"></a>`convert(*srcs, dstpath: str, doit=True, dstfmt=None, ffmpeg_exe=None, fstags: Optional[cs.fstags.FSTags] = <function <lambda> at 0x10a3b6950>, 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`.

## <a name="ffmpeg_docker"></a>`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, output_hostdir: Optional[str] = None) -> Optional[subprocess.CompletedProcess]`

Invoke `ffmpeg` using docker.

## <a name="FFmpegSource"></a>Class `FFmpegSource`

A representation of an `ffmpeg` input source.

*`FFmpegSource.add_as_input(self, ff)`*:
Add as an input to `ff`.
Return `None` if `self.source` is a pathname,
otherwise return the file descriptor of the data source.

Note: because we rely on `ff.input('pipe:')` for nonpathnames,
you can only use a nonpathname `FFmpegSource` for one of the inputs.
This is not checked.

*`FFmpegSource.promote(source)`*:
Promote `source` to an `FFmpegSource`.

## <a name="ffprobe"></a>`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).

## <a name="main_ffmpeg_docker"></a>`main_ffmpeg_docker(argv=None)`

The `ffm[peg-docker` command line implementation.

## <a name="MetaData"></a>Class `MetaData(cs.tagset.TagSet)`

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

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

*`MetaData.options(self)`*:
Compute the FFmpeg -metadata option strings and return as a list.

# Release Log



*Release 20241122*:
Honour the $FFMPEG_DOCKER_IMAGE environment variable.

*Release 20240519*:
ffmpeg_docker: set DockerRun.output_hostdir from the output file dirname.

*Release 20240316.1*:
DISTINFO fix.

*Release 20240316*:
Fixed release upload artifacts.

*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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cs-ffmpegutils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python3",
    "author": null,
    "author_email": "Cameron Simpson <cs@cskk.id.au>",
    "download_url": "https://files.pythonhosted.org/packages/2d/d1/b1455d0564032fe9d32c892f396776a2e95b31cead1096beb608ca082bc8/cs_ffmpegutils-20241122.tar.gz",
    "platform": null,
    "description": "Convenience facilities for using FFmpeg (ffmpeg.org),\nwith invocation via `ffmpeg-python`.\n\n*Latest release 20241122*:\nHonour the $FFMPEG_DOCKER_IMAGE environment variable.\n\n## <a name=\"ConversionSource\"></a>Class `ConversionSource(builtins.tuple)`\n\nConversionSource(src, srcfmt, start_s, end_s)\n\n*`ConversionSource.end_s`*:\nAlias for field number 3\n\n*`ConversionSource.src`*:\nAlias for field number 0\n\n*`ConversionSource.srcfmt`*:\nAlias for field number 1\n\n*`ConversionSource.start_s`*:\nAlias for field number 2\n\n## <a name=\"convert\"></a>`convert(*srcs, dstpath: str, doit=True, dstfmt=None, ffmpeg_exe=None, fstags: Optional[cs.fstags.FSTags] = <function <lambda> at 0x10a3b6950>, conversions=None, metadata: Optional[dict] = None, timespans=(), overwrite=False, acodec=None, vcodec=None, extra_opts=None) -> List[str]`\n\nTranscode video to `dstpath` in FFMPEG compatible `dstfmt`.\n\n## <a name=\"ffmpeg_docker\"></a>`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, output_hostdir: Optional[str] = None) -> Optional[subprocess.CompletedProcess]`\n\nInvoke `ffmpeg` using docker.\n\n## <a name=\"FFmpegSource\"></a>Class `FFmpegSource`\n\nA representation of an `ffmpeg` input source.\n\n*`FFmpegSource.add_as_input(self, ff)`*:\nAdd as an input to `ff`.\nReturn `None` if `self.source` is a pathname,\notherwise return the file descriptor of the data source.\n\nNote: because we rely on `ff.input('pipe:')` for nonpathnames,\nyou can only use a nonpathname `FFmpegSource` for one of the inputs.\nThis is not checked.\n\n*`FFmpegSource.promote(source)`*:\nPromote `source` to an `FFmpegSource`.\n\n## <a name=\"ffprobe\"></a>`ffprobe(input_file, *, doit=True, ffprobe_exe='ffprobe', quiet=False)`\n\nRun `ffprobe -print_format json` on `input_file`,\nreturn format, stream, program and chapter information\nas an `AttrableMapping` (a `dict` subclass).\n\n## <a name=\"main_ffmpeg_docker\"></a>`main_ffmpeg_docker(argv=None)`\n\nThe `ffm[peg-docker` command line implementation.\n\n## <a name=\"MetaData\"></a>Class `MetaData(cs.tagset.TagSet)`\n\nObject containing fields which may be supplied to ffmpeg's -metadata option.\n\n*`MetaData.__init__(self, format, **kw)`*:\npylint: disable=redefined-builtin\n\n*`MetaData.options(self)`*:\nCompute the FFmpeg -metadata option strings and return as a list.\n\n# Release Log\n\n\n\n*Release 20241122*:\nHonour the $FFMPEG_DOCKER_IMAGE environment variable.\n\n*Release 20240519*:\nffmpeg_docker: set DockerRun.output_hostdir from the output file dirname.\n\n*Release 20240316.1*:\nDISTINFO fix.\n\n*Release 20240316*:\nFixed release upload artifacts.\n\n*Release 20240201*:\n* New $FFMPEG_EXE envvar.\n* convert: use $FFMPEG_EXE, return the ffmpeg argv.\n* convert: include the media type in DEFAULT_CONVERSIONS, refactor the choice of codec conversion.\n* convert: supply dummy results if doit is false - could do with some finesse.\n* ffmpeg_docker: use DockerRun.{add_input,add_output}.\n* New main_ffmpeg_docker to support the ffmpeg-docker command, add ffmpeg-docker to DISTINFO scripts.\n\n*Release 20231202*:\nInitial PyPI release.\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3 or later (GPLv3+)",
    "summary": "Convenience facilities for using FFmpeg (ffmpeg.org), with invocation via `ffmpeg-python`.",
    "version": "20241122",
    "project_urls": {
        "MonoRepo Commits": "https://bitbucket.org/cameron_simpson/css/commits/branch/main",
        "Monorepo Git Mirror": "https://github.com/cameron-simpson/css",
        "Monorepo Hg/Mercurial Mirror": "https://hg.sr.ht/~cameron-simpson/css",
        "Source": "https://github.com/cameron-simpson/css/blob/main/lib/python/cs/ffmpegutils.py"
    },
    "split_keywords": [
        "python3"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e481b2a589b9213f3d4817f3f1954adc43686154ee1327fc25d9ea101d211e2a",
                "md5": "e786a3c8ad162cc0dc60a8b3e2d86603",
                "sha256": "5f2eef25788e6cfdbfd7333e4b0e68d6e8010141de0a92bef3368fd0684f4436"
            },
            "downloads": -1,
            "filename": "cs_ffmpegutils-20241122-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e786a3c8ad162cc0dc60a8b3e2d86603",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7695,
            "upload_time": "2024-11-22T09:29:32",
            "upload_time_iso_8601": "2024-11-22T09:29:32.909153Z",
            "url": "https://files.pythonhosted.org/packages/e4/81/b2a589b9213f3d4817f3f1954adc43686154ee1327fc25d9ea101d211e2a/cs_ffmpegutils-20241122-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2dd1b1455d0564032fe9d32c892f396776a2e95b31cead1096beb608ca082bc8",
                "md5": "fcda2d6edcffe507369dce40d3660cde",
                "sha256": "61d801383c762b0dbf5d15fb2be420e94d6a32b3991b05da91b6f272c451b8c8"
            },
            "downloads": -1,
            "filename": "cs_ffmpegutils-20241122.tar.gz",
            "has_sig": false,
            "md5_digest": "fcda2d6edcffe507369dce40d3660cde",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7269,
            "upload_time": "2024-11-22T09:29:34",
            "upload_time_iso_8601": "2024-11-22T09:29:34.742830Z",
            "url": "https://files.pythonhosted.org/packages/2d/d1/b1455d0564032fe9d32c892f396776a2e95b31cead1096beb608ca082bc8/cs_ffmpegutils-20241122.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 09:29:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cameron-simpson",
    "github_project": "css",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cs-ffmpegutils"
}
        
Elapsed time: 0.37128s