Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Output differences with the native hls downloader #5003
Comments
|
Not sure if this is relevant at all but at least interesting, when you open the native version with an hexeditor or invoke strings on it you can see some twitch related text in it: |
|
Yes they are different and the causes are listed in your first post. Do you expect both methods generate identical files? It's not a goal of the native downloader. |
|
I must have missed yan's comment. I just got a notification because the issue was closed. In the original issue I was voicing confusion and I was not sure if this was a bug or not. I believe my speculation at the end of the original comment is correct and as yan says it is not expected to get the same file output. The actual audio and video should still be exactly the same which is what I was worried about. It is fine to close this issue. This reply is for future reference. |
To download for example twitch.tv vods via hls youtube-dl can use ffmpeg or the built in hls downloader.
I noticed that there are slight differences in the created files with the two options.
As a test I used this twitch vod: http://www.twitch.tv/lobosjr/v/3796842 which is reported as 1:13 long via the twitch player.
When downloading it with ffmpeg the file is 32.938.745 bytes big.
With the native hls downloader the file is 33.744.684 byte big. This is also exactly the same file I get when downloading the vod with a different tool for the same job (livestreamer).
When playing the files via vlc they feel different. Skipping to different times seems faster with the native version but produces a "key frame missing" effect for a short time, this does not happen with the ffmpeg version but skipping is a bit slower.
Using ffprobe on both files shows more differences like the files having a slightly different length (this is also noticeable in vlc but it says 1:13 and 1:12):
ffprobe ffmpeg.mp4:
ffprobe native.mp4:
When trying this with a longer vod (~37 minutes) the reported difference in length is still as minimal as here but the native version is 601mb whereas the ffmpeg version is only 586mb which is not a minimal difference.
Without looking at the ffmpeg source I'm guessing this is caused by the aac_adtstoasc bitstream filter that ffmpeg gets invoked with in downloader/hls.py but I dont know why this is needed or what exactly it does.
Im guessing the native version resembles the original more closely but the ffmpeg version seems to be a more proper file (as it does not contain an unsupported codec). I wonder which one is preferred and should the native downloader implement the bitstream filter too or should ffmpeg be invoked without it (or neither)?