Hello,
I am looking for a tool to split a big batch of videos in 2. Basically, I have thousands of videos of 1sec, and I need to split these in 2 equal parts (0,5 each basically.) in bulk. What would be the best solution in your opinon? I've search for a solution with ffmpeg, but no luck so far.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
Do your videos use an intra-frame codec or inter-frame? If intra-frame you don't need to reencode. If inter-frame you will have to reencode. Either way you can use ffmpeg with -ss (start) and -t (length) switches.
For example with intra-frame AVI put this in a batch file to split all AVI files in a folder:
Code:for %%F in (*.avi) do ( ffmpeg.exe -i "%%F" -c copy -t 0.5 "%%~dpnF.part1.avi" ffmpeg.exe -i "%%F" -c copy -ss 0.5 "%%~dpnF.part2.avi" )
Last edited by jagabo; 4th Dec 2019 at 11:03.
-
That's a good idea. However it doesn't seem to work.
If I set %%F, I get "%%F: No such file or directory"
If I set a file name as if I wanted to process these individually, the first part is done successfully it seems, but not the 2nd one. For that lost one, the file weight 2ko.
Also, and this is the first it happened to me with ffmpeg. After processing, the windows icons turn blank. I had to restart the PC to fix it.
(The length of the original video is 1 sec) -
I tested the batch file before posting -- it worked perfectly here (Win 7, 64 bit):
[Attachment 51021 - Click to enlarge]
Before running the batch file there were only batch.bat, ffv1.avi, and huff.avi. The two videos contained numbered frames (0 to 23, 23.976 fps). The output files contained frames 0 to 11, and 12 to 23.
Just to be sure, I copy and pasted the text from my post into a new batch file. It worked fine too.
Note that the batch file is for intra-frame AVI files (I used huffyuv and ffv1 codecs in the test). And the batch file should be in the same folder as the AVI files. I tested with filenames with and without spaces.
Upload a few of your video files and I'll test them. -
If you want to type in the commands manually to split one file:
Code:ffmpeg.exe -i "input.avi" -c copy -t 0.5 "output1.avi" ffmpeg.exe -i "input.avi" -c copy -ss 0.5 "output2.avi"
-
Hey, it works now. I just tried with a different computer.
I precise that both computer are Win 10, 64bits
Thank you jagabo!
Similar Threads
-
How to download specific parts from youtube videos
By Aashik Alam in forum Video Streaming DownloadingReplies: 7Last Post: 18th Jun 2023, 19:20 -
some questions of splitting videos
By JackieYan in forum EditingReplies: 17Last Post: 30th May 2019, 00:31 -
Cutting/Splitting video in specific parts with avisynth?
By killerteengohan in forum RestorationReplies: 34Last Post: 2nd Mar 2017, 19:18 -
MKVToolNix GUI - Splitting a file with multiple file parts added to it
By MisterNewb in forum EditingReplies: 5Last Post: 13th Sep 2015, 11:47 -
Need help batch splitting many mp4 files
By fleat in forum EditingReplies: 14Last Post: 9th May 2015, 14:05