cut 10 sec from start and from end of video with ffmpeg

خرید بک لینک

I'm trying to cut 10 sec from the begging and from end of videos. I have 150 short videos in mp4 and I want to do this in batch. I have downloaded ffmpeg (x64) and installed. When I type the command "ffmpeg –version" in cmd then I get the listing and installation was successful, correct? Then I found this on your site: for f in *.mp4; do duration=$(ffmpeg -i "$f" 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,//) length=$(echo "$duration" | awk '{ split($1, A, ":"); print 3600*A[1] + 60*A[2] + A[3] }' ) trim_start=10 trim_end=$(echo "$length" - 10 - "$trim_start" | bc) echo ffmpeg -ss "$trim_start" -i "$f" -c copy -map 0 -t "$trim_end" "${f%.mp4}-trimmed.mp4" done"

I was created bat file with that code and placed in folder with videos, and when I start .bat it's just blink and disappears. Folder with videos is on c:, on the same drive where is path for ffmpeg (just to add if is important).

Can someone help me with this?

Thanks

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 191 تاريخ: پنجشنبه 27 خرداد 1395 ساعت: 19:32

صفحه بندی