Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose the highest bitrate audio #21

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
output/
temp/
/.vscode

# common python cache, build, etc
__pycache__/
*.py[cod]
*$py.class

64 changes: 24 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,45 @@
Downloads segmented audio+video from Vimeo and saves as .mp4
vimeo-download
================

This script is useful for cases where youtube-dl is unable to find the master url,
for example on pages that require login or cookies.
Download vimeo video from master.json.

Installation
=======
Basically totally rewritten from [the original](https://github.com/eMBee/vimeo-download). Supports multi-thread downloading.

Install requirements with `pip install -r requirements.txt`
Installation
-------------

### Installing ffmpeg

Compilation instruction: https://trac.ffmpeg.org/wiki/CompilationGuide

**For ubuntu users:**

sudo add-apt-repository ppa:mc3man/trusty-media && sudo apt-get update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8E51A6D660CD88D67D65221D90BD7EACED8E640A
sudo apt-get install ffmpeg

(The instructions are taken from [here](http://help.ubuntu.ru/wiki/ffmpeg) - warning: Russian!)

**For MacOS users:**

brew install ffmpeg
* Clone the repo.
* Install requirements with `pip install -r requirements.txt`

Make sure you have ffmpeg installed and in your PATH.


Usage
=====
-----

To use this script, the master url needs to be manually extracted from the page:

`python vimeo-download.py --url "http://...master.json?base64_init=1" --output <optional_name>`
`python vimeo-download.py "http://...master.json?base64_init=1" --output <optional_name>`

To get the master url:

1. Open the network tab in the inspector
2. Find the url of a request to the `master.json` file
3. Run the script with the url as argument

You can download multiple files in parallel with GNU Parallel:

`parallel -a master-files.txt python vimeo-download.py --url "{}"`

Where `master-files.txt` contains a list of master URLs


Acknowledgements
=======

Code merges the following gists:
Full help:

- https://gist.github.com/alexeygrigorev/a1bc540925054b71e1a7268e50ad55cd
- https://gist.github.com/tayiorbeii/d78c7e4b338b031ce8090b30b395a46f
- https://gist.github.com/paschoaletto/7f65b7e36b76ccde9fe52b74b62ab9df
usage: vimeo-download.py [-h] [--output OUTPUT] [--info] [--skip-merge] [--threads THREADS] [--test] url

Alternatives
============
positional arguments:
url master json url

For a more convenient experience use youtube-dl ( http://rg3.github.io/youtube-dl/ ) if youtube-dl is able to find the url
options:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
output video filename
--info, -i print info and exit
--skip-merge downloads only and doesn't merge
--threads THREADS, -n THREADS
number of threads to use (default: 10)
--test INTERNAL USAGE ONLY: test mode, only download first 100 segments.
17 changes: 3 additions & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
asn1crypto==0.22.0
cffi==1.10.0
cryptography==1.8.1
enum34==1.1.6
idna==2.5
ipaddress==1.0.18
packaging==16.8
pycparser==2.17
pyOpenSSL==17.0.0
pyparsing==2.2.0
requests==2.13.0
six==1.10.0
tqdm==4.11.2
urllib3==1.21.1
requests
urllib3
tqdm
Loading