[FFmpegMerger] Fix merger discard input timestamps

Some website save video-only and audio-only file with non-zero
timestamp. Therefore, when merging them, ffmpeg should keep original
timestamp.

According to ffmpeg doc: https://ffmpeg.org/ffmpeg.html

`-copyts`: Do not process input timestamps, but keep their values
without trying to sanitize them. In particular, do not remove the
initial start time offset value.
pull/8920/head
Fuyan Yuan 5 months ago
parent 85b33f5c16
commit a0d394e2f6

@ -822,7 +822,7 @@ class FFmpegMergerPP(FFmpegPostProcessor):
def run(self, info):
filename = info['filepath']
temp_filename = prepend_extension(filename, 'temp')
args = ['-c', 'copy']
args = ['-c', 'copy', '-copyts']
audio_streams = 0
for (i, fmt) in enumerate(info['requested_formats']):
if fmt.get('acodec') != 'none':

Loading…
Cancel
Save