# IMM - Internet Media Manager (alpha phase)
Play internet videos in desktop media player just like local files and optionally save them offline. IMM can function like conventional media downloaders also.

IMM is a [free-libre](https://www.fsf.org/about/what-is-free-software) software. It respects the [user freedom](https://www.gnu.org/philosophy/free-sw.html).

## Why another media downloader?
IMM is more than a media downloader, it's benefits over a convential media downloader are:
* Play online video or audio in desktop media player as if local file is being played. Have full control of playing experience with powerful desktop media player of your choice such as VLC media player. IMM saves ~1kb m3u file containing media title, duration and url offline. Next time, same video can be played by clicking/double-clicking that .m3u file (opening with IMM). It feels just like playing any other video stored offline.
* With conventional media downloaders one have to compromise between waiting for entire video to download or just watch in briowser without downloading. With IMM, video is played and saved offline simultaneously.
* No more browser slowdown from playing videos inside browser.
* Just as conventional media downloaders, video can be downloaded without playing it. However most downloaders can download only few formats and qualities of a video. Thanks to powerful combination of youtube-dl and ffmpeg, any format and quality can be downloaded and merged.
* Many simple yet powerful configuration options. Such as:
    * Automatically calculate best quality for given internet speed and screen size for bufferless playback. Quality can be selected manually also if desired. But one do not have to do it more than once and can set custom quality prefrence for each website. Next time, those qualities will be automatically selected if available in preference order.
    * Custom cache size such as just 5 or 10 second buffer for limited data internet or 5-10 minute for uninterepted forward and backward seeking. This setting can be configured in many desktop media players and IMM can feed these configurations to desktop media players.
    * Like listening but not watching? only audio can be played of videos if separate video-audio stream available (in most cases they are available).

## Installtion and Configuration
### Installation
* Windows and Mac OS users, Install [python](https://www.python.org/downloads/) 3.5 or above.
* [this should also be done automatically] Download ffmpeg to path or youtube-dl's root directory (Most Gnu/Linux distributions users can simply install it from their package manager. Windows users download it from https://ffmpeg.zeranoe.com/builds/)

### Configure IMM
It is recommended to follow all the below steps to get the most out of imm. However one can now start imm by launching imm (imm.py for windows users).
* [should be done automatically] Add IMM to application list/menu/dashboard as /path/to/imm .Its recommened to add mutiple instances such as:
    * /path/to/imm -p #for directly playing media
    * /path/to/imm -s #for directly playling and saving media simultaneously
    * /path/to/imm -d #for directly downloading media only
    * /path/to/imm -w #for directly adding media to Watch Later folder without playing or downloading it
* [should be done automatically] Add global hotkeys in application list/menu/dashboad to entries added above or by going to globals shortcuts in system settings. Than one can easily copy media urls in browser and press global hotkeys to play, playandsave, downloadonly or watchlater etc.
* [should be done automatically] Set .m3u files to open with imm. Again can add multiple entires as above. And can default as your preffered option like play only.
* add only alias to path/to/imm file or add imm folder to path

## Running IMM
For now IMM can capture meda urls using following ways:
* Arguments recived by imm such as via terminal or browser addon [browser addon not built yet, you can help!]
* from clipboard - copy links to clipboard before executing imm
* direct input/paste when imm ask (if url not found in arguments or clipboard, imm asks to paste url)
* [not implemented yet] batch media urls file

IMM can be launched in following ways:
* Simply lauch 'imm'. Windows users use imm.py (might need to rename to imm.exe).
* directly takeover or execute from browser via browser addon [not implemented]
* global hotkeys for 1.playing, 2.playing and saving simultaneously, 3.download only without playing or 4.add to watch later list. This is the best option until browser addon is build.
* Simply lauch imm's created .m3u files (provided .m3u files are configured to open with imm)

## License
see LICENSE in source tree

Copyright (C) 2019  [coder](https://radii.dev/coder/)
