video
#1 - crop postojećeg videa
ne radi
ffmpeg -i 20220602_202950.mp4 -filter_complex "[0:v]trim=start=0:end=320,setpts=PTS-STARTPTS[b];\
[0:v]trim=start=320:end=640,setpts=PTS-STARTPTS[c];\
[0:v]trim=start=640:end=960,setpts=PTS-STARTPTS[d];\
[0:v]trim=start=960:end=1280,setpts=PTS-STARTPTS[e];\
[0:v]trim=start=1280:end=1600,setpts=PTS-STARTPTS[f];\
[b][c][d][e][f]concat=n=2:v=1:a=1[outv][outa]" -map [outv] -map [outa] -c:v libvpx -crf 10 -b:v 5M -c:a libvorbis output.webm
crop
ffmpeg -i 20220602_202950.mp4 -filter:v "crop=iw*(2/10):ih*(2/10):iw:0" output-1.mp4
ili
ffmpeg -i input.mp4 -filter:v "crop=iw*(5/10):ih*(5/10):iw:0:keep_aspect=1" output-1b.mp4
ovo, radi :)
ffmpeg -i 20220602_202950.mp4 -filter:v "crop=720:320:0:320" -c:a copy out-1.mp4
ffmpeg -i 20220602_202950.mp4 -filter:v "crop=720:320:320:640" -c:a copy out-2.mp4
ffmpeg -i 20220602_202950.mp4 -filter:v "crop=720:320:640:960" -c:a copy out-3.mp4
ffmpeg -i 20220602_202950.mp4 -filter:v "crop=720:320:960:1280" -c:a copy out-4.mp4
ffmpeg -i 20220602_202950.mp4 -filter:v "crop=720:320:1280:1600" -c:a copy out-5.mp4
#2 - video iz slika
za cavs
wine ~/SFTW/ffmpeg-20160512-git-cd244fa-win32-static/bin/ffmpeg.exe -r 25 -i %04d.jpg -q:v 0 -g 9999 -bf 0 -r 25 -s 1080x1080 -vf scale=1080:1080 000-renamed-scaled.avi
tj. za već resizeane i fittane slike
wine ~/SFTW/ffmpeg-20160512-git-cd244fa-win32-static/bin/ffmpeg.exe -r 25 -i %05d.jpg -c:v cavs -q:v 0 -g 9999 -bf 0 -r 25 000-fit-renamed-1080x1080px-cavs.avi
(nije testirano)
ffmpeg -i IN.png -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" OUT.jpg