Commit d6872661 authored by Шилова Светлана Евгеньевна's avatar Шилова Светлана Евгеньевна
Browse files

Upload New File

No related merge requests found
Showing with 34 additions and 0 deletions
+34 -0
temp.py 0 → 100644
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import shutil
import os
print('Введите путь к папке(используя \\ или /, закончить также \\ или /): \n')
path = 'C:\\Users\\SVETA\\Downloads\\Компьютерная графика'
#os.chdir("folder")
files = "(for %i in (*) do @echo file '%i') >path"
if not os.path.isdir(path+'mp4'):
os.mkdir(path+'/mp4')
if not os.path.isdir(path+'avi'):
os.mkdir(path+'/avi')
#shutil.rmtree(path+'mp4')
#shutil.rmtree(path+'avi')
import os
os.system('"(for %i in (*.mp4) do @echo file "%i") >C:\\Users\\SVETA\\mylist.txt"')
os.system('"ffmpeg -f concat -safe 0 -i C:\\Users\\SVETA\\mylist.txt -c copy outputqwe.mp4"')
a=os.listdir()
b=a[1]
for ii in a:
if(ii[ii.find(".") + 1 : ] !='mp4'):
file=ii
namefile=ii[:ii.find(".") + 1]
os.system(f'"ffmpeg -i {file} -c:v copy -c:a copy {namefile}.mp4"')
#преобразование в mp4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment