'How can I use CMD to create a subfolder in a folder and move every 10 files created there?
There is a cmd code (see code below). You can't do it in Powershell for I need it in cmd. This code with ffmpeg software slices the video into pieces. The point is, before ffmpeg works I create command MD folder result_%%i and put there for each processed file ALL results (video files) of ffmpeg processing: result_%%i/%%i%03d.mp4
Question: How to create a subfolder in the folder for each of 10 output slices and put them there? Respectively so, there will be several subfolders in the result_%%i folder.
The subfolder should be numbered as result_1_%%i , for example. Thus, the full path to any file will look like this: result_%%i/result_1_%%i/%%i%03d.mp4
@echo off
for %%i in (*.mov) do (
MD result_%%i
ffmpeg -i "%%i" -filter_complex "[0:v]boxblur=40,scale=1080x1920,setsar=1[bg];[0:v]scale=1080:1920:force_original_aspect_ratio=decrease[fg];[bg][fg]overlay=y=(H-h)/2" -c:v libx264 -profile:v main -level:v 3.0 -x264-params scenecut=0:open_gop=0:min-keyint=72:keyint=72 -c:a aac -preset slow -crf 23 -r 30 -sn -force_key_frames "expr: gte(t, n_forced * 0.5)" -f segment -segment_time 14.5 -reset_timestamps 1 result_%%i/%%i%%03d.mp4
)
pause
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
