Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloads will never finish/pass the "encoding metadata" stage #914

Closed
2 tasks done
RubenRME opened this issue Dec 11, 2023 · 9 comments · Fixed by #926
Closed
2 tasks done

Downloads will never finish/pass the "encoding metadata" stage #914

RubenRME opened this issue Dec 11, 2023 · 9 comments · Fixed by #926
Labels
bug Something isn't working

Comments

@RubenRME
Copy link

Checklist

Edition

Windows GUI Application

Describe your issue here

Cancelling the download will throw an error saying the output file "is being used by another process". Only after quitting the entire program the file is accessible by the video player.

Steps to reproduce:

  1. Start downloading any clip
  2. watch it progress past download
  3. Observe it hang at encoding metadata

Add any related files or extra information here

No response

@RubenRME RubenRME added the bug Something isn't working label Dec 11, 2023
@HayleTechnica
Copy link

I am having the same issue, thought I only use the mass downloader. The download reaches 100% but seems to be unable to begin the transcode with FFMPEG because of the file access issue. Attempting to delete a file before closing twitch downloader gives the message that it is being used by FFMPEG but task manager shows no CPU or GPU utilization for the FFMPEG process running under twitch downloader.

image

@ScrubN
Copy link
Collaborator

ScrubN commented Dec 14, 2023

Attempting to delete a file before closing twitch downloader gives the message that it is being used by FFMPEG

This is very good information. I will capture the log output from FFmpeg and write it to a file, and I will need you to test it via a workflow build since I cannot reproduce the issue. Does this sound alright?

@2904nando
Copy link

Same problem here. I updated from another version and it just hangs on "Encoding Clip Metadata 0%". Cancelling and trying to delete the file throws an error that the file is being used. Forcing the ffmpeg process to end allows me to delete the file, but couldn't make it work.

@HayleTechnica
Copy link

Attempting to delete a file before closing twitch downloader gives the message that it is being used by FFMPEG

This is very good information. I will capture the log output from FFmpeg and write it to a file, and I will need you to test it via a workflow build since I cannot reproduce the issue. Does this sound alright?

I can do that no problem

@TheInevitableBug
Copy link

Turning off 'Encode Metadata' in the clip download menu allows clips to download in the task queue

@ScrubN

This comment was marked as outdated.

@ScrubN
Copy link
Collaborator

ScrubN commented Jan 5, 2024

Sadly #922 did not fix the problem, as I just experienced it while debugging a different feature. I was able to output a verbose log from FFmpeg, however I was unable to come to any useful conclusions. If any FFmpeg wizards are in this thread, you are welcomed to help interpret the log file: ffmpeg-20240104-210417.log

In the meantime, I will be adding a 30 second timeout on the encoding metadata stage.

@ScrubN

This comment was marked as outdated.

@ScrubN
Copy link
Collaborator

ScrubN commented Jan 5, 2024

I have solved the issue. We were redirecting stderr, but we did not call BeginErrorReadLine(), which caused FFmpeg to lock up until TwitchDownloaderWPF was closed, but only sometimes?

ScrubN added a commit to ScrubN/TwitchDownloader that referenced this issue Jan 5, 2024
ScrubN added a commit that referenced this issue Jan 5, 2024
)

* Actually fix #914

* Kill FFmpeg on error if it hasn't exited yet

* Log instead of throwing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants