Giter Site home page Giter Site logo

jgarte / impd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajatt-tools/impd

1.0 1.0 0.0 133 KB

AJATT-style passive listening and condensed audio without bloat.

Home Page: https://tatsumoto-ren.github.io/blog/passive-listening

License: GNU General Public License v3.0

Shell 97.02% Makefile 2.98%

impd's Introduction

Immersion pod

Chat Channel License Patreon

AJATT-style passive listening and condensed audio without bloat.

Passive immersion is one of the key activities in AJATT. This program lets mpd users convert foreign language movies and TV shows to audio and use it for passive listening. impd supports condensed audio and creates it by default if it finds subtitles in the container or externally.

Installation

Arch Linux users can install the impd-git AUR package and skip to Configuration.

  1. Install dependencies

  2. Clone the repo

    $ git clone 'https://github.com/Ajatt-Tools/impd.git' ~/.local/share/impd
    
  3. Link the impd executable somewhere in your PATH

    $ ln -s ~/.local/share/impd/impd ~/.local/bin/impd
    

Configuration

To configure the program create a config file at ~/.config/immersionpod/config.

Available options:

  • langs - A comma-separated list of languages, in the order of preference. impd will try to extract audio and use subtitles in the specified language. If the required language is not found, it will try the next preference. If you don't know the code for your language, run impd probe on a desired video file.
  • prefer_internal_subs - Try to use internal subtitles when creating condensed audio. If impd fails to do so, it tries external subtitles. If the option is set to no, impd tries external subtitles first.
  • video_dir - The default directory where your video files are stored. The directory is searched for recently added files when you call impd rotate.
  • bitrate - Audio bitrate. It is recommended to keep it rather low to save disk space because impd deals with speech, not music. Speech doesn't require high bitrates.
  • recent_threshold - A file is considered recent if it has been modified in the last X days. Audio files that are no longer recent get archived if you call impd archive, and videos get skipped if you call impd add_recent.
  • padding - Set a pad to the dialog timings. For example, 0.5 = half a second.
  • music_dir - Custom music directory. Set it only when impd fails to automatically detect your music directory.

Example config file:

langs=jpn,eng,rus,ukr,fre,spa,ger,por,ita,ara,dut
prefer_internal_subs=yes
video_dir=~/Videos/ongoing
bitrate=32k
recent_threshold=10
padding=0.2

The config file is sourced so don't put stuff like $ rm -rf ~/* there, or it will bite you back.

Usage

Tip: If you store all your immersion material in video_dir like me the only command you are going to need is impd rotate.

Available commands:

  • add [OPTION] FILE - Convert videos to audio and add them to Immersion pod.

    Arguments for impd add:

    • -r, --recent - Add files modified in the last recent_threshold days from your video directory to Immersion pod.
    • -s, --stdin - Read filenames from stdin.
  • condense -i video [-o audio] [-s subtitles] - Make condensed audio and store it in an arbitrary location.

  • archive - Move episodes older than recent_threshold days to the archive folder.

  • reshuffle - Re-add files to the playlist, shuffle them and start playing.

  • rotate - Archive old immersion material and make new based on videos in your video directory. Equivalent to impd add --recent > impd archive > impd reshuffle.

Optional arguments:

  • -f, --force - Overwrite existing files.
  • -n, --no-condense - Don't condense audio.

Examples:

$ impd add -f 'video.mkv'
$ impd add --recent
$ find /mnt/videos/ | impd add --stdin
$ impd rotate

Tip: Add impd rotate as a cronjob or bind it to any key in your DE, WM, sxhkd, xbindkeysrc, etc.

Additionally, you can use impd to perform miscellaneous operations on media.

  • to_srt file.ass file.srt - Convert file to srt.
  • make_condensed video.mkv condensed.ogg - Convert video to condensed audio.
  • extract_audio video.mkv audio.ogg - Extract audio from video without condensing.
  • extract_subtitles video.mkv subtitles.srt - Extract internal subtitles.
  • probe [a|s] video.mkv - Print tracks available in the container.

Condensing

For condensing to work the video files passed to impd should have embedded subtitles or external .srt/.ass subtitles should be placed in the same folder as the video files or in a subfolder relative to the directory that contains the video files. External subtitles should have the same names as the corresponding video files except for the extensions.

Contributions

If you want to discuss this program, have found a bug, or want to participate in the development, please join our community. I look forward to suggestions and pull requests!

My special thanks to all my Patreon supporters for making this project possible.

impd's People

Contributors

tatsumoto-ren avatar

Stargazers

 avatar

Watchers

 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.