Skip to content

Automatically download and set the ffmpeg in system path

License

Notifications You must be signed in to change notification settings

erdogant/ffmpeg_setpath

Repository files navigation

ffmpeg-setpath

Python Pypi Docs LOC Downloads Downloads License Forks Issues Project Status GitHub Repo stars GitHub repo size Donate

  • ffmpeg-setpath is Python package

Star this repo if you like it! ⭐️

ffmpeg-setpath is to set the path for ffmpeg for Windows environments. It will download ffmpeg and include the paths into the system environment. There are multiple steps that are taken to set the ffmpeg path in the system environment.

The following steps are automated:

  • Step 1. Download the ffmpeg file.
  • Step 2. Store the files in the temp-directory or the provided dirpath.
  • Step 3. Add the /bin directory to system environment.

Installation

pip install ffmpeg-setpath            # normal install
pip install --upgrade ffmpeg-setpath # or update if needed

Set ffmpeg to your system environment:

from ffmpeg_setpath import ffmpeg_setpath
ffmpeg_setpath()

Specify your ffmpeg directory:

from ffmpeg_setpath import ffmpeg_setpath
ffmpeg_setpath(dirpath=r'c:/ffmpeg/')

Start all over and force download all files, unzip, and set to system environment:

from ffmpeg_setpath import ffmpeg_setpath
ffmpeg_setpath(force=True)

Set specified path in environment

import ffmpeg_setpath as ff
f.set_path(dirpath=r'c:/temp/ffmpeg/')

Check whether path or string exists in system

import ffmpeg_setpath as ff

# Check for path
out_bool = ff.check(r'c:/ffmpeg/bin', exact_match=True)

# Check for string
out_list = ff.check(r'ffmpeg', exact_match=False)

Force to set path in env

import ffmpeg_setpath as ff

ff.set_path(r'c:/temp/ffmpeg/')

Remove specified path from environment

import ffmpeg_setpath as ff

ff.remove(r'c:\ffmpeg1\bin')

Show all paths in environment

import ffmpeg_setpath as ff

ff.printe()

References

Contribute

  • All kinds of contributions are welcome!
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

Licence

See LICENSE for details.

About

Automatically download and set the ffmpeg in system path

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages