u/EdmondDantes20755

▲ 2 r/ffmpeg

set "sourcedir=%cd%"
set "outputdir=%cd%\output"
PUSHD "%sourcedir%"
if not exist "%outputdir%" mkdir "%outputdir%"
for %%F in (*.avi *.flv *.mkv *.mov *.mp4 *.mpeg *.mpg *.webm *.wmv) DO ffmpeg -i "%%F" -filter_complex "[0:v]split[f][b];[b]reverse[r];[r]trim=start_frame=1[r2];[f][r2]concat=n=2:v=1[v]" -map "[v]" "%outputdir%\%%~nF.mp4"
POPD

this short bash script transforms video (or videos) inside of a folder into a boomerang loop
the loop should go like this: A to B to B(first frame removed) to A(last frame removed) so that it loops perfectly with no duplicate frames when the video player has the loop mode enabled

the current approach does not remove the last frame because I don't know how to achieve this, please help

reddit.com
u/EdmondDantes20755 — 12 days ago