Personal View site logo
Make sure to join PV on Telegram or Facebook! Perfect to keep up with community on your smartphone.
A little help from the ffmpeg gurus please
  • I'm really feeling my age. I spent the last two hours trying to break an XAVCS file up into 60 second files. No matter how I configure the switches, put the spaces or add the required file numbers, I get errors. Google is not my friend today. The file name is c0020 and I just want it broken up into 60 second files. Still 4k xavcs.

    Can someone write out the command line so I can see where I'm going wrong. Thanks

  • 2 Replies sorted by
  • I reckon you'll be waiting for some time Peter... seems that accurate file splitting with ffmpeg can only be done via multiple commands (couldn't really make it work accuratelly), multiple outputs or scripting (only found a python one, video spliter). I am no guru, not even a beginner, but this works (on mac) as long as you don't expect exact/accurate 10 seconds files, has somethin' to do with timestamps, keyframes or mother milk :P
    ffmpeg -i input-file -f segment -segment_time 10 -segment_format_options movflags=+faststart -strict -2 OUTPUT%03d.mp4 more at ffmpeg documentation

    Despite Hybrid has TsMuxerR and whatnot, could not find my way to batch-split...
    The only free, accurate, hassle free way I know is Tsmuxer, yes I tried and yes with 4k fileimage

     
    PS
    The multi command
    echo "Two commands" time ffmpeg -v quiet -y -i input.ts -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 -sn test1.mkv time ffmpeg -v quiet -y -i input.ts -vcodec copy -acodec copy -ss 00:30:00 -t 01:00:00 -sn test2.mkv echo "One command" time ffmpeg -v quiet -y -i input.ts -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 \ -sn test3.mkv -vcodec copy -acodec copy -ss 00:30:00 -t 01:00:00 -sn test4.mkv

  • Thanks Max!