Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Шилова Светлана Евгеньевна
CompGr
Commits
d6872661
Commit
d6872661
authored
2 years ago
by
Шилова Светлана Евгеньевна
Browse files
Options
Download
Patches
Plain Diff
Upload New File
parent
b29345f5
master
test
tetetet
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
temp.py
+34
-0
temp.py
with
34 additions
and
0 deletions
+34
-0
temp.py
0 → 100644
+
34
−
0
View file @
d6872661
# -*- 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
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets