Skip to content

radiopushka/LiveBackground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Backgrounds DWM

Live Background Animator for DWM Linux

Live Backgrounds DWM is a lightweight program designed to animate live backgrounds for the DWM window manager on Linux systems. The program uses video or GIF conversions to run as animated backgrounds with low CPU usage and optimized performance.

Features

  • FPS Control: Fine-tune the frame rate to reduce CPU consumption.
  • Frame Amount Control: Manage the number of frames to display.
  • Low CPU Usage: Optimized to run smoothly even on older CPUs.
  • Efficient Conversion: Convert videos or GIFs into live background formats with clear, sharp results.

Installation Instructions

Requirements:

  • FFmpeg with the openh264 library installed.

    On Gentoo Linux, add openh264 to the use flags and re-emerge ffmpeg:

    sudo emerge --newuse ffmpeg

Installation Steps:

  1. Clone the repository:

    git clone https://github.com/radiopushka/LiveBackground
    cd LiveBackground
  2. Build the program:

    make
  3. Run the video conversion script to convert an MP4 or GIF file:

    ./videconv.sh <video_file>

    The script will generate a directory with the .output suffix, containing the converted frames.

  4. You can now copy the livebg binary to any location of your choice:

    cp livebg /usr/local/bin/
  5. Optionally, copy the conversion scripts to easily convert videos in the future:

    cp gifcon.sh videconv.sh /usr/local/bin/

Usage

After converting an MP4 or GIF to a live background directory, you can run the program using the following syntax:

livebg :0 ./directory.output 20 0
  • :0 is the X11 display ID.
  • ./directory.output is the output folder generated by the conversion script.
  • 20 is the frame rate (FPS).
  • 0 is the frame skip modulus.

Tips

  • you can run the videoconv.sh script with o following the filename like for example videoconv.sh sample.mp4 o
  • this will optimize the output for better CPU performorance while still keeping the image relatively sharp.
  • It will reduce render CPU usage by half but it will make the image ever so slightly grainy. This could be worth it to get better FPS.
  • you can also edit the imagio/imagio.h header file and change the color rendering threshold, this can make things wack so do this at your own risk.

Performance:

On an Intel i7 8th generation, both X11 and the program will consume approximately 1.9-2.5% of one CPU core at 20 FPS. For higher frame rates (e.g., 24 FPS on an i5), CPU usage could increase to 4-5%, with animation-heavy renders like "The Drive."

Note:

The MP4 conversion via the shell script provides a sharp and clear background.

Contributing

If you'd like to contribute to this project, feel free to contact me at 87.7fmradiopushka@gmail.com.

License

This project is licensed under the Public Domain.


Readme formated by ChatGPT

About

Live Background animator for DWM Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors