Xiaohongshu Book Recommendation Video Auto Generator

madeBy
Yyyu624
installedBy
1
fromYouMind

Instructions

---

name: book-video-pipeline

Description: "Xiaohongshu Book Recommendation Video Auto-Generation v3 - Seedance 2.0: Native Audio + Subtitles, Fully Automated from Book Selection to Publishing"

License: MIT

invoke: "/book-video

---

# Xiaohongshu Book Recommendation Video Automatic Pipeline Generation v3

book-video-pipeline

## Overview

A fully automated process for generating book recommendation videos for Xiaohongshu based on the Seedance 2.0 API of Volcano Ark.

**v3 Improvements (based on the official prompt word guide):**

- **Native Audio** — Specify the narration directly in the prompt, and Seedance will automatically generate the voice (no longer using edge-tts).

- **Native Subtitles** — Specify the subtitle content in the prompt, and Seedance will generate synchronized subtitles within the video.

- **Cover Title Card** — Pan/Zoom effect + silent audio track, ensuring splicing compatibility.

- **Chain Generation** — Each segment uses the last frame of the previous segment as the starting image, resulting in a more coherent visual flow.

- **Crossfade splicing** — Video xfade + audio acrossfade, for synchronized audio-visual transitions.

**Core Process:** Book Selection → Details/Cover → Script → Storyboard → Video Generation (including audio and subtitles) → Stitching → Preview → Publish

---

## Silent Execution Protocol

Do not ask for confirmation to proceed.

Generate the full output in one go.

If data is missing, use the defined defaults.

- Never use interruptive statements such as "Do you want to continue?", "Do you need my help?", or "Please confirm".

---

## Environmental Requirements

| Dependencies | Installation |

|------|------|

| Volcano Ark API Key | Environment variable `VOLCENGINE_API_KEY` |

| imageio-ffmpeg | `pip install imageio-ffmpeg` (comes with ffmpeg) |

| Docker (xiaohongshu-mcp) | Requires deployment on `localhost:18060` |

---

## Execution Process

**Trigger method: `/book-video` or `/book-video 《book title》`**

Step 1: Selecting Books

**Scenario A - User specified a book title:** Use it directly.

**Scenario B - No book title specified:** Run the search script (prioritizing low-volume bestsellers):

bash

python "D:\skills\xiaohongshu-book-publisher\scripts\search_hot_books_v2.py"

```

Automatically select Top 1 from the "Low-Powder Bestseller" category (excluding "[Published]").

**Error Handling:** Script Timeout → Cache → WebSearch → Default (The Courage to Be Disliked)

---

Step 2: Obtain book details and cover

**2.1 Obtain details from Douban**

```

WebFetch: https://search.douban.com/book/subject_search?search_text={book title}

Extract: Book title, author, Douban rating, synopsis, key quotes/core viewpoints, cover URL

```

**2.2 Download the cover (English filename!)**

bash

curl -o "D:\xiaohongshu_data\cover_{english_name}.jpg" -H "Referer: https://book.douban.com/" "Cover URL"

```

If curl fails, use:

bash

python "D:\skills\xiaohongshu-book-publisher\scripts\get_cover_playwright.py" "{book title}"

```

---

Step 3: Generate Book Recommendation Script + Storyboard

Generate a conversational video script based on the book details.

**Callergy Formula (based on the Seedance 2.0 Official Guide):**

Each storyboard prompt consists of three parts:

1. **Audio Commands** — Generates video with voice-over. A `{voice_type}` would say: "narration text".

2. **Visual Description** — `Subject + Action + Environment + Camera Movement + Atmosphere`

3. **Subtitle Instructions** — Subtitles appear at the bottom of the screen. The subtitles are "narration text" and must be perfectly synchronized with the audio rhythm.

**Script Template (6-7 scenes, ~35 seconds):**

```markdown

## Book Recommendation Video Script

**Book Title**: 《{Book Title}》

**Style:** Healing (Warm Gold Tones)

### Scene 1 - Opening Suspense (5 seconds)

**Narration:** {An eye-catching opening line}

**Visual Description:** {50-80 words in English: Subject + Action + Environment + Camera Shot + Atmosphere}

### Scene 2 - Books Appear (5 seconds)

**Narrator:** {A brief introduction to this book}

**Visuals:** {In English, a scene related to books}

### Storyboard 3 - Author/Background (5 seconds)

**Narration:** {Author's background or creative story}

**Scene**: {English, writing setting, study, etc.}

### Storyboard 4 - Core Viewpoint 1 (5 seconds)

**Narration:** {A touching viewpoint or memorable quote}

**Visuals:** {In English, visual metaphors matching the viewpoint}

### Scene 5 - Core Viewpoint 2 (5 seconds)

**Narration:** {Another compelling viewpoint or memorable quote}

**Visuals:** {In English, visual metaphors matching the viewpoint}

### Storyboard 6 - Personal Reflections (5 seconds)

**Narrator**: {My true feelings, the changes I experienced after reading it}

**Visuals:** {English, emotional scene}

### Scene 7 - Call to Action (5 seconds)

**Narrator:** {Call to Action}

**Visuals:** {English, a heartwarming ending scene}

```

**Screen Description Rules:**

- **Must be in English**, 50-80 words

- According to the formula: Subject + What action is being performed + What environment is it in + What lighting/atmosphere is it in + How is the camera moving?

- **Do not mention the cover image/book title text** (text generated from subtitles)

- Describe specific scenarios as much as possible, and avoid abstract concepts.

**Optional sound types:**

- Healing: `Gentle and calm female voice`

- Suspense/Mystery: `Deep, low male voice`

- Fresh and clean style: A light and lively female voice.

---

Step 4: Use the pipeline to generate video.

**4.1 Saving Storyboard JSON**

json

[

{"scene_id": 1, "prompt": "English visual description...", "narration": "Chinese narration"},

{"scene_id": 2, "prompt": "English visual description...", "narration": "Chinese narration"},

...

]

```

Save to `D:\xiaohongshu_data\storyboard_{english_name}.json`.

**4.2 Calling the complete pipeline v3**

Python

import sys, json

sys.path.insert(0, r"D:\skills\book-video-pipeline\scripts")

from seedance_client import SeedanceClient

client = SeedanceClient(api_key="YOUR_API_KEY")

with open(r"D:\xiaohongshu_data\storyboard_xxx.json", encoding="utf-8") as f:

storyboard = json.load(f)

result = client.generate_full_video(

storyboard = storyboard,

cover_path=r"D:\xiaohongshu_data\cover_xxx.jpg",

book_title="Book Title",

output_dir=r"D:\xiaohongshu_data",

voice_type="gentle and calm female voice",

with_subtitles=True,

)

print(f"Video: {result['video_path']} ({result['size_kb']}KB, ~{result['duration']}s, audio: {result['has_audio']})")

```

**pipeline v3 executes automatically:**

1. Cover → Title Card (3-second pan/zoom + mute audio track)

2. Generate video clips sequentially (each clip includes native audio and subtitles).

3. Crossfade stitching (video xfade + audio acrossfade)

4. Output the final video.

**API Key Configuration:**

bash

set VOLCENGINE_API_KEY=ark-xxx

```

---

### Step 5: Preview

Generate an HTML preview page `D:\preview_video_{name}_{date}.html`, containing:

- Video Player

- Book title, author, rating

- Narration Text Version

- Pink-themed styles on Xiaohongshu

bash

start "" "D:\preview_video_xxx.html"

```

**Please confirm with the user.** If dissatisfied, please:

- Adjust the storyboard prompt → Regenerate

- Change sound type → Regenerate

- Adjust visual description → Only change the prompt

---

Step 6: Post to Xiaohongshu

**6.1 Check Login Status** → MCP `check_login_status`

**6.2 Generate Video Notes Text** (Not video script!)

- Title ≤ 20 characters, first-person perspective with emotion

- 200-300 words in the main text, 20+ emojis

- 10-15 tags with #

**MCP Released 6.3**

Python

MCP_URL = 'http://localhost:18060'

# Initialization → publish_content(title, content, video, tags)

# Video path using the container's path: /app/data/xxx.mp4

```

**6.4 Record has been published** → Add `"type": "video"` to `published_books.json`

---

## Output Format

```markdown

## Book recommendation video generated successfully

**Book Title**: 《{Book Title}》

**Author**: {Author} | **Douban**: {Rating}

### Video Information

- Duration: ~{N} seconds (3s title card + {M} scenes x 5s)

- Aspect Ratio: 9:16 (Portrait)

- Resolution: 720p

- File size: {N} MB

- Audio: Yes/No

- Subtitles: Embedded/None

- Path: `D:\xiaohongshu_data\{name}_final.mp4`

### Information Release

- Title: {title}

- Tags: {tags}

- Status: {Success/Failure}

```

---

## Key Rules

1. **Native Audio Priority** — Seedance 2.0 natively supports audio generation; simply specify the narration in the prompt.

2. **Native Subtitles** — Specify the subtitle content in the prompt, and Seedance will automatically generate synchronized subtitles.

3. **Last Frame Continuation** — Each segment uses the last frame of the previous segment as the starting image, resulting in a more coherent visual flow.

4. **Storyboard shots should be in English** — Seedance uses English shots for better visual quality.

5. **Unified Sound Type** — The entire film uses the same sound type.

6. **Video aspect ratio 9:16** — Xiaohongshu vertical screen

7. **User confirmation is required before publication** — Wait for the preview to complete before publishing.

8. **Image filenames must be in English** — Chinese characters will cause upload timeouts.

9. **Video script ≠ Text and image notes** — A script is written in conversational language, not as an article.

10. **Switch Audio Preservation** — xfade video transition + acrossfade audio transition

## Cue Word Reference (Seedance 2.0 Guide)

### Audio Command Template

```

Generate a video with voice-over. A `{voice_type}` option says: "{narration content}".

```

### Subtitle Instruction Template

```

A subtitle appears at the bottom of the screen, with the content "{subtitle content}". The subtitle must be perfectly synchronized with the audio rhythm.

```

### Example of complete scene prompts

```

Generate a video with a voice-over. A gentle, calm female voice says, "Have you ever thought about why we always live up to other people's expectations?" A solitary figure stands at a crossroads on a misty forest path, sunlight filtering through tall trees, warm golden hour lighting, slow dolly in, shallow depth of field. Subtitles appear at the bottom of the screen, reading, "Have you ever thought about why we always live up to other people's expectations?" The subtitles must be perfectly synchronized with the audio.

```

## File References

| File | Purpose |

|------|------|

| `D:\skills\book-video-pipeline\scripts\seedance_client.py` | Seedance API + Native Audio/Subtitles + Concatenation (v3) |

| `D:\skills\xiaohongshu-book-publisher\scripts\search_hot_books_v2.py` | Popular Book Search |

| `D:\skills\xiaohongshu-book-publisher\scripts\published_books.json` | Published records |

| `D:\skills\xiaohongshu-book-publisher\scripts\get_cover_playwright.py` | Cover image retrieval (backup) |

| `D:\xiaohongshu_data\` | Video and Cover Output Directory |

## API Configuration

| Parameter | Value |

|------|-----|

| Video Model | `doubao-seedance-2-0-fast-260128` |

| Voice Type | Gentle and calm female voice (default) |

| Ratio | `9:16` |

| Segment length | 5 seconds |

| Title Card | 3-Second Pan/Zoom + Mute Audio |

| crossfade | 0.5-second transition (video + audio) |

SKILL.md
YOUMIND_MARKET.md

description

This is a fully automated tool for generating Xiaohongshu (Little Red Book) book recommendation videos based on the Seedance 2.0 API from Volcano Ark. From book selection to publishing, it's all done with a single command. **Key Highlights**: - **Native Audio & Subtitles** - Seedance 2.0 directly generates voiceovers and synchronized subtitles, eliminating the need for post-editing. - **Intelligent Book Selection** - Automatically identifies popular books with low engagement on Xiaohongshu, accurately pinpointing traffic drivers. - **Professional Storyboarding** - 6-7 meticulously designed storyboards, featuring an opening suspense, core viewpoints, and emotional resonance. - **Chained Generation** - Each video segment starts with the last frame of the previous segment, ensuring smooth and natural flow. - **One-Click Publishing** - Automatically generates titles, tags, and hashtags, allowing direct publishing to Xiaohongshu. **Suitable Scenarios**: - Daily video updates from book bloggers - Production of paid knowledge content

Find your next favorite skill

Explore more curated AI skills for research, creation, and everyday work.

Explore all skills