mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
prefer ffmpeg_concat_mp4_to_mp4
This commit is contained in:
parent
a49f013d94
commit
82532aa504
@ -551,19 +551,18 @@ def download_urls(urls, title, ext, total_size, output_dir = '.', refer = None,
|
|||||||
|
|
||||||
elif ext == 'mp4':
|
elif ext == 'mp4':
|
||||||
try:
|
try:
|
||||||
from .processor.join_mp4 import concat_mp4
|
|
||||||
concat_mp4(parts, os.path.join(output_dir, title + '.mp4'))
|
|
||||||
for part in parts:
|
|
||||||
os.remove(part)
|
|
||||||
except:
|
|
||||||
from .processor.ffmpeg import has_ffmpeg_installed
|
from .processor.ffmpeg import has_ffmpeg_installed
|
||||||
if has_ffmpeg_installed():
|
if has_ffmpeg_installed():
|
||||||
from .processor.ffmpeg import ffmpeg_concat_mp4_to_mp4
|
from .processor.ffmpeg import ffmpeg_concat_mp4_to_mp4
|
||||||
ffmpeg_concat_mp4_to_mp4(parts, os.path.join(output_dir, title + '.mp4'))
|
ffmpeg_concat_mp4_to_mp4(parts, os.path.join(output_dir, title + '.mp4'))
|
||||||
for part in parts:
|
|
||||||
os.remove(part)
|
|
||||||
else:
|
else:
|
||||||
print('No ffmpeg is found. Merging aborted.')
|
from .processor.join_mp4 import concat_mp4
|
||||||
|
concat_mp4(parts, os.path.join(output_dir, title + '.mp4'))
|
||||||
|
except:
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
for part in parts:
|
||||||
|
os.remove(part)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("Can't merge %s files" % ext)
|
print("Can't merge %s files" % ext)
|
||||||
|
Loading…
Reference in New Issue
Block a user