LuckyJones@lemmy.worldtoScience Memes@mander.xyz•The AMOC is based on the difference in the percentage of salt in the northern and southern hemispheres' ocean water which is based on the stream's circulationEnglish
23·
7 months agoIt’s a bit long for a one-liner, but this should work.
for f in /media/johann/5461-000B/DCIM/100MEDIA/*.AVI; do num=${f%.AVI}; num=${num##*IMAG}; ffmpeg -i "$f" -ss 00:00:00 -t 00:00:20 "~/Public/240321/240321_$num.avi"; rm "$f"; done
This num=${f%.AVI}; num=${num##*IMAG};
extracts the number from the video filename. To make sure it’s not deleting anything it shouldn’t, you also might want to run it with rm -i "$f"