Wasim Shaikh
asked on
FFmpeg : cut starting 10 sec and ending 10 sec
Guys,
I am not really good at this and need your help.
I have some video files, I need to cut out starting 10 seconds and ending 10 seconds from all .mp4 files.
video files length varies in every file.
Tried to use some software but cutting out end part is getting tricky as the length is not fixed.
came across FFmpeg and it seems we can batch the process.
of course without encoding and all :-)
If anyone have a working batch file that will be great!.
I am not really good at this and need your help.
I have some video files, I need to cut out starting 10 seconds and ending 10 seconds from all .mp4 files.
video files length varies in every file.
Tried to use some software but cutting out end part is getting tricky as the length is not fixed.
came across FFmpeg and it seems we can batch the process.
of course without encoding and all :-)
If anyone have a working batch file that will be great!.
ASKER
Hi Paul,
I did check those links before posting on EE.
The second link which contains batch file, I am not able to make it work, as I am not able to understand that script.
the changes that I did in script was the time marking, as below.
I did check those links before posting on EE.
The second link which contains batch file, I am not able to make it work, as I am not able to understand that script.
the changes that I did in script was the time marking, as below.
For /f "Tokens=1* Delims=." %%a In (
'FFProbe %opts% %1') Do (Set/A "ws=%%a-10.0" & Set "ps=%%b")
rem If %ws% Lss 20 GoTo :EOF
Set/A hh=ws/(60*60), lo=ws%%(60*60), mm=lo/60, ss=lo%%60
If %hh% Lss 10 Set hh=0%hh%
If %mm% Lss 10 Set mm=0%mm%
If %ss% Lss 10 Set ss=0%ss%
C:\ffmpeg-x64\bin\FFMpeg -i %1 -ss 00:00:10.0000 -to %hh%:%mm%:%ss%.%ps:~,3% -c:v copy -c:a copy "Trimmed\%~1"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
glad to hear everything worked out OK.
I have used FFmpeg in the past with mixed results.
I have used FFmpeg in the past with mixed results.
ASKER
I was hoping if someone has already done this kind of stuff that would be helpful.
It took time for me to understand how the batch file was working.
It took time for me to understand how the batch file was working.
Here is a detailed guide for using FFmpeg―A Guide To Video And Audio Conversion Using FFmpeg.
You may also find that this solution is helpful―I need to cut MP4 videos. A part at the beginning and a part at the end in a batch fashion