When I download streams from Twitch, I remux them into MP4 because MPEG-TS doesn't support -movflags faststart
, is not supported by HTML5 players and can't be uploaded directly to YouTube. Sometimes this process changes framerate of the video stream. Incorrect FPS somehow corrupts the video during processing on YouTube, which leads to horrible audio desynchronization on any resolutions below 1080p60.
My working theory is that Twitch doesn’t fill the voids in the stream when frames are lost. This is not critical for MPEG-TS and FLV containers, however, the MP4 container tries to compute the global average FPS. YouTube somehow relies on the global FPS during video processing, which leads to a decrease in the duration of the video stream, and causes its desynchronization with audio.
Good video (60 fps):