-
Notifications
You must be signed in to change notification settings - Fork 1.5k
usecase: youtube video comprehension #2503
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use lower cases for the file names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lower case for the directory names as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that, Done
|
||
```bash | ||
git clone https://github.com/camel-ai/camel.git | ||
cd examples/usecases/Youtube_Q&A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Bipul70701!! That is awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great usecase @Bipul70701, it's pretty helpful! I added some comments.
chunkr_ai | ||
python-dotenv | ||
streamlit | ||
camel-ai["all"] | ||
docx2markdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunkr_ai and docx2markdown are not used in the code. are they necessary?
Also ffmpeg-python is used in the code but not listed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hii @hesamsheikh
Just a quick note—ffmpeg-python gets installed automatically when I install camel-ai[all], so there's no need to list it separately.
However, I was getting ModuleNotFoundError for both chunkr_ai and docx2markdown, so I’ve explicitly added them to the requirements.txt file to ensure everything works smoothly.
Let me know if you have any questions.
chunkr_ai | ||
python-dotenv | ||
streamlit | ||
camel-ai["all"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use without quotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
import streamlit as st | ||
import ffmpeg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add the CAMEL copyright header (like the other usecases)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
thanks @Bipul70701 ,i used to do similar project before, how about add a image ocr of the video images? Because when the video involves many tutorial PPTS include a lot text etc, adding the ocr text part will make the entire video better understood |
@Bipul70701 I tried running the usecase but when I paste in a URL I get this error when downloading the video.
|
Hii @hesamsheikh
Hii @hesamsheikh I tried running it again it's working fine for me. It's something to do with the yt-dlp in video_download_toolkit. Even in my other project I was facing this same issue that code was running fine in my system but when I deployed it on streamlit it was giving me the same error. |
@zjrwtx Thanks for the suggestion — that's a solid use case. I'll start working on it and aim to open a PR shortly. |
thanks! @Bipul70701 , i will review that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @Bipul70701 ! Left some comments below, also as you have been invited as camel repo member, you could create new branch in camel's repo directly then create PR, which would be more convenient for code review
chunkr_ai | ||
python-dotenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 2 libraries already been included in camel-ai[all]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better naming the file README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @Bipul70701 , when run the demo below error could happen:
RuntimeError: Failed to download video from https://www.youtube.com/watch?v=kQ_7GtE529M:
[0;31mERROR:[0m [youtube] kQ_7GtE529M: Sign in to confirm you’re not a bot. Use
--cookies-from-browser or --cookies for the authentication. See
https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp for how to
manually pass cookies. Also see
https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies for tips on
effectively exporting YouTube cookies
I think we need to set the cookie path like VideoAnalysisToolkit(cookie_path="cookies.txt")
, better give one default video path and also add cookie file to the use case folder to make sure the user would be able to run the demo
Hii @Wendong-Fan I have added the required steps in readme.md file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the recent changes! There was this slight issue in the new changes. Also, just as an opinion do you think "chat with youtube" would be a better title for this usecase and its folder?
|
||
- Navigate to [YouTube](https://www.youtube.com) and log in. | ||
- Click the extension icon and export the cookies. | ||
- Save the file as `cookies.txt` in the `examples/usecases/youtube_q&a` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name of the folder is the old name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hesamsheikh Done I have changed the name of the folder and changed the readme file accordingly
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
It allows users to extract, understand, and query the contents of YouTube videos. It leverages CAMEL toolkits and OpenAI models for transcription, summarization, and natural language Q&A.