{"id":13740883,"url":"https://github.com/moeoverflow/animeloop-cli","last_synced_at":"2025-05-08T20:32:50.901Z","repository":{"id":83762509,"uuid":"81578762","full_name":"moeoverflow/animeloop-cli","owner":"moeoverflow","description":"Automatically detect and cut anime loops.","archived":false,"fork":false,"pushed_at":"2019-12-18T12:33:08.000Z","size":92,"stargazers_count":98,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-21T00:24:13.867Z","etag":null,"topics":["anime","animeloop","loop","loop-video","opencv","video"],"latest_commit_sha":null,"homepage":"https://animeloop.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moeoverflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-10T15:32:55.000Z","updated_at":"2025-04-08T08:30:39.000Z","dependencies_parsed_at":"2023-07-19T22:01:32.116Z","dependency_job_id":null,"html_url":"https://github.com/moeoverflow/animeloop-cli","commit_stats":{"total_commits":38,"total_committers":5,"mean_commits":7.6,"dds":"0.10526315789473684","last_synced_commit":"5211fdc7a4b7ee84f696f53eceb28eb2bd861831"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeoverflow%2Fanimeloop-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeoverflow%2Fanimeloop-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeoverflow%2Fanimeloop-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moeoverflow%2Fanimeloop-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moeoverflow","download_url":"https://codeload.github.com/moeoverflow/animeloop-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251569549,"owners_count":21610575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anime","animeloop","loop","loop-video","opencv","video"],"created_at":"2024-08-03T04:00:53.257Z","updated_at":"2025-05-08T20:32:50.849Z","avatar_url":"https://github.com/moeoverflow.png","language":"C++","readme":"# animeloop-cli\n![Animeloop Logo](https://s3.moeoverflow.com/animeloop-production/static/animeloop.gif)\n\nAnimeloop command line tool. The goal of this project is to automatically find and cut out the looping fragments in Japanese anime. \n\nFor details, please see my [technical report(English)](https://s3.moeoverflow.com/animeloop-production/static/technical_report_en.pdf), [technical report(Chinese)](https://s3.moeoverflow.com/animeloop-production/static/technical_report_zh.pdf). ([technical_report_output_example](https://s3.moeoverflow.com/animeloop-production/static/technical_report_output_example.zip)) ([technical_report_resources](https://s3.moeoverflow.com/animeloop-production/static/technical_report_resources.zip))\n\n## Installation\n\n### Install via Arch Linux User Repository (aur)\n#### with [yaourt](https://wiki.archlinux.org/index.php/Yaourt)\n``` Shell\nyaourt -S animeloop-cli\n```\n\n### Docker\n\n```Shell\ndocker build -t animeloop-cli .\n\n# You should change these path: /path/to/input/file.mp4 and /path/to/ouput\ndocker run \\\n-v /path/to/input/file.mp4:/data/file.mp4 \\\n-v /path/to/ouput:/loops \\\n--rm \\\nanimeloop-cli \\\n-i /data/file.mp4 \\\n-o /loops\n```\n\n### Install manually\n\n#### Modules Init\n\n``` Shell\ngit submodule init\ngit submodule update\n```\n\n\n#### Dependencies\n\n##### macOS\n\n``` Shell\n# OpenCV\nbrew tap homebrew/science\nbrew install opencv3 --with-contrib --with-ffmpeg --c++11\n\n# Boost\nbrew install boost\n\n# FFmpeg\nbrew install ffmpeg\n\n# Jsoncpp\nbrew install jsoncpp\n```\n\n##### Debian/Ubuntu\n\n``` Shell\n# OpenCV\n\n# compiler\nsudo apt-get install build-essential\n# required\nsudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev\n# optional\n# sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev\n\nmkdir opencv\ncd opencv\n\nwget https://github.com/opencv/opencv/archive/3.3.1.zip -O opencv-3.3.1.zip\nunzip opencv-3.3.1.zip\ncd opencv-3.3.1\n\nmkdir build\ncd build\ncmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..\n\nmake -j $(nproc)\n\n# Boost\nsudo apt-get install libboost-all-dev\n\n# FFmpeg !!!! ffmpeg version 3.x required !!!!\nsudo add-apt-repository ppa:jonathonf/ffmpeg-3\nsudo apt update \u0026\u0026 sudo apt install ffmpeg libav-tools x264 x265\n## downgrade FFmpeg\nsudo apt install ppa-purge \u0026\u0026 sudo ppa-purge ppa:jonathonf/ffmpeg-3\n\n# Jsoncpp\nsudo apt-get install libjsoncpp-dev\n```\n\n##### Arch Linux\n\n```Shell\n# Boost\npacman -S boost\n\n# OpenCV\npacman -S opencv\npacman -S hdf5\n\n# Jsoncpp\npacman -S jsoncpp\n```\n\n##### Windows MinGW\n\n```shell\n# - MinGW build require tool MSYS2, you sould download and install it first, then use pacman in MSYS2 Enviroment\n#\n# - Assume you're building to mingw64, if you'd like to build to mingw32, replace `mingw-w64-x86_64` with `mingw-w64-i686`\n#\n# - Some packages are updated and not compatible, so some of the steps are using `pacman -U` to install specific version\n#   packages with USTC Mirrors, you can change `https://mirrors.ustc.edu.cn/msys2/mingw/x86_64/` to other sources.\n\n# Build deps\npacman -S libintl mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-make\n\n# Boost\n# - It seems that when using Boost 1.66+ will cause build fail\npacman -U https://mirrors.ustc.edu.cn/msys2/mingw/x86_64/mingw-w64-x86_64-boost-1.64.0-3-any.pkg.tar.xz\n\n# OpenCV\npacman -U https://mirrors.ustc.edu.cn/msys2/mingw/x86_64/mingw-w64-x86_64-opencv-3.4.3-2-any.pkg.tar.xz\npacman -S mingw-w64-x86_64-hdf5\n\n# Jsoncpp\n# - JSONCPP comes with cmake, so if you've install cmake manually, you're not needed to install JSONCPP again\npacman -S mingw-w64-x86_64-jsoncpp jsoncpp-devel\n\n# FFmpeg\n# - Some dll files are missing in MSYS2 MinGW64 FFmpeg package, so you should download it from other builds\n# - You can also download it later, as it's not build dependency (but runtime dependency)\n# pacman -U https://mirrors.ustc.edu.cn/msys2/mingw/x86_64/mingw-w64-x86_64-ffmpeg-3.4.2-1-any.pkg.tar.xz\nwget https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-3.4.2-win64-static.zip\nunzip -p ffmpeg-3.4.2-win64-static.zip ffmpeg-3.4.2-win64-static/bin/ffmpeg.exe \u003e /mingw64/bin/ffmpeg.exe\n```\n\n##### Windows via Microsoft Visual Studio\n\n- Download and install [Microsoft Visual Studio](https://visualstudio.microsoft.com/)\n  \n\u003e Will uses Visual Studio 2015 Enterprise (VC14) as example for below.\n\n- Download [CMake-GUI](https://cmake.org/download/)\n\n- Download [Boost prebuilt library](https://sourceforge.net/projects/boost/files/boost-binaries/) for VC14\n\t\n\u003e You may need a older version (\u003c 1.66.0) in case of some unknown bug.\n\n- Download [OpenCV prebuilt library](https://opencv.org/releases/) for Windows\n\t\n\u003e OpenCV should be 3.2+ but not 4.x\n\n- Download [HDF5 prebuilt library](https://www.hdfgroup.org/downloads/hdf5) for VC14\n\t\u003e You may need an account to download the file, you can register for free or build your own.\n\t\u003e If you don't want to install the msi package, run `msiexec /a drive:\\path\\to\\file.msi /qb TARGETDIR=drive:\\path\\to\\extract`\n\n- Download [JSONCPP prebuilt library](http://access.osvr.com/binary/deps/jsoncpp) for VC14\n\n\u003e You should grab a FFmpeg 3.x binary from https://ffmpeg.zeranoe.com/ to make it works.\n\n\u003e You should download OpenH264 1.7.0+ library file from https://github.com/cisco/openh264/releases manually.\n\n\u003e If you want to use it on Windows, always use backslash to set file path like `D:\\path\\to\\video.mp4`, even under MSYS2 or Cygwin, or boost cannot find the specific path.\n\n\u003e You may also need Visual C++ 2015 Redistributable.\n\n#### Compile \u0026 Build\n\n##### Xcode\n\nOpen `animeloop-cli.xcodeproj` and run it.\n\n(if you compile opencv source code by yourself, you maybe need edit `Linked Frameworks and Libraries` settings in Xcode project.)\n\n##### CMake (*nix)\n\n``` Shell\ncd animeloop-cli\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake animeloop-cli\n```\n\n##### MSYS2 + MinGW + CMake (Windows)\n\n``` Shell\ncd animeloop-cli\nmkdir build \u0026\u0026 cd build\ncmake -G \"MinGw Makefiles\" ..\nmingw32-make.exe animeloop-cli\n```\n\n## Usage\n\n```Shell\nanime loop video generator.\n\nUsage:\n  animeloop [OPTION...]\n\n  -h, --help              Show animeloop help\n  -v, --version           Show animeloop version\n  -i, --input arg         Input video file path\n  -o, --output arg        Output video directory path (default: .)\n      --title arg         Title name of the source video (default:\n                          \u003cfilename\u003e)\n  -t, --thread arg        Program run in n threads. (default: \u003ccpu core\n                          number\u003e)\n      --min-duration arg  Minimum duration (second) of loop video (default:\n                          0.6)\n      --max-duration arg  Maximum duration (second) of loop video (default:\n                          6.0)\n      --cover             Output loop video cover image.\n\n\n# Example\n./animeloop-cli -i ~/your-video-file --max-duration 4 --min-duration 1.0 --cover -o ~/Downloads/\n```\n\n## Special Thanks\n\n* [@ccloli](https://github.com/ccloli) for Windows build support\n\n## License\n\nThis project is available under the MIT License. See the LICENSE file for more info.","funding_links":[],"categories":["Image Processing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeoverflow%2Fanimeloop-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoeoverflow%2Fanimeloop-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoeoverflow%2Fanimeloop-cli/lists"}