Thread: [See Bugtracker] Twitch - a video always fails at 300+ mb
View Single Post
Old 21.08.2018, 18:30
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
Join Date: Mar 2009
Location: Germany
Posts: 70,924

The issue happens because there are muted segments (removed audio because of copyright). There are two ways to download twitch streams.
1.) just download the individual segments and concat them into one big file. This way you get a playable file but seeking might be junky/broken and the length might be calculated wrong. Once such a *muted* segment happens, then video/audio might get out of sync. it highly depends of you just keep the concated ts file or convert them to mp4 (fixes seek and length)
2.) *feed* all individual segments into ffmpeg and let it *mux* them into one big file. This conversion will take care of sync/seek and video length but ffmpeg fails to handle those segments where no audio is given because it cannot handle *random* loss of audio track. Twitch just removes the complete audio track from the segment and that causes ffmpeg to fail.

you could try out youtube-dl and check if it manages to download the stream in *good/playable* state. feedback would be nice
JD-Dev & Server-Admin
Reply With Quote