Hi, On May 11, 2022 9:11:20 PM GMT+02:00, Markus Demleitner <[email protected]> wrote: >Package: streamlink >Version: 3.2.0-1~bpo11+1 >Severity: normal > >Dear Maintainer, > >When pulling video from arte, e.g., > >streamlink --output o.mp4 \ >https://www.arte.tv/de/videos/108210-039-A/mit-offenen-karten-im-fokus/ >\ > worst > >the audio timestamps for the resulting video file are broken for me >(since >fairly recently), which leads to various failures in different clients >(mpv has >seconds of hanging videos, vlc has stutters, webkit goes all haywire). > >Upstream says it's not a streamlink problem, >https://github.com/streamlink/streamlink/issues/4520; >I've suspected ffmpeg and so backported ffmpeg 4.4 -- to no avail. >I've also tried a uupdated streamlink 4 -- same result, broken >timestamps. > >So... while I don't doubt upstream's analysis that it's not a >streamlink >bug per se that's causing the bad timestamps, I don't know what else >is. >I'm grateful for hints on what that might be -- and reports on whether >other people see the broken timestamps, too.
I've checked this and found that: - arte.tv uses a single mp4 file for the whole video - use HLS playlist with video fragment referencing part of the mp4 file - define a special header as the beginning of the mp4 file. That header is repeated before each fragment according to HLS specification. It is a PAT/PMT header, and explained here: https://medium.com/@stackhousejs/reducing-mpeg-ts-metadata-for-hls-6cec37484d38 So streamlink does that header repetition as it should, but this seems to confuse ffmpeg v4. As of now, I've no more solutions than installing ffmpeg v5 manually (in debian, it is currently still n experimental). Maybe a workaround in streamlink could be found, but I don't know enough about mpegts. > >-- System Information: >Debian Release: 11.3 > APT prefers stable-security > APT policy: (500, 'stable-security'), (500, 'stable') >Architecture: i386 (x86_64) > >Kernel: Linux 5.16.19 (SMP w/4 CPU threads) >Kernel taint flags: TAINT_USER, TAINT_OOT_MODULE >Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not >set >Shell: /bin/sh linked to /bin/bash >Init: sysvinit (via /sbin/init) > >Versions of packages streamlink depends on: >ii python3 3.9.2-3 >ii python3-streamlink 3.2.0-1~bpo11+1 > >Versions of packages streamlink recommends: >ii mpv 0.32.0-3 >ii vlc 3.0.16-1 > >streamlink suggests no packages. > >-- no debconf information -- Alexis Murzeau

