I have a script that will concat and rename the video files in a folder which I have pieced together using tips from StackExchange.
#!/bin/bash
ls -d $PWD/* >> file.txt
sed -i "s/^|$/'/g" file.txt
sed -i -e 's_.file &' file.txt
ffmpeg -f concat -safe 0 -i file.txt -c copy ${PWD##/}.mp4
I would like to run this recursively, which would seem to involve using the find command, but I am a little wary of messing this up and losing a load of data.
Any help would be appreciated.
ffmpegcall(s) shall look like). However, you need only onesedcall:sed "s/.*/file '&'/"And you should use quotes:ls -d "$PWD"/*,"${PWD##*/}".mp4– Hauke Laging Nov 28 '21 at 12:36lswithfind, and do the twosedas first step. Then manually inspectfile.txt. Finally runffmpegonfile.txtif the manual inspection is ok. – dirkt Nov 28 '21 at 14:00