mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-18 06:09:17 +00:00
[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.
This commit is contained in:
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…
Reference in a new issue