Skip to main content

Extract audio, individual frames, short clips and GIFs from videos.

Project description

PyPI Downloads tests

VideoXT is a simple library and CLI tool for extracting audio, individual frames, short clips and GIFs from videos.

See the documentation for more details.


Installation

Available on pypi.

pip install videoxt

Usage

From the command-line:

# extract audio from a video file (default: 'mp3')
$ videoxt audio MyVideo.mp4
{"video": {"filepath": "C:/Users/gurrutia/MyVideo.mp4", ...}, "start_time": 0, ...}
# extracting audio...
{"success": true, ...}
$ ls
MyVideo.mp4  MyVideo.mp3

As a library:

$ python
>>> # extract all frames from a video file (default: 'jpg')
>>> import videoxt
>>> filepath = 'C:/Users/gurrutia/MyVideo.mp4'  # or <class 'pathlib.Path'>
>>> result = videoxt.extract_frames(filepath)  # or videoxt.extract('frames', filepath)
>>> result.destpath
pathlib.Path('C:/Users/gurrutia/MyVideo.mp4_frames')
>>> result.elapsed_time
3.14159265358979323
>>> len(list(result.destpath.glob('*.jpg'))) # default: 'jpg'
100  # number of frames extracted
>>> result.json()
{'success': True, ...}

Contributing

For guidance on setting up a development environment and to make a contribution, see the contributing guidelines.


Used By

  • Best Buy Teen Tech Center at Grand St. Settlement, allowing filmmaking instructors to gather film stills that aid in constructing lesson plans for their youth workshops. Download a workshop example here.

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

videoxt-1.1.6.tar.gz (42.9 kB view hashes)

Uploaded Source

Built Distribution

videoxt-1.1.6-py3-none-any.whl (49.0 kB view hashes)

Uploaded Python 3

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