Automatically optimize content and mapping
This is a way to use Python and AI to extract and optimize the footsteps of the Little Red Book. The code is open source
Video_note_generator is an open source project developed by GitHub user whotto. It aims to convert video content into high-quality little red book notes with one click, and automatically optimize content and accompanying pictures.
Application scenarios:
- Content creators: Quickly convert video or live content into articles to improve creative efficiency.
- Knowledge manager: Automatically organize video notes and learning points to facilitate knowledge accumulation.
- Social media operations: Generate high-quality Little Red Book notes in batches to enhance the influence of social media.
Characteristics of Little Red Book Notes:
Title Creation:
- Use the diode header method to capture the user’s pain points.
- Integrate high-conversion words and emotional words.
- Add 2-4 related emoticons.
- Control it within 20 words.
Content optimization:
- The text is controlled at 600-800 words.
- Use emoji to guide each paragraph.
- Set up 2-3 interactive guides.
- Add personal experience and empathy descriptions.
- Automatically obtain relevant drawings.
Label system:
- Core keywords.
- Associated long-tail words.
- High conversion label.
- Hot topic tags.
Creation process:
- Enter the video URL.
- Download the video and extract the audio.
- Use Whisper to transcribe audio content.
- Organize long text content through AI.
- Optimize it to the small red book style, including generating titles, tags and obtaining accompanying pictures.
- Generate final notes.
Usage:
Three usage methods are supported:
Processing a single video:
python video_note_generator.py https://example.com/video
Batch processing URL files:
Place each video link in the urls.txt file, one link per line, and run:
python video_note_generator.py urls.txt
Processing Markdown files:
Support Markdown files with video links:
python video_note_generator.py notes.md
Use tools:
- FFmpeg: Used for audio-video conversion.
- Whisper: Used for speech to text.
- OpenRouter: Used for AI content optimization.
- Unsplash: Used to obtain high-quality pictures.
Quick Start:
- Installation dependencies:
- Install FFmpeg.
- Install Python dependencies:
pip install -r requirements.txt
Configure environment variables:
cp .env.example .env
Configure API keys:
Edit the.env file and fill in the necessary API keys:
OPENROUTER_API_KEY=your-api-key-here
UNSPLASH_ACCESS_KEY=your-unsplash-access-key-here
UNSPLASH_SECRET_KEY=your-unsplash-secret-key-here
Start using:
Create a urls.txt file with one video link per line.
Operating environment inspection:
python check_environment.py
Run the generator:
python video_note_generator.py test.md
Output file:
Each video generates three files:
-
Original notes (YMMDD_HHMMSS.md):
- Complete video transcribed text, retaining all details.
-
Organize notes (YMMDD_HHMMSS_organized.md):
- The structured content after AI optimization will be highlighted with highlights and paragraphs optimized.
-
Little Red Book version (YMMDD_HMMSS_xiaohongshu.md):
- Optimized hit title.
- The essence of 600-800 words.
- 2-3 Zhang related drawings.
- Optimized labeling system.
- Interactive guide design.
Configuration instructions:
The following parameters can be adjusted in the.env file:
- MAX_TOKENS: The maximum length of the content of the small red book generated.
- CONTENT_CHUNK_SIZE: Long text chunk size (number of characters).
- TEMPERATURE: AI Creativity Level (0.0 – 1.0).
License:
The project uses an MIT license.
Github:https://github.com/whotto/Video_note_generator
Oil tubing: