Git Product home page Git Product logo

chompy's Introduction

Chompy

Build

Download and watch videos easily on iOS

Chompy wraps youtube-dl in an API, allowing ad-free downloading and streaming on devices that can't run youtube-dl directly, such as iOS.

Demo Video

Usage

  1. Build & Install via Docker. Sorry, we don't have images published on DockerHub yet.
    • You'll want to set the /downloads volume
  2. Install the associated shortcut and set your hostname.
  3. Trigger a download by sharing a video URL to the shortcut. You can exit while the shortcut is downloading, but you won't be automatically redirected when the download completes.

Show all downloads

You can see all the videos downloaded by visiting /videos

Video Formats

The default format for downloaded videos is mp4, at resolutions up to 1080p. You can see the format string in downloader/options.go.

Set the format for a download by setting the format request parameter. Details on format strings in youtube-dl docs. For instance:

http -v post localhost:8000/download url="https://www.youtube.com/watch?v=L5emxkKNf9Y" format='worstvideo'

Development

Run locally

Dependencies: ffmpeg and youtube-dl. API examples use HTTPie

Run the app

go run ./cmd/chompy

Download something exciting

http -v post localhost:8000/download url="https://www.youtube.com/watch?v=L5emxkKNf9Y"
HTTP/1.1 200 OK
Content-Length: 168
Content-Type: application/json; charset=UTF-8
Date: Thu, 24 Dec 2020 23:40:11 GMT

{
    "filename": "How to Protect Your Shopping Trolley From Improvised Explosives.mp4",
    "path": "/videos/How to Protect Your Shopping Trolley From Improvised Explosives.mp4"
}

Then play it

http 'localhost:8000/videos/How to Protect Your Shopping Trolley From Improvised Explosives.mp4'
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 34311123
Content-Type: video/mp4

Docker

docker build -t chompy .

docker run -p 8000:8000 chompy

chompy's People

Contributors

hebo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.