Skip to content

Commit

Permalink
Merge pull request #7 from thrkll/code-refactoring
Browse files Browse the repository at this point in the history
Code refactoring
  • Loading branch information
thrkll authored Feb 21, 2023
2 parents e7f247c + 9835d05 commit bac1e69
Show file tree
Hide file tree
Showing 7 changed files with 448 additions and 367 deletions.
70 changes: 41 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,96 @@
# 📺 ruv-dl
# 📺 ruv-dl

[![Python](https://img.shields.io/badge/Python_3-3776AB?logo=python&logoColor=white)](https://opensource.org/licenses/MIT)
[![License: MIT](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT)
[![Release](https://img.shields.io/github/v/release/thrkll/ruv-dl)]()

### Download media content from ruv.is
### Download media content from ruv.is

`ruv-dl` is a simple Python CLI tool to download media content from ruv.is.
`ruv-dl` is a simple Python command-line tool to download media content from [RÚV](https://ruv.is).

## ✨ Features

🔹 FFmpeg wrapper to download TV and radio programs from ruv.is given a provided URL

🔹 Optionally include metadata that is used by ruv.is, such as images, text and subtitle files
🔹 Optionally include metadata that is used by RÚV, such as images, text description and subtitle files

🔹 Select video quality and file formats supported by FFmpeg
🔹 Choose between resolutions offered by RÚV and file formats supported by FFmpeg

![ruv-dl download](/img/download.svg)

## ⚡️ Installation
## ⚡️ Installation

1. Clone the repository to install `ruv-dl`.
Clone the repository to install `ruv-dl`:

`$ git clone https://github.com/thrkll/ruv-dl.git`
`$ git clone https://github.com/thrkll/ruv-dl`

2. Install dependencies.
Install dependencies:

`$ pip install -r requirements.txt`

## ⚙️ Requirements

🔹Python 3.6+
Python 3.6+

🔹[FFmpeg](https://ffmpeg.org/download.html) in path
[FFmpeg](https://ffmpeg.org/download.html) in path

## 📖 Usage

## 📖 Usage
### Basic download

#### Basic download

Find the link to whatever it is you want to waste your time on. Succeeding the input argument `-i` , paste in the URL. By default, the media file will download under the name RÚV defines it in best given quality.
Find the link to whatever it is you want to waste your time on and paste the URL after the input argument `-i`.

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1`

#### Resolution
By default, `ruv-dl` will download the mediafile at the highest bitrate offered by RÚV (3600kbps). To download at a worse resolution, use the `-r` argument. 5 is best, 1 is worst.
### Resolution

By default, `ruv-dl` will download the mediafile at the best resolution offered by RÚV - 3600kbps at 1920x1080 (25fps). To download at a worse resolution, use the `-r` argument. 1 is best, 3 is worst.

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1 -r 2`

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1 -r 4`
### Folder structure

#### Folder structure
If you are fancy 🎩 - make sure to include the `-f` argument. This will bundle the media file in a fancy folder together with all images and text description provided by RÚV.
If you are fancy 🎩 - make sure to include the `-f` argument. This will bundle the media file in a fancy folder together with all images and text description provided by RÚV.

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1 -f`

#### Subtitles
### Subtitles

Most video content on ruv.is comes with Icelandic :iceland: subtitles. `ruv-dl` will attempt to download these files and convert them to .srt files. To include them in the download, use the `-s` argument.

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1 -f -s`

#### Filetypes
By default, all files will download as .mp4. But for the true snob 🧑‍🎨 `ruv-dl` can use any file format supported by FFmpeg. Use the `-t` argument to specify the format.
### Filetypes

By default, all files will download as .mp4. But for the true snob, `ruv-dl` can use any file format supported by FFmpeg. Use the `-t` argument to specify the format.

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1 -t mkv`

#### Help argument
### Different FFmpeg location

When you eventually forget everything you've read here, you can use the `--help` argument.
In the optimal setup, FFMpeg will be available in the `$PATH`. Alternatively you can specify the location of the FFmpeg installation folder using the `-l` argument.

`$ python ruv-dl.py -i https://ruv.is/sjonvarp/spila/sample/30726/950qj1 -l C:/ffmpeg/`

Note that depending on your FFmpeg build, you might need to link to `../ffmpeg/bin`.

### Help

When you eventually forget everything you've read here, you can use the `--help` argument.

![Help argument](/img/help.svg)


## ⚒️ Project assistance

Please raise an issue if you run into any trouble or have a feature request. Feel free to contribute and make pull requests. Mark this project with a star ⭐ if you like it and let your friends hear about it.
Please raise an issue if you have a feature request or run into trouble (not unlikely given frequent changes at ruv.is.) Feel free to contribute and make pull requests. Mark the project with a star ⭐ if you like it.

## 🚚 Versions

📦 2.0.0 - 01 2023 - CLI version of ruv-dl with argparse
📦 2.1.0 - 2023 02 - Complete refactoring, new features added

📦 2.0.0 - 2023 01 - CLI version of ruv-dl with argparse

📦 1.0.0 - 09 2019 - Initial release
📦 1.0.0 - 2019 09 - Initial release

## ⚠️ Licence

Expand Down
86 changes: 43 additions & 43 deletions img/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bac1e69

Please sign in to comment.