I have pack of .avi files that needs to be trimmed by 5 last seconds. I'm doing it using batch processing and naturally, they all have different length so I can't set a trim from the beginning.
I know FFMpeg has commands -t and -ss as well as Mencoder has -endpos and -ss, but in my case I don't know if I can use them this way. My .bat file will look like this
FOR %%i IN (*.avi) DO (
ffmpeg/mencoder -options "%%i" "%%~ni"1.avi )
Thanks in advance.
+ Reply to Thread
Results 1 to 3 of 3
-
-
Hi
You need to find the duration of each file then subtract 5 seconds and use the result with "-t" or "-endpos" with FFmpeg or MEncoder.
Code:ffprobe "filename"
Duration: 00:01:02.08
Code:mplayer -vo null -ao null -frames 0 -identify "filename" 2>/dev/null | sed -ne '/^ID_/ {s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p}'
ID_LENGTH=62.08
Code:mediainfo "filename"
Duration : 1mn 0sLast edited by bat999; 2nd Sep 2012 at 12:42.
-
Ok, but how the final script should look like?
I don't understand how it should be done.
Similar Threads
-
Trimming AVI in virtualdub,direct strem copy ignores my start and end point
By Rudyard in forum EditingReplies: 4Last Post: 4th Oct 2010, 19:11 -
Mencoder // ffmpeg flv file Audio-video sync problem
By krishnareddy in forum ffmpegX general discussionReplies: 5Last Post: 26th Apr 2009, 09:13 -
Video Capture with Mplayer, Mencoder or ffmpeg under Winxp. Is it possible?
By gll99 in forum Capturing and VCRReplies: 0Last Post: 11th Sep 2008, 18:00 -
QT movie with 2 video tracks to FLV with mencoder or ffmpeg
By bluehz in forum Video ConversionReplies: 0Last Post: 26th Mar 2008, 15:39 -
How to add watermark to a video with mencoder or how to scale with FFmpeg?
By ApplePro in forum Video ConversionReplies: 16Last Post: 21st Nov 2007, 09:12