forked from MarseyWorld/MarseyWorld
fix prev commit
parent
4563a2b18a
commit
1d666b3569
|
@ -9,6 +9,7 @@ import time
|
||||||
from .const import *
|
from .const import *
|
||||||
import gevent
|
import gevent
|
||||||
import imagehash
|
import imagehash
|
||||||
|
from shutil import copyfile
|
||||||
|
|
||||||
def process_files():
|
def process_files():
|
||||||
body = ''
|
body = ''
|
||||||
|
@ -71,7 +72,7 @@ def process_video(file):
|
||||||
|
|
||||||
if extension == 'webm':
|
if extension == 'webm':
|
||||||
new = new.replace('.webm', '.mp4')
|
new = new.replace('.webm', '.mp4')
|
||||||
file.save(new)
|
copyfile(old, new)
|
||||||
gevent.spawn(webm_to_mp4, old, new)
|
gevent.spawn(webm_to_mp4, old, new)
|
||||||
else:
|
else:
|
||||||
subprocess.run(["ffmpeg", "-y", "-loglevel", "warning", "-i", old, "-map_metadata", "-1", "-c:v", "copy", "-c:a", "copy", new], check=True)
|
subprocess.run(["ffmpeg", "-y", "-loglevel", "warning", "-i", old, "-map_metadata", "-1", "-c:v", "copy", "-c:a", "copy", new], check=True)
|
||||||
|
|
Loading…
Reference in New Issue