[FFmpeg-user] Trying to cut 5 sec of beginning and ending of mp4 files

littlebat dashing.meng at gmail.com
Tue Jan 19 02:14:51 CET 2016


On Mon, 18 Jan 2016 15:54:14 -0700
<tsh at tshilton.com> wrote:

> Hi
> I have made some headway.  I am using this command line:
> for %%a in ("*.mp4") do ffmpeg -ss 00:00:10 -i  "%%a" -codec copy
> "newfiles\%%~na.mp4" which does seem to cut out the first 10 seconds
> of the 100 MPG4 files I have tried.  Now if I can only figure out how
> to cut out the last 5 seconds.  Remember these mpeg files are varying
> lengths varying from 24 minutes to 1 hr 20 minutes.  
> 

Use script calculate the total length of the file, reduce the last 5
seconds, you can get the cuted file.

> Again any help would be appricated.
> PS I am see an undetermined length message at the end of each file
> run in the bat file.  It seems To add about 5 or so seconds before
> showing the last 20 frames the best I can tell.  These last 20 frames
> is what I would like to get removed from the MP4 file that I already
> converted with The above command line.

Show your uncut console output. If you can't determine the length of
the file, maybe something wrong in you file, so maybe there is trouble
to finish your task.

Or, maybe you should try the lastest version of ffmpeg.

> 
> Thanks
> Thomas 
> 
> -----Original Message-----
> From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf
> Of tsh at tshilton.com Sent: Monday, January 18, 2016 1:52 PM
> To: ffmpeg-user at ffmpeg.org
> Subject: [FFmpeg-user] Trying to cut 5 sec of beginning and ending of
> mp4 files
> 
> Hi
> 
> I am been trying almost every combination of switches to be able to
> cut 5 sec from the start and 5 sec from the ending of variable length
> mp4 files.
> 
> I have not been successful at doing either.  I guess I really don't
> understand the usage.  I have more than 100 files to do.
> 
> Can anyone suggest a command string that will work?
> 
>  
> 
> Thanks
> 
> Thomas
> 
>  
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user




More information about the ffmpeg-user mailing list