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
- 🎲 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
Add lofi background music to your video (overlaying with original audio):
lofify /path/to/your/video.mp4
To completely replace the original audio with lofi music:
lofify /path/to/your/video.mp4 -r
The processed video will be saved as [original_name]_lofi.mp4
in the same directory as the original video.
Before installing Lofify, make sure you have the following dependencies:
-
ffmpeg: Required for audio/video processing
- macOS:
brew install ffmpeg
- Ubuntu/Debian:
sudo apt install ffmpeg
- Other systems: Visit ffmpeg.org/download.html
- macOS:
-
bc: Required for floating-point calculations
- macOS:
brew install bc
- Ubuntu/Debian:
sudo apt install bc
- macOS:
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.
If you prefer manual installation:
-
Clone the repository:
git clone https://github.com/theapache64/lofify.git
-
Make the script executable:
chmod +x lofify.sh
-
Move the script to a directory in your PATH:
mkdir -p ~/bin cp lofify.sh ~/bin/lofify
-
Create a directory for lofi audio files:
mkdir -p ~/lofi_audios
-
Copy the sample lofi audio files:
cp -r lofi_audios/* ~/lofi_audios/
-
Add
~/bin
to your PATH (if not already there):echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc source ~/.bashrc # or source ~/.zshrc
To add your own lofi tracks:
-
Place your audio files (MP3, WAV, or OGG format) in the
~/lofi_audios
directory:cp your_lofi_track.mp3 ~/lofi_audios/
-
That's it! Lofify will now include your tracks in the random selection.
lofify ~/Desktop/screen_recording.mp4
lofify ~/Videos/tutorial.mp4 -r
👤 theapache64
- Twitter: @theapache64
- Email: theapache64@gmail.com
Feel free to ping me 😉
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Open an issue first to discuss what you would like to change.
- Fork the Project
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a pull request
Please make sure to update tests as appropriate.
Give a ⭐️ if this project helped you!
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 ❤