Compare commits

...

3 Commits

Author SHA1 Message Date
Fuyan Yuan
c9ff4d88bf
Merge a0d394e2f6 into 4b5eec0aaa 2024-11-25 08:30:42 +05:30
Jakob Kruse
4b5eec0aaa
[ie/chaturbate] Fix support for non-public streams (#11624)
Fix bug in 720b3dc453

Closes #11623
Authored by: jkruse
2024-11-24 22:20:30 +00:00
Fuyan Yuan
a0d394e2f6 [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.
2024-01-03 22:58:08 +08:00
2 changed files with 8 additions and 9 deletions

View File

@ -59,16 +59,15 @@ def _extract_from_api(self, video_id, tld):
'Accept': 'application/json',
}, fatal=False, impersonate=True) or {}
status = response.get('room_status')
if status != 'public':
if error := self._ERROR_MAP.get(status):
raise ExtractorError(error, expected=True)
self.report_warning('Falling back to webpage extraction')
return None
m3u8_url = response.get('url')
if not m3u8_url:
self.raise_geo_restricted()
status = response.get('room_status')
if error := self._ERROR_MAP.get(status):
raise ExtractorError(error, expected=True)
if status == 'public':
self.raise_geo_restricted()
self.report_warning(f'Got status "{status}" from API; falling back to webpage extraction')
return None
return {
'id': video_id,

View File

@ -824,7 +824,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':