Menu

Error Splitting Video File Into Multiple Segments

2021-01-19
2021-02-18
  • Teodor Cobb

    Teodor Cobb - 2021-01-19

    Under Windows PowerShell I was sucessfully unsing the following comand to split a .mov video file into 30 sec clips:

    ffmpeg -i P1022014.MOV -acodec copy -f segment -segment_time 30 -vcodec copy -reset_timestamps 1 -map 0 P1022014_T%d.mov
    

    However, as I have a bunch of files to split I would love to use FFmpeg Batch. But tring it I received the following error message:

    [mov @ 000001ad8bdaf6c0] Invalid segment filename template 'J:\Aufnahmen\CONVERTED\P1022014.mov'
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    

    Maybe something is wrong with my setting?
    I created a Presets with the name: Split mov Video to segment_time 30
    Parameters:

    -acodec copy -f segment -segment_time 30 -vcodec copy -reset_timestamps 1 -map 0 
    

    Format: mov
    Rename output: I tried the initial settings _FFB and _T%d as we are going to have several output files with different names.

    See also Screenshot below. Can you help me with this?

     
  • Abel

    Abel - 2021-01-27

    Hi, I'm afraid such scenario is not possible for the moment, maybe in the future.

     
  • Abel

    Abel - 2021-02-12

    I found a way to batch split videos. You can use this parameters:

    -acodec copy -f segment -segment_time 30 -vcodec copy -reset_timestamps 1 -map 0 %fp\ffbatch\%fn_%0d.mov

    You just need to set format extension as nul.

    Cheers

     
  • Teodor Cobb

    Teodor Cobb - 2021-02-15

    Hello Abel,

    thanks for catching up!

    I tried your parameters. What exactly do you mean with "set format extension as nul."
    If I leave the format extension empty I receive an error message. See also Screenshot below.
    Setting the format extension to "mov" will get the same error message.

    Teodor

     
  • Abel

    Abel - 2021-02-15

    Hi, as in the screenshot I added in my comment, you need to write exactly 'nul' in format field, so automatic output filename is overriden, and then it should work.

     
  • Teodor Cobb

    Teodor Cobb - 2021-02-15

    Hi, with "nul" I get the exactly same error message.

     
  • Teodor Cobb

    Teodor Cobb - 2021-02-15
     

    Last edit: Teodor Cobb 2021-02-15
  • Abel

    Abel - 2021-02-16

    HI, I think it is just an issue when testing preset. You can check it by enabling "Do not try preset".

     
  • Teodor Cobb

    Teodor Cobb - 2021-02-16

    Hi, with enabling "Do not try preset" the errow window will not pup up. However, an error is shown under "Status". Please find screenshot attached.

     
  • Abel

    Abel - 2021-02-16

    Hi, you are not using the latest version 2.3.3.

    Also, output path may need to be in brackets:

    -acodec copy -f segment -segment_time 30 -vcodec copy -reset_timestamps 1 -map 0 "%fp\FF_Split\%fn_%0d.mov"

     

    Last edit: Abel 2021-02-16
  • Teodor Cobb

    Teodor Cobb - 2021-02-18

    Thank you Abel! It is running :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.