graham-walker / youtube-dl-react-viewer

Web app for youtube-dl/yt-dlp, created using the MERN stack
https://react.gwalkerux.com/
MIT License
92 stars 9 forks source link

Videos with large number of comments fail to import + Emojis in video titles seem to break downloads #24

Closed szafranic closed 1 year ago

szafranic commented 1 year ago

Hi! Love this project so much, and I'm not totally sure how all the parts interact, so maybe this is a yt-dlp issue or a youtube-dl-exec issue or even a windows issue idk! (could not for the life of me figure out how to use this between drives on docker)

I was exploring the database and saw an error entry for two videos I had wanted to download with emojis in the titles. Its been the only issue in over 100 videos so I took a look at the log and it has "ERROR: Could not find video file: " and then the file path with the emojis in the string. Looking at the files that get downloaded, they also have the emoji in the title. At [download], the file paths do not have emoji in them. I will attach the console output, and I see that it says to use -d for debug output but I cannot seem to work that out either... I am really sorry to be dense 😬

I am using stock latest yt-dlp, windows 10, and firefox if any of that might help.

console_output.txt

graham-walker commented 1 year ago

Strange, not encountering the issues with emoji with the configuration you describe, will investigate further.

To set the output directory when using the Docker install method you can edit docker-compose.yaml before building the container.

Replace:

volumes:
    - ytrv_downloads:/youtube-dl

With:

volumes:
    - d:/Path/To/Your/Directory:/youtube-dl

Make sure your directory exists before building the container. This will not effect existing containers.

szafranic commented 1 year ago

Hi, thank you for taking a look into this. I hadn't built from Docker originally but I was trying to install to see if I could replicate in a Docker container. I did want to ask to make sure I'm going about this correctly. By default the docker-compose.yaml file has this:

volumes:
    ytrv_db:
    ytrv_downloads:

Would I want it to just replace that field as I have below? I am not familiar with Docker and this seems like it would not see the directory as there is no "ytrv_downloads".

volumes:
    ytrv_db:
    - d:/Path/To/Your/Directory:/youtube-dl

Not to make this more complex, but I've had just a handful more videos erroring out. Maybe because I am not running under Docker? They also download fine but then fail to import. I've only noticed it on very popular videos, and its saying something is out of range. I am thinking it may be a massive amount of comments? VuNIsY6JdUw for example. If this does not seem related, please disregard. Other than this its done 300 other videos flawlessly :)

failed_import_rangeError.txt

graham-walker commented 1 year ago

It looks like the import failing for videos with a large number of comments occurs when the byte size of the comments is greater than the MongoDB max document size of 17MB (since comments are stored in the database). Solving this would require me removing comments from the database and storing them separately.

I've edited the issue title to reflect the second issue.

graham-walker commented 1 year ago

Resolved by 9220995. Since the frontend loads every comment at once it may still lock up on videos with a large number of comments, but it is now possible to download videos with a large number of comments.