Open eugeny-dementev opened 2 months ago
I did not notice this bug on my side (yet) but it's definitely related to yt-dlp.
Make sure that the yt-dlp you are using in your virtual environment is up to date. This is separate from any yt-dlp client you have installed on your system, we're talking about the library package of yt-dlp in this case:
source path/to/venv/bin/activate
pip install --upgrade yt-dlp
Be wary that the yt-dlp configuration is done in ytdlp_config.json currently.
The example ytdlp_command variable in livestream_saver.cfg
is only used by hooks (for example: on_upcoming_detected_command
, etc.)
This is not something I can fix, but thanks for reporting anyway. Will keep an eye on this.
Thank you for reply. One important thing I forgot to mention. I'm using https://hub.docker.com/r/glubsy/livestream_saver
Inside is definitely old version of yt-dlp: 2023.12.30
While the latest is 2024.04.09
I'm not sure why your Dockerfile doesn't pulls latest version of yt-dlp
, don't really have much experience with python and pip, but maybe switching to ADD --chmod=755 https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp /usr/bin
approach to build docker image would change something?
@glubsy Please check updates on the context
Currently there is no mechanism to fetch the latest version of yt-dlp inside the docker image (at run-time). The embedded yt-dlp is the latest version coming from the upstream github repository at the time of image building.
I updated the Docker hub image 13 days ago with the latest version of yt-dlp (2024.04.09), perhaps this will help in that regard.
Does the desync happen over time, or right from the start of the video?
Right from the start. It's rock solid exactly 2 seconds through the whole video. I'll try new image and report with updates
It's the same with new image with latest yt-dlp
Each stream captured have exactly 2 seconds desync behind video
Firstly I've run mostly example configuration with no change to yt-dlp command. Default one as in example
livestream_saver.cfg
When noticed the issue I've run yt-dlp command directly but reduced version:
yt-dlp -f bestvideo+bestaudio --live-from-start <youtube_stream_link>
Left it for the night and it end up being perfect, no sync issueUpdated command in
livestream_saver.cfg
to be the same with only -f and --live-from-start arguments and nothing changed, still each stream recorded has that exactly 2 seconds desyncWhat can I try to fix the issue?