# -*- coding: utf-8 -*- import traceback import re import os def main(path = 'poco-gzh-33528',size = 3500): dirs = os.listdir(path) list_f = [] num = 0 count = 0 for f in dirs: if count == int(size) * num: num = num + 1 if not os.path.exists(path+'_page_'+str(num)): os.mkdir(path+'_page_'+str(num)) os.rename(path+'/'+f,path+'_page_'+str(num)+'/'+f) count = count + 1 print(len(list_f)) def rename(path = 'poco'): dirs = os.listdir(path) num = 0 count = 0 for f in dirs: num = num + 1 try: os.rename(path+'/'+f,path+'/v'+str(num)+'.jpg') except: pass print(num) if __name__ == '__main__': path = input('输入路径:') #size = input('输入大小:') #main(path,size) rename(path)
@echo off setlocal EnableDelayedExpansion setlocal ENABLEEXTENSIONS setlocal cd %1 for %%c in (./*.jpg) do ( echo %%~nxc del /q/a/f/s %%c rem ffmpeg -y -i %sourpath%%%~nxc -i %pngpath% -filter_complex overlay=0:H-h %destpath%%%~nxc ) pause
@echo off setlocal EnableDelayedExpansion setlocal ENABLEEXTENSIONS setlocal set pngpath=G:studycodepythoncodecatchImggzh-small.png set sourpath=G:studycodepythoncodecatchImggank-685 set destpath=G:studycodepythoncodecatchImggank-gzh if not exist %destpath% ( md %destpath% ) echo %sourpath% for %%c in (%sourpath%*.jpg) do ( rem echo %%~nxc rem echo %outfile% ffmpeg -y -i %sourpath%%%~nxc -i %pngpath% -filter_complex overlay=0:H-h %destpath%%%~nxc ) pause
ffmpeg -threads 2 -y -r 10 -i v%d.jpg -i ../audio.mp3 -absf aac_adtstoasc output.mp4