I need to cut MP4 videos. A part at the beginning and a part at the end in a batch fashion

前端 未结 5 1054
悲&欢浪女
悲&欢浪女 2021-02-06 14:09

I have several training videos. All .MP4s.

I want to remove 3.5 seconds from the beginning and 4.5 seconds from the end of the entire folder of them...

I know of

5条回答
  •  无人及你
    2021-02-06 14:36

    Responding to Erkko's answer.

    Set ffmpeg=C:\Users\user\Downloads\ffmpeg-20180102-57d0c24-win64-static\bin\
    

    I used,

    Set ffmpeg="C:\Program Files (x86)\K-Lite Codec Pack\Tools"
    

    and for some reason it won't work.

    I want to cut 10 seconds from the start and 30 seconds from the end.

    '%ffmpeg%\ffprobe %opts% %1') Do (Set/A "ws=%%a-30.00" & Set "ps=%%b")
    
    %ffmpeg%\ffmpeg -i %1 -ss 00:00:10.000 -to %hh%:%mm%:%ss%.%ps:~,3% -c:v copy -c:a copy "Trimmed2\%~1"
    

    resulting in 10 seconds at the start and 20 seconds at the end. I had to change 30 to 40

    '%ffmpeg%\ffprobe %opts% %1') Do (Set/A "ws=%%a-40.00" & Set "ps=%%b")
    

    to enable 30 seconds cut at the end. Is this how the batch intend to work or is there an error?

提交回复
热议问题