MediaSwift


NameMediaSwift JSON
Version 2.4.2 PyPI version JSON
download
home_pagehttps://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT.git
SummaryA MediaSwift PYTHON PACKAGE FOR MEDIA CONVERSION PLAY AND PROBING.
upload_time2024-04-24 05:30:17
maintainerNone
docs_urlNone
authorROHIT SINGH
requires_python>=3.8
licenseMIT
keywords media video conversion probing and playing.
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## `MediaSwift` ⇨ 🚀 EMPOWERING PYTHON WITH ADVANCED MULTIMEDIA OPERATION'S.

[![License](https://img.shields.io/badge/LICENSE-MIT-blue?style=flat-square&logo=gnu%20bash)](https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT/blob/main/LICENSE)

#### ⇨ `MediaSwift` : A POWERFUL PYTHON LIBRARY FOR SEAMLESS MULTIMEDIA OPERATIONS , `MediaSwift` SIMPLIFIES COMPLEX TASKS, MAKING IT EASY TO INTEGRATE AND ENHANCE YOUR MULTIMEDIA APPLICATIONS. DIVE INTO THE FUTURE OF MEDIA HANDLING WITH `MediaSwift` YOUR GO-TO LIBRARY FOR 2024 .

**KEY FEATURES :**

- **EFFORTLESS FILE CONVERSION .**
- **SEAMLESS MULTIMEDIA PLAYBACK .**
- **PROVIDING INFORMATION `MediaSwift` ALSO OFFERS DETAILED MULTIMEDIA INFORMATION RETRIEVAL .**

### EXPLORE THE CAPABILITIES OF `MediaSwift` AND ELEVATE YOUR PYTHON MULTIMEDIA PROJECTS WITH SIMPLICITY AND EFFICIENCY.

- ## SUPPORTED VIDEO CODEC'S :

  `h264`, `libx264`, `mpeg4`, `vp9`, `av1`, `hevc`, `mjpeg`, `H.265 / HEVC`, `VP8`, `VP9`, `AV1`, `VC1`, `MPEG1`, `MPEG2`, `H.263`, `Theora`, `MJPEG`, `MPEG-3`, `MPEG-4` **. . .**

- ## SUPPORTED AUDIO CODEC'S :

  `aac`, `mp3`, `opus`, `vorbis`, `pcm`, `alac`, `flac`, `wv`, `ape`, `mka`, `opus`, `ac3`, `eac3`, `alac` **. . .**

- ## SUPPORTED FILE EXTENSION'S :
  **VIDEO FORMATS :** `.mp4`, `.avi`, `.mkv`, `.webm`, `.mov`, `.wmv`, `.webm`, `.flv`, `.mov`, `.wmv`, `.hevc`, `.prores`, `.dv` **. . .**

**AUDIO FORMATS :** `.mp3`, `.aac`, `.ogg`, `.wav`, `.flac`, `.flac`, `.m4a`, `.ogg`, `.wv`, `.ape`, `.mka`, `.opus`, `mpc`, `.tak`, `.alac` **. . .**

- ## SUPPORTED HARDWARE ACCELERATION :
  **HARDWARE ACCELERATION :** `cuda`, `dxva2`, `qsv`, `d3d11va` **. . .**

## ❗IMPORTANT NOTE:

- **THEY ALSO SUPPORT HARDWARE ACCELERATION FOR MEDIA FILE CONVERTION .**
- **SUPPORT DOLBY DIGITAL PLUS AND DOLBY DIGITAL AUDIO CODEC `.eac3`, `.ac3` .**
- **SUPPORT MORE VIDEO AND AUDIO CODECS AND VARIOUS EXTENSION FORMATE'S .**
- **`MediaSwift`: A VERSATILE LIBRARY WITH MANY SUPPORT AUDIO AND VIDEO CODECS, AS WELL AS MULTIPLE FILE FORMATS EXTENSION .**

- ## LIST THE AVAILABLE `.CODEC'S()`, `.FORMATE'S()` AND `.HWACCEL'S()` :

```python
from MediaSwift import *

INFO = ffpe()

print(INFO.codecs())
print(INFO.formats())
print(INFO.hwaccels())

# GET CODECS ENCODING
print(INFO.codecs(encoder='aac'))

```

- #### ENHANCE COMPATIBILITY BY LEVERAGING THE `.formats()`, `.codecs()` `.hwaccels()` AND METHODS TO VALIDATE SUPPORT FOR A VARIETY OF FORMATS, CODECS AND HARDWARE ACCELERATION .
- #### GET INFORMATION ABOUT THE CODEC'S ENCODER `.codecs(encoder="aac")` .
- ## CHECK LIBRARY VERSION USING :

```python

from MediaSwift import *

# GET AND PRINT AUTHOR INFORMATION
AUTHOR_INFO = author()
print(AUTHOR_INFO)

# GET AND PRINT VERSION INFORMATION
VERSION_INFO = version()
print(VERSION_INFO)

```

- ## EFFICIENT MEDIA PLAYBACK WITH `ffpl` .

#### THE `ffpl` CLASS PROVIDES METHODS FOR PLAY MEDIA FILES. HERE ARE SOME EXAMPLES OF HOW TO USE THESE METHOD:

```python
from MediaSwift import *

# INCREASE VOLUME BY 5 DB
PLAY = ffpl()
MEDIA_FILE = r"PATH_TO_MEDIA_FILE"                                        # PLAY SINGE MEDIA FILE
MEDIA_FILE = r"PATH_TO_MEDIA_FILE_1", r"PATH_TO_MEDIA_FILE_2"             # PLAY MULTIPLE MEDIA FILE

# USE noborder=True TO REMOVE PLAYER WINDOW BORDER.
print(PLAY.play(MEDIA_FILE, volume=5, noborder=True))
print(PLAY.play_multiple(MEDIA_FILE ,volume=5, noborder=True))
```

#### NOTE: USE THE `.play()` METHOD TO PLAY MEDIA FILES .

**`noborder=True` ARGUMENT TO ELIMINATE THE BORDER OF THE PLAYER WINDOW .**
**`volume=True` TO AMPLIFY THE AUDIO OUTPUT IN DECIBELS .**

- ## ANALYZE MEDIA FILE `ffpr`.

#### THE `ffpr` CLASS PROVIDES METHODS FOR PROBING MEDIA FILES. HERE ARE SOME EXAMPLES OF HOW TO USE THESE METHODS :

```python
from MediaSwift import ffpr

DETAILS = ffpr()
INFO = DETAILS.probe(r"PATH_TO_INPUT_FILE")

print(DETAILS.analyze(INFO))

# ENHANCE THE APPEALING CONTENT USING 'pretty=True'.
print(DETAILS.analyze(INFO, pretty=True))
```

**SUBSTITUTE `"PATH_TO_INPUT_FILE"` WITH THE ACTUAL FILE PATH TO YOUR MEDIA FILE. THE `.probe` METHOD RETURNS A DICTIONARY CONTAINING DETAILED INFORMATION ABOUT THE MEDIA FILE. WHEN USING `pretty=True`, THE CONTENT IS DISPLAYED IN A MORE VISUALLY APPEALING FORMAT.**

**SPECIFY `pretty=True` TO DISPLAY THE INFORMATION IN A VISUALLY ENHANCED FORMAT.**

- ## CONVERT MEDIA FILE `ffpe`.

#### `ffpe` CLASS PROVIDES METHODS FOR VIDEO CONVERSION, LISTING CODECS, AND LISTING FORMATS. HERE ARE SOME EXAMPLES OF HOW TO USE THESE METHODS :

**EXAMPLE ⇨ CONVERT SINGLE VIDEO USING THIS :**

```python
from MediaSwift import ffpe

FFMPL = ffpe()

FFMPL.convert(
    input_files = r"PATH_TO_INPUT_FILE" ,         # INPUT FILE PATH
    output_dir =  r"PATH_TO_OUTPUT_FOLDER" ,      # OUTPUT PATH
    cv='h264',        # VIDEO CODEC
    ca='aac',         # AUDIO CODEC
    s='1920x1080',    # VIDEO RESOLUTION
    hwaccel='cuda',   # HARDWARE ACCELERATION
    ar=44100,         # AUDIO SAMPLE RATE
    ac=2,             # AUDIO CHANNELS
    ba='192k',        # AUDIO BITRATE
    r=30,             # VIDEO FRAME RATE
    bv='50m',         # VIDEO BITRATE
    preset='fast',    # PRESET FOR ENCODING
    f='mp4',          # OUTPUT FORMAT

)
```

**EXAMPLE ⇨ CONVERT MULTIPLE VIDEO USING THIS :**
**⇨ NOTE : ALWAYS SET INPUT FILE PATH IN SQUARE '[ ]' BRACKETS:**

```python
from MediaSwift import ffpe

FFPE_INSTANCE = ffpe()

INPUT_FILES = [
    r"PATH_TO_INPUT_FILE",
    r"PATH_TO_INPUT_FILE",
    # ADD MORE FILE PATHS AS NEEDED
]                                                           # INPUT_FILES [MULTIPLE CONVERT]
INPUT_FILES =  r'PATH_TO_INPUT_FILE'                        # INPUT_FILES [SINGLE CONVERT]
OUTPUT_DIR =   r"PATH_TO_OUTPUT_FOLDER"

FFPE_INSTANCE.convert(
    input_files = INPUT_FILES, # INPUT FILE PATH
    output_dir = OUTPUT_DIR,   # OUTPUT PATH
    cv='h264',        # VIDEO CODEC
    ca='aac',         # AUDIO CODEC
    s='1920x1080',    # VIDEO RESOLUTION
    hwaccel='cuda',   # HARDWARE ACCELERATION
    ar=44100,         # AUDIO SAMPLE RATE
    ac=2,             # AUDIO CHANNELS
    ba='192k',        # AUDIO BITRATE
    bv='50m',         # VIDEO BITRATE
    preset='fast',    # PRESET FOR ENCODING
    r=30,             # VIDEO FRAME RATE
    f='mp4',          # OUTPUT FORMAT
)
```

#### EXAMPLE ⇨ CONVERT MULTIPLE VIDEO INTO AUDIO FILE USING THIS :

```python

from MediaSwift import ffpe
FFPE_INSTANCE = ffpe()

# DEFINE INPUT FILES AND OUTPUT DIRECTORY.
INPUT_FILES = [ r'PATH_TO_INPUT_FILE', r'PATH_TO_INPUT_FILE' ]     # INPUT_FILES [MULTIPLE CONVERT]
INPUT_FILES =   r'PATH_TO_INPUT_FILE'                              # INPUT_FILES [SINGLE CONVERT]

OUTPUT_DIR =  r"PATH_TO_OUTPUT_FOLDER"

# PERFORM MULTIMEDIA FILE CONVERSION USING FFPE.
FFPE_INSTANCE.convert(
    input_files=INPUT_FILES,
    output_dir=OUTPUT_DIR ,
    hwaccel="cuda",   # HARDWARE ACCELERATION
    ar=44100,         # AUDIO SAMPLE RATE
    ac=2,             # AUDIO CHANNELS
    ba="192k",        # AUDIO BITRATE
    f="mp3",          # OUTPUT FORMAT (MP3 for audio)
)

```

#### ⇨ NOTE : USE THE `.convert()` METHOD TO CONVERT MEDIA FILES .

**NOTE ⇨ ALWAYS SET MULTIPLE INPUT_FILES PATH IN SQUARE '[ ]' BRACKETS:**

```python

from MediaSwift import *

CONVERTER = ffpe()
INPUT_FILE = r"PATH_TO_INPUT_FILE"  # INPUT FILE
OUTPUT_FILE = r"PATH_TO_INPUT_FILE"  # OUTPUT FILE
TIME_RANGE = "01:30,02:30"  # CLIP FROM 1 MINUTE 30 SECONDS TO 2 MINUTES 30 SECONDS

CONVERTER.MediaClip(INPUT_FILE, OUTPUT_FILE, TIME_RANGE)

```

**NOTE : USE THE `.MediaClip()` METHOD TO EXTRACTS SPECIFIC PART OF VIDEO AND CONVERTS IT INTO GIF.**

- ## 🔎 IMPORT CLASSES AND MODULE :

```python
from MediaSwift import ffpe, ffpl, ffpr
from MediaSwift import *
```

- ## ⚙️ INSTALLATION :

```bash
pip install MediaSwift
```

- ## 😃 AUTHOR INFORMATION :

**THIS PYTHON LIBRARY PROJECT IS DONE BY `ROHIT SINGH` . FOR ANY QUERIES TO CHECK MY GITHUB, THANK YOU FOR USING `MediaSwift` PYTHON LIBRARY,LIBRARY RELEASE IN 2024 .**

[![GitHub Profile](https://img.shields.io/badge/GitHub-ROHIT%20SINGH-blue?style=flat-square&logo=github)](https://github.com/ROHIT-SINGH-1)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT.git",
    "name": "MediaSwift",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "MEDIA VIDEO CONVERSION PROBING AND PLAYING.",
    "author": "ROHIT SINGH",
    "author_email": "rs3232263@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fd/40/11400af9dfdb2f6f4f5f243706c1b857ed9cab62db9b1a5d785d6fef6896/mediaswift-2.4.2.tar.gz",
    "platform": null,
    "description": "## `MediaSwift` \u21e8 \ud83d\ude80 EMPOWERING PYTHON WITH ADVANCED MULTIMEDIA OPERATION'S.\r\n\r\n[![License](https://img.shields.io/badge/LICENSE-MIT-blue?style=flat-square&logo=gnu%20bash)](https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT/blob/main/LICENSE)\r\n\r\n#### \u21e8 `MediaSwift` : A POWERFUL PYTHON LIBRARY FOR SEAMLESS MULTIMEDIA OPERATIONS , `MediaSwift` SIMPLIFIES COMPLEX TASKS, MAKING IT EASY TO INTEGRATE AND ENHANCE YOUR MULTIMEDIA APPLICATIONS. DIVE INTO THE FUTURE OF MEDIA HANDLING WITH `MediaSwift` YOUR GO-TO LIBRARY FOR 2024 .\r\n\r\n**KEY FEATURES :**\r\n\r\n- **EFFORTLESS FILE CONVERSION .**\r\n- **SEAMLESS MULTIMEDIA PLAYBACK .**\r\n- **PROVIDING INFORMATION `MediaSwift` ALSO OFFERS DETAILED MULTIMEDIA INFORMATION RETRIEVAL .**\r\n\r\n### EXPLORE THE CAPABILITIES OF `MediaSwift` AND ELEVATE YOUR PYTHON MULTIMEDIA PROJECTS WITH SIMPLICITY AND EFFICIENCY.\r\n\r\n- ## SUPPORTED VIDEO CODEC'S :\r\n\r\n  `h264`, `libx264`, `mpeg4`, `vp9`, `av1`, `hevc`, `mjpeg`, `H.265 / HEVC`, `VP8`, `VP9`, `AV1`, `VC1`, `MPEG1`, `MPEG2`, `H.263`, `Theora`, `MJPEG`, `MPEG-3`, `MPEG-4` **. . .**\r\n\r\n- ## SUPPORTED AUDIO CODEC'S :\r\n\r\n  `aac`, `mp3`, `opus`, `vorbis`, `pcm`, `alac`, `flac`, `wv`, `ape`, `mka`, `opus`, `ac3`, `eac3`, `alac` **. . .**\r\n\r\n- ## SUPPORTED FILE EXTENSION'S :\r\n  **VIDEO FORMATS :** `.mp4`, `.avi`, `.mkv`, `.webm`, `.mov`, `.wmv`, `.webm`, `.flv`, `.mov`, `.wmv`, `.hevc`, `.prores`, `.dv` **. . .**\r\n\r\n**AUDIO FORMATS :** `.mp3`, `.aac`, `.ogg`, `.wav`, `.flac`, `.flac`, `.m4a`, `.ogg`, `.wv`, `.ape`, `.mka`, `.opus`, `mpc`, `.tak`, `.alac` **. . .**\r\n\r\n- ## SUPPORTED HARDWARE ACCELERATION :\r\n  **HARDWARE ACCELERATION :** `cuda`, `dxva2`, `qsv`, `d3d11va` **. . .**\r\n\r\n## \u2757IMPORTANT NOTE:\r\n\r\n- **THEY ALSO SUPPORT HARDWARE ACCELERATION FOR MEDIA FILE CONVERTION .**\r\n- **SUPPORT DOLBY DIGITAL PLUS AND DOLBY DIGITAL AUDIO CODEC `.eac3`, `.ac3` .**\r\n- **SUPPORT MORE VIDEO AND AUDIO CODECS AND VARIOUS EXTENSION FORMATE'S .**\r\n- **`MediaSwift`: A VERSATILE LIBRARY WITH MANY SUPPORT AUDIO AND VIDEO CODECS, AS WELL AS MULTIPLE FILE FORMATS EXTENSION .**\r\n\r\n- ## LIST THE AVAILABLE `.CODEC'S()`, `.FORMATE'S()` AND `.HWACCEL'S()` :\r\n\r\n```python\r\nfrom MediaSwift import *\r\n\r\nINFO = ffpe()\r\n\r\nprint(INFO.codecs())\r\nprint(INFO.formats())\r\nprint(INFO.hwaccels())\r\n\r\n# GET CODECS ENCODING\r\nprint(INFO.codecs(encoder='aac'))\r\n\r\n```\r\n\r\n- #### ENHANCE COMPATIBILITY BY LEVERAGING THE `.formats()`, `.codecs()` `.hwaccels()` AND METHODS TO VALIDATE SUPPORT FOR A VARIETY OF FORMATS, CODECS AND HARDWARE ACCELERATION .\r\n- #### GET INFORMATION ABOUT THE CODEC'S ENCODER `.codecs(encoder=\"aac\")` .\r\n- ## CHECK LIBRARY VERSION USING :\r\n\r\n```python\r\n\r\nfrom MediaSwift import *\r\n\r\n# GET AND PRINT AUTHOR INFORMATION\r\nAUTHOR_INFO = author()\r\nprint(AUTHOR_INFO)\r\n\r\n# GET AND PRINT VERSION INFORMATION\r\nVERSION_INFO = version()\r\nprint(VERSION_INFO)\r\n\r\n```\r\n\r\n- ## EFFICIENT MEDIA PLAYBACK WITH `ffpl` .\r\n\r\n#### THE `ffpl` CLASS PROVIDES METHODS FOR PLAY MEDIA FILES. HERE ARE SOME EXAMPLES OF HOW TO USE THESE METHOD:\r\n\r\n```python\r\nfrom MediaSwift import *\r\n\r\n# INCREASE VOLUME BY 5 DB\r\nPLAY = ffpl()\r\nMEDIA_FILE = r\"PATH_TO_MEDIA_FILE\"                                        # PLAY SINGE MEDIA FILE\r\nMEDIA_FILE = r\"PATH_TO_MEDIA_FILE_1\", r\"PATH_TO_MEDIA_FILE_2\"             # PLAY MULTIPLE MEDIA FILE\r\n\r\n# USE noborder=True TO REMOVE PLAYER WINDOW BORDER.\r\nprint(PLAY.play(MEDIA_FILE, volume=5, noborder=True))\r\nprint(PLAY.play_multiple(MEDIA_FILE ,volume=5, noborder=True))\r\n```\r\n\r\n#### NOTE: USE THE `.play()` METHOD TO PLAY MEDIA FILES .\r\n\r\n**`noborder=True` ARGUMENT TO ELIMINATE THE BORDER OF THE PLAYER WINDOW .**\r\n**`volume=True` TO AMPLIFY THE AUDIO OUTPUT IN DECIBELS .**\r\n\r\n- ## ANALYZE MEDIA FILE `ffpr`.\r\n\r\n#### THE `ffpr` CLASS PROVIDES METHODS FOR PROBING MEDIA FILES. HERE ARE SOME EXAMPLES OF HOW TO USE THESE METHODS :\r\n\r\n```python\r\nfrom MediaSwift import ffpr\r\n\r\nDETAILS = ffpr()\r\nINFO = DETAILS.probe(r\"PATH_TO_INPUT_FILE\")\r\n\r\nprint(DETAILS.analyze(INFO))\r\n\r\n# ENHANCE THE APPEALING CONTENT USING 'pretty=True'.\r\nprint(DETAILS.analyze(INFO, pretty=True))\r\n```\r\n\r\n**SUBSTITUTE `\"PATH_TO_INPUT_FILE\"` WITH THE ACTUAL FILE PATH TO YOUR MEDIA FILE. THE `.probe` METHOD RETURNS A DICTIONARY CONTAINING DETAILED INFORMATION ABOUT THE MEDIA FILE. WHEN USING `pretty=True`, THE CONTENT IS DISPLAYED IN A MORE VISUALLY APPEALING FORMAT.**\r\n\r\n**SPECIFY `pretty=True` TO DISPLAY THE INFORMATION IN A VISUALLY ENHANCED FORMAT.**\r\n\r\n- ## CONVERT MEDIA FILE `ffpe`.\r\n\r\n#### `ffpe` CLASS PROVIDES METHODS FOR VIDEO CONVERSION, LISTING CODECS, AND LISTING FORMATS. HERE ARE SOME EXAMPLES OF HOW TO USE THESE METHODS :\r\n\r\n**EXAMPLE \u21e8 CONVERT SINGLE VIDEO USING THIS :**\r\n\r\n```python\r\nfrom MediaSwift import ffpe\r\n\r\nFFMPL = ffpe()\r\n\r\nFFMPL.convert(\r\n    input_files = r\"PATH_TO_INPUT_FILE\" ,         # INPUT FILE PATH\r\n    output_dir =  r\"PATH_TO_OUTPUT_FOLDER\" ,      # OUTPUT PATH\r\n    cv='h264',        # VIDEO CODEC\r\n    ca='aac',         # AUDIO CODEC\r\n    s='1920x1080',    # VIDEO RESOLUTION\r\n    hwaccel='cuda',   # HARDWARE ACCELERATION\r\n    ar=44100,         # AUDIO SAMPLE RATE\r\n    ac=2,             # AUDIO CHANNELS\r\n    ba='192k',        # AUDIO BITRATE\r\n    r=30,             # VIDEO FRAME RATE\r\n    bv='50m',         # VIDEO BITRATE\r\n    preset='fast',    # PRESET FOR ENCODING\r\n    f='mp4',          # OUTPUT FORMAT\r\n\r\n)\r\n```\r\n\r\n**EXAMPLE \u21e8 CONVERT MULTIPLE VIDEO USING THIS :**\r\n**\u21e8 NOTE : ALWAYS SET INPUT FILE PATH IN SQUARE '[ ]' BRACKETS:**\r\n\r\n```python\r\nfrom MediaSwift import ffpe\r\n\r\nFFPE_INSTANCE = ffpe()\r\n\r\nINPUT_FILES = [\r\n    r\"PATH_TO_INPUT_FILE\",\r\n    r\"PATH_TO_INPUT_FILE\",\r\n    # ADD MORE FILE PATHS AS NEEDED\r\n]                                                           # INPUT_FILES [MULTIPLE CONVERT]\r\nINPUT_FILES =  r'PATH_TO_INPUT_FILE'                        # INPUT_FILES [SINGLE CONVERT]\r\nOUTPUT_DIR =   r\"PATH_TO_OUTPUT_FOLDER\"\r\n\r\nFFPE_INSTANCE.convert(\r\n    input_files = INPUT_FILES, # INPUT FILE PATH\r\n    output_dir = OUTPUT_DIR,   # OUTPUT PATH\r\n    cv='h264',        # VIDEO CODEC\r\n    ca='aac',         # AUDIO CODEC\r\n    s='1920x1080',    # VIDEO RESOLUTION\r\n    hwaccel='cuda',   # HARDWARE ACCELERATION\r\n    ar=44100,         # AUDIO SAMPLE RATE\r\n    ac=2,             # AUDIO CHANNELS\r\n    ba='192k',        # AUDIO BITRATE\r\n    bv='50m',         # VIDEO BITRATE\r\n    preset='fast',    # PRESET FOR ENCODING\r\n    r=30,             # VIDEO FRAME RATE\r\n    f='mp4',          # OUTPUT FORMAT\r\n)\r\n```\r\n\r\n#### EXAMPLE \u21e8 CONVERT MULTIPLE VIDEO INTO AUDIO FILE USING THIS :\r\n\r\n```python\r\n\r\nfrom MediaSwift import ffpe\r\nFFPE_INSTANCE = ffpe()\r\n\r\n# DEFINE INPUT FILES AND OUTPUT DIRECTORY.\r\nINPUT_FILES = [ r'PATH_TO_INPUT_FILE', r'PATH_TO_INPUT_FILE' ]     # INPUT_FILES [MULTIPLE CONVERT]\r\nINPUT_FILES =   r'PATH_TO_INPUT_FILE'                              # INPUT_FILES [SINGLE CONVERT]\r\n\r\nOUTPUT_DIR =  r\"PATH_TO_OUTPUT_FOLDER\"\r\n\r\n# PERFORM MULTIMEDIA FILE CONVERSION USING FFPE.\r\nFFPE_INSTANCE.convert(\r\n    input_files=INPUT_FILES,\r\n    output_dir=OUTPUT_DIR ,\r\n    hwaccel=\"cuda\",   # HARDWARE ACCELERATION\r\n    ar=44100,         # AUDIO SAMPLE RATE\r\n    ac=2,             # AUDIO CHANNELS\r\n    ba=\"192k\",        # AUDIO BITRATE\r\n    f=\"mp3\",          # OUTPUT FORMAT (MP3 for audio)\r\n)\r\n\r\n```\r\n\r\n#### \u21e8 NOTE : USE THE `.convert()` METHOD TO CONVERT MEDIA FILES .\r\n\r\n**NOTE \u21e8 ALWAYS SET MULTIPLE INPUT_FILES PATH IN SQUARE '[ ]' BRACKETS:**\r\n\r\n```python\r\n\r\nfrom MediaSwift import *\r\n\r\nCONVERTER = ffpe()\r\nINPUT_FILE = r\"PATH_TO_INPUT_FILE\"  # INPUT FILE\r\nOUTPUT_FILE = r\"PATH_TO_INPUT_FILE\"  # OUTPUT FILE\r\nTIME_RANGE = \"01:30,02:30\"  # CLIP FROM 1 MINUTE 30 SECONDS TO 2 MINUTES 30 SECONDS\r\n\r\nCONVERTER.MediaClip(INPUT_FILE, OUTPUT_FILE, TIME_RANGE)\r\n\r\n```\r\n\r\n**NOTE : USE THE `.MediaClip()` METHOD TO EXTRACTS SPECIFIC PART OF VIDEO AND CONVERTS IT INTO GIF.**\r\n\r\n- ## \ud83d\udd0e IMPORT CLASSES AND MODULE :\r\n\r\n```python\r\nfrom MediaSwift import ffpe, ffpl, ffpr\r\nfrom MediaSwift import *\r\n```\r\n\r\n- ## \u2699\ufe0f INSTALLATION :\r\n\r\n```bash\r\npip install MediaSwift\r\n```\r\n\r\n- ## \ud83d\ude03 AUTHOR INFORMATION :\r\n\r\n**THIS PYTHON LIBRARY PROJECT IS DONE BY `ROHIT SINGH` . FOR ANY QUERIES TO CHECK MY GITHUB, THANK YOU FOR USING `MediaSwift` PYTHON LIBRARY,LIBRARY RELEASE IN 2024 .**\r\n\r\n[![GitHub Profile](https://img.shields.io/badge/GitHub-ROHIT%20SINGH-blue?style=flat-square&logo=github)](https://github.com/ROHIT-SINGH-1)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A MediaSwift PYTHON PACKAGE FOR MEDIA CONVERSION PLAY AND PROBING.",
    "version": "2.4.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT/issues",
        "Documentation": "https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT/blob/main/README.md",
        "Homepage": "https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT.git",
        "Source Code": "https://github.com/ROHIT-SINGH-1/PYTHON-MEDIASWIFT"
    },
    "split_keywords": [
        "media",
        "video",
        "conversion",
        "probing",
        "and",
        "playing."
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f34b872ec3007e1109235161d0f6b5725fbb16b967b05080e7c4d6195796d7c0",
                "md5": "8bd7b7655c87c77b3c9b6ac2fbbf2dc4",
                "sha256": "44bb84ef976f8bc197823ab09c0ec6050a146c0889ad1d3de5f9faf7e7e3ed96"
            },
            "downloads": -1,
            "filename": "MediaSwift-2.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8bd7b7655c87c77b3c9b6ac2fbbf2dc4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 64977487,
            "upload_time": "2024-04-24T05:29:54",
            "upload_time_iso_8601": "2024-04-24T05:29:54.590613Z",
            "url": "https://files.pythonhosted.org/packages/f3/4b/872ec3007e1109235161d0f6b5725fbb16b967b05080e7c4d6195796d7c0/MediaSwift-2.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd4011400af9dfdb2f6f4f5f243706c1b857ed9cab62db9b1a5d785d6fef6896",
                "md5": "4e0df5dea48358ee326fe9207e2de67a",
                "sha256": "973921b303be342cee37c2b9bce1cfef0ed0468eb680696158a59f73da0f4c4f"
            },
            "downloads": -1,
            "filename": "mediaswift-2.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4e0df5dea48358ee326fe9207e2de67a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 64977121,
            "upload_time": "2024-04-24T05:30:17",
            "upload_time_iso_8601": "2024-04-24T05:30:17.750459Z",
            "url": "https://files.pythonhosted.org/packages/fd/40/11400af9dfdb2f6f4f5f243706c1b857ed9cab62db9b1a5d785d6fef6896/mediaswift-2.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 05:30:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ROHIT-SINGH-1",
    "github_project": "PYTHON-MEDIASWIFT",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mediaswift"
}
        
Elapsed time: 0.22043s