Closed iFreilicht closed 3 months ago
Hi dear @iFreilicht
Thanks for your bug report, yes we had some inconsistencies in the previous version that were fixed in version 4.0.1
.
I request you to download the new version from Releasetag 4.0.1
for Mac and test again!
Also, using VLC instead of Quicktime on Mac is a more suitable suggestion
Kia Hamedi
Indeed, this works perfectly now, thank you!
System Details:
Operating System: macOS
Persepolis Version: 4.0.0
How do you install Persepolis? Via nixpkgs, see https://github.com/NixOS/nixpkgs/pull/288825
Please attach log files if crash or paste error message
Issue Description and steps to reproduce: The first part of the download seems to work fine, but the video part is downloaded within 1 second, while the audio part takes much longer, and muxing with ffmpeg fails with the following error (taken from
/Library/Application Support/persepolis_download_manager
):This is caused by the build script in https://github.com/persepolisdm/mac-package-build downloading ffmpeg without pinning a version. As ffmpeg has released version 6 a while ago, which contains this commit, m3u8 is not a standard extension for HLS files anymore.
The solution would be to pass
-allowed_extensions ALL
to ffmpeg. Alternatively, bundling ffmpeg 5 also works.I fixed that and tried again, which caused the following error:
This can (in theory) be fixed by passing
-protocol_whitelist file,https,tcp,tls
to ffmpeg. However, it doesn't actually work. While it makes the download finish, the resulting file's video stream is invalid:But the file can be played back, and I can hear the audio:
I dug a bit further into the code, and found that Persepolis actually doesn't use yt-dlp for downloading videos, only for listing the available resolutions and audio formats! The actual download is then done with aria2, but the video format is only a m3u8 (or HLS) playlist, which means it isn't actually downloaded at first. Only when muxing, ffmpeg will try to stream the playlist and silently fail, causing the broken video stream.
At this point, I gave up on fixing the issue myself. Trying to use ffmpeg to download the youtube video streams correctly is very challenging, that's exactly why yt-dlp exists.
So the proper fix would be to download videos with yt-dlp internally, not with aria2, but AFAICT, this would require some major changes to be compatible with the current GUI, and I don't have time right now to make that happen.