/lofify

a tiny program that adds randomly selected lofi track to create perfect ambiance for boring screen recordings

Primary LanguageShell

🎵 Lofify

buildStatus latestVersion Twitter: theapache64

A simple shell utility to add lofi background music to your videos.

lofify takes videos, adds randomly selected lofi track from collection, with smooth fade-in and fade-out effects, to create perfect ambiance for boring screen recordings 🤷🏼

demo.mp4

Features

  • 🎲 Randomly selects lofi background tracks
  • 🎚️ Option to overlay or completely replace original audio
  • 🔊 Smart fade-in and fade-out effects
  • ⏱️ Automatically trims audio to match video length
  • 🎯 Random starting point selection for variety

Usage

Basic Usage

Add lofi background music to your video (overlaying with original audio):

lofify /path/to/your/video.mp4

Replace Original Audio

To completely replace the original audio with lofi music:

lofify /path/to/your/video.mp4 -r

Output

The processed video will be saved as [original_name]_lofi.mp4 in the same directory as the original video.

Prerequisites

Before installing Lofify, make sure you have the following dependencies:

  • ffmpeg: Required for audio/video processing

  • bc: Required for floating-point calculations

    • macOS: brew install bc
    • Ubuntu/Debian: sudo apt install bc

Quick Installation

Install Lofify with a single command:

curl -s https://raw.githubusercontent.com/theapache64/lofify/master/install.sh | bash

or

wget -qO- https://raw.githubusercontent.com/theapache64/lofify/master/install.sh | bash

This will:

  • Install the Lofify script to your ~/bin directory
  • Set up sample lofi audio files in ~/lofi_audios
  • Add ~/bin to your PATH (if not already there)

After installation, you may need to restart your terminal or run source ~/.bashrc or source ~/.zshrc to make the command available in your current session.

Manual Installation

If you prefer manual installation:

  1. Clone the repository:

    git clone https://github.com/theapache64/lofify.git
  2. Make the script executable:

    chmod +x lofify.sh
  3. Move the script to a directory in your PATH:

    mkdir -p ~/bin
    cp lofify.sh ~/bin/lofify
  4. Create a directory for lofi audio files:

    mkdir -p ~/lofi_audios
  5. Copy the sample lofi audio files:

    cp -r lofi_audios/* ~/lofi_audios/
  6. Add ~/bin to your PATH (if not already there):

    echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc  # or ~/.zshrc
    source ~/.bashrc  # or source ~/.zshrc

Adding Your Own Lofi Tracks

To add your own lofi tracks:

  1. Place your audio files (MP3, WAV, or OGG format) in the ~/lofi_audios directory:

    cp your_lofi_track.mp3 ~/lofi_audios/
  2. That's it! Lofify will now include your tracks in the random selection.

Examples

Add lofi background to a screen recording:

lofify ~/Desktop/screen_recording.mp4

Replace audio in a tutorial video:

lofify ~/Videos/tutorial.mp4 -r

Author

👤 theapache64

Feel free to ping me 😉

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Open an issue first to discuss what you would like to change.
  2. Fork the Project
  3. Create your feature branch (git checkout -b feature/amazing-feature)
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a pull request

Please make sure to update tests as appropriate.

❤ Show your support

Give a ⭐️ if this project helped you!

Patron Link Buy Me A Coffee

License

Copyright © 2025 - theapache64

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This README was generated by readgen