mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-25 02:29:40 +00:00
fix for x265 concatenation
This commit is contained in:
parent
c3b100c22e
commit
2a8870bf85
1 changed files with 2 additions and 6 deletions
|
@ -27,15 +27,11 @@ def concatenate_video(temp, output, encoder):
|
||||||
audio = ''
|
audio = ''
|
||||||
|
|
||||||
if encoder == 'x265':
|
if encoder == 'x265':
|
||||||
# Idk method to make concatenation work with x265 right away
|
|
||||||
tmp = temp / 'tmp.mp4'
|
|
||||||
|
|
||||||
cmd = f' ffmpeg -y -hide_banner -loglevel error -f concat -safe 0 -i {temp / "concat"} ' \
|
cmd = f' ffmpeg -y -fflags +genpts -hide_banner -loglevel error -f concat -safe 0 -i {temp / "concat"} ' \
|
||||||
f'{audio} -c copy -map 0 -y "{tmp}"'
|
f'{audio} -c copy -movflags frag_keyframe+empty_moov -map 0 -f mp4 - | ffmpeg -y -hide_banner -loglevel error -i - -c copy {output} '
|
||||||
concat = subprocess.run(cmd, shell=True, stdout=PIPE, stderr=STDOUT).stdout
|
concat = subprocess.run(cmd, shell=True, stdout=PIPE, stderr=STDOUT).stdout
|
||||||
|
|
||||||
cmd = f'ffmpeg -y -hide_banner -loglevel error -i {tmp} -c copy {output}'
|
|
||||||
subprocess.run(cmd, shell=True, stdout=PIPE, stderr=STDOUT).stdout
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
cmd = f' ffmpeg -y -hide_banner -loglevel error -f concat -safe 0 -i {temp / "concat"} ' \
|
cmd = f' ffmpeg -y -hide_banner -loglevel error -f concat -safe 0 -i {temp / "concat"} ' \
|
||||||
|
|
Loading…
Reference in a new issue