yt2mp4


Nameyt2mp4 JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/donno2048/yt2mp4
SummaryDownload YouTube videos and playlists as MP4 files (and other formats)
upload_time2022-03-23 15:56:27
maintainer
docs_urlNone
authorElisha Hollander
requires_python>=3.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # yt2mp4

Download YouTube videos and playlists as MP4 files (and other formats)

## Get geckodriver

### Linux (Debian)

```sh
sudo apt install wget ffmpeg firefox-esr -y
wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
sudo tar xvzf geckodriver-v0.30.0-linux64.tar.gz -C /usr/bin/
chmod +x /usr/bin/geckodriver
rm geckodriver-v0.30.0-linux64.tar.gz
```

### Other

Figure it yourself

## Installation

### From PyPI

```sh
pip3 install yt2mp4
```

### From GitHub

```sh
pip3 install git+https://github.com/donno2048/yt2mp4
```

## Usage

### In Python

```py
from yt2mp4 import download
download("dQw4w9WgXcQ", outname='output.mp4') # dowload video from https://www.youtube.com/watch?v=dQw4w9WgXcQ and name it output.mp4
# will also work:
# download("dQw4w9WgXcQ", outname='output.mp4', binary_path=path) # use a different binary path
# download("youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("youtu.be/dQw4w9WgXcQ")
# download("www.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("music.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("https://www.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("https://music.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("https://youtu.be/dQw4w9WgXcQ")
```

### In cmd

```sh
# each of those will convert to another format
yt2mp4 # or python3 -m yt2mp4
yt2webm
yt2mkv
yt2flv
yt2wmv
yt2avi
yt2mov
yt2m4v
yt2mp3
```

### Download playlist

For this you will have to configure a YouTube API key

#### Get API key

1. Go to the [Developer console dashboard](https://console.cloud.google.com/home/dashboard) and click on _CREATE PROJECT_, you can name the project and then press _CREATE_
1. Now go to the [Credentials tab](https://console.cloud.google.com/apis/credentials) and click on _CREATE CREDENTIALS_ and choose _API key_, copy the API key you see and save it somewhere safe, then you can click on _CLOSE_
1. Now go to the [YouTube API tab](https://console.cloud.google.com/apis/api/youtube.googleapis.com) and click on _ENABLE_

#### In Python

```py
from yt2mp4 import download_playlist
download_playlist(id, api_key)
'''
 - the first argument is the id of the playlist, you can pass either of the following forms
                    - https://www.youtube.com/watch?v=***********&list=PLAYLIST_ID
                    - https://www.youtube.com/playlist?list=PLAYLIST_ID
                    - PLAYLIST_ID
 - the second argument is the API key
 - the third is the extension, the default value is 'mp4'
 - the fourth one is the fps, the default value is 60
 - the last one is the binary path to the geckodriver
'''
```

#### In cmd

```sh
# each of those will convert to other formats
ytp2mp4
ytp2webm
ytp2mkv
ytp2flv
ytp2wmv
ytp2avi
ytp2mov
ytp2m4v
ytp2mp3
```

## Supported formats

- mp4
- webm
- mkv
- flv
- wmv
- avi
- mov
- m4v
- mp3 (auto format as audio)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/donno2048/yt2mp4",
    "name": "yt2mp4",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Elisha Hollander",
    "author_email": "just4now666666@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d6/48/62a7e0a5b278313a615ec556ff1975a980d6a971fcc508464762d2537293/yt2mp4-1.0.5.tar.gz",
    "platform": null,
    "description": "# yt2mp4\n\nDownload YouTube videos and playlists as MP4 files (and other formats)\n\n## Get geckodriver\n\n### Linux (Debian)\n\n```sh\nsudo apt install wget ffmpeg firefox-esr -y\nwget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz\nsudo tar xvzf geckodriver-v0.30.0-linux64.tar.gz -C /usr/bin/\nchmod +x /usr/bin/geckodriver\nrm geckodriver-v0.30.0-linux64.tar.gz\n```\n\n### Other\n\nFigure it yourself\n\n## Installation\n\n### From PyPI\n\n```sh\npip3 install yt2mp4\n```\n\n### From GitHub\n\n```sh\npip3 install git+https://github.com/donno2048/yt2mp4\n```\n\n## Usage\n\n### In Python\n\n```py\nfrom yt2mp4 import download\ndownload(\"dQw4w9WgXcQ\", outname='output.mp4') # dowload video from https://www.youtube.com/watch?v=dQw4w9WgXcQ and name it output.mp4\n# will also work:\n# download(\"dQw4w9WgXcQ\", outname='output.mp4', binary_path=path) # use a different binary path\n# download(\"youtube.com/watch?v=dQw4w9WgXcQ\", output=\"output.mov\")\n# download(\"youtu.be/dQw4w9WgXcQ\")\n# download(\"www.youtube.com/watch?v=dQw4w9WgXcQ\", output=\"output.mov\")\n# download(\"music.youtube.com/watch?v=dQw4w9WgXcQ\", output=\"output.mov\")\n# download(\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\", output=\"output.mov\")\n# download(\"https://music.youtube.com/watch?v=dQw4w9WgXcQ\", output=\"output.mov\")\n# download(\"https://youtu.be/dQw4w9WgXcQ\")\n```\n\n### In cmd\n\n```sh\n# each of those will convert to another format\nyt2mp4 # or python3 -m yt2mp4\nyt2webm\nyt2mkv\nyt2flv\nyt2wmv\nyt2avi\nyt2mov\nyt2m4v\nyt2mp3\n```\n\n### Download playlist\n\nFor this you will have to configure a YouTube API key\n\n#### Get API key\n\n1. Go to the [Developer console dashboard](https://console.cloud.google.com/home/dashboard) and click on _CREATE PROJECT_, you can name the project and then press _CREATE_\n1. Now go to the [Credentials tab](https://console.cloud.google.com/apis/credentials) and click on _CREATE CREDENTIALS_ and choose _API key_, copy the API key you see and save it somewhere safe, then you can click on _CLOSE_\n1. Now go to the [YouTube API tab](https://console.cloud.google.com/apis/api/youtube.googleapis.com) and click on _ENABLE_\n\n#### In Python\n\n```py\nfrom yt2mp4 import download_playlist\ndownload_playlist(id, api_key)\n'''\n - the first argument is the id of the playlist, you can pass either of the following forms\n                    - https://www.youtube.com/watch?v=***********&list=PLAYLIST_ID\n                    - https://www.youtube.com/playlist?list=PLAYLIST_ID\n                    - PLAYLIST_ID\n - the second argument is the API key\n - the third is the extension, the default value is 'mp4'\n - the fourth one is the fps, the default value is 60\n - the last one is the binary path to the geckodriver\n'''\n```\n\n#### In cmd\n\n```sh\n# each of those will convert to other formats\nytp2mp4\nytp2webm\nytp2mkv\nytp2flv\nytp2wmv\nytp2avi\nytp2mov\nytp2m4v\nytp2mp3\n```\n\n## Supported formats\n\n- mp4\n- webm\n- mkv\n- flv\n- wmv\n- avi\n- mov\n- m4v\n- mp3 (auto format as audio)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Download YouTube videos and playlists as MP4 files (and other formats)",
    "version": "1.0.5",
    "project_urls": {
        "Bug Reports": "https://github.com/donno2048/yt2mp4/issues",
        "Documentation": "https://github.com/donno2048/yt2mp4#readme",
        "Homepage": "https://github.com/donno2048/yt2mp4",
        "Source Code": "https://github.com/donno2048/yt2mp4"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "249c05858e3bcd62e71bec119d95f1b91b78cca751219a1f6608508bd082d8dc",
                "md5": "e286860ec3fbfe5c71a54578755186b5",
                "sha256": "b8538f04f1d9321596e1165df6cd750f20f543b91861be7185bd7711d84b622a"
            },
            "downloads": -1,
            "filename": "yt2mp4-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e286860ec3fbfe5c71a54578755186b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 4883,
            "upload_time": "2022-03-23T15:56:25",
            "upload_time_iso_8601": "2022-03-23T15:56:25.106836Z",
            "url": "https://files.pythonhosted.org/packages/24/9c/05858e3bcd62e71bec119d95f1b91b78cca751219a1f6608508bd082d8dc/yt2mp4-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d64862a7e0a5b278313a615ec556ff1975a980d6a971fcc508464762d2537293",
                "md5": "7f6833f38478fb4c1079b364c1b1553a",
                "sha256": "2dfd2c3919516d3e56cd4db76ab7d7ababc23054bd4c70f48c51572f39eff4ef"
            },
            "downloads": -1,
            "filename": "yt2mp4-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "7f6833f38478fb4c1079b364c1b1553a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 4700,
            "upload_time": "2022-03-23T15:56:27",
            "upload_time_iso_8601": "2022-03-23T15:56:27.870856Z",
            "url": "https://files.pythonhosted.org/packages/d6/48/62a7e0a5b278313a615ec556ff1975a980d6a971fcc508464762d2537293/yt2mp4-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-03-23 15:56:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "donno2048",
    "github_project": "yt2mp4",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "yt2mp4"
}
        
Elapsed time: 0.11604s