Skip to content

plan-do-break-fix/loopify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Loopify

Loopify provides a small command line utility for rotating an audio file around a cut point so the track can loop seamlessly. The script relies on ffmpeg and ffprobe to split the file, swap the halves, and (if necessary) re-encode the resulting audio stream.

Quick start

  1. Install FFmpeg so that the ffmpeg and ffprobe commands are available on your PATH.
  2. Run the helper script with Python:
    python loopify_audio.py <input-file> <cut-seconds>
    The script writes the loopified audio file alongside the original input with .loopified inserted before the file extension.

Usage

python loopify_audio.py INPUT_PATH CUT_SECONDS [-o OUTPUT] [--force]
  • INPUT_PATH: path to the source audio file.
  • CUT_SECONDS: timestamp that marks the rotation point. Provide a positive value to measure seconds from the beginning, or a negative value to measure from the end of the track.
  • -o, --output: optional output path. Defaults to <stem>.loopified<suffix> next to the source file.
  • --force: overwrite the destination if it already exists.

Example:

python loopify_audio.py song.mp3 12.5 -o intro-loop.mp3

If the supplied cut is exactly at the start (0 seconds) the tool simply copies the input to the destination without modification. When concatenation via stream copy is not possible, ffmpeg falls back to transcoding the audio using a codec inferred from the destination file extension.

About

Utilities for creating smooth looping media

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages