Implementation of the "View All" Service
Introduction
A “highlight reel” is a compilation of scenes related to a single theme, selected from multiple episodes of a drama and combined into a single video. This article explains how to create a highlight reel using a single query.
There are two approaches.
- Plot Compilation: Set a range of episodes and condense the story within that range to the desired length. For example, “Summarize Episodes 1–2 into a 20-minute clip.”
- Scene Compilation: Narrow the theme down to specific characters, actions, or dialogue, and compile only those scenes. For example, “A compilation of scenes where the protagonist fights.”
We did not create a separate service for these compilations. We use the same curation process as for short-form content; only the episode range, query, and target duration differ.

The curation process does not involve rewatching the footage. We only read the text—specifically, the locations, characters, summaries, and dialogue—that were tagged to each scene in the previous step. The structure of the curation graph was covered in detail in “Langgraph-Based Broadcast Workflow Design,” and this article discusses how that structure is applied to the compilation feature.
1. Materials: Scenes and Search Indexes
- The subject is 10 episodes of a drama, totaling approximately 11 hours.
- The unit selected by the scheduling system is the scene. A scene is a continuous sequence of events occurring at the same time and place, and each scene is tagged with a location, characters, and a summary. There are 721 scenes across the 10 episodes. The “Compilation” feature selects scenes from this pool and then cuts specific segments from the selected scenes for use.
- A search index is maintained to find scenes similar to a query. Entries at four levels—event-based sequences, scenes, cuts, and lines of dialogue—are included in a single index.
- Whatever is found in a search is grouped by scene. If a single line of dialogue is found, the scene to which that dialogue belongs is listed as a candidate. Whether the query is about the plot, dialogue, or visuals, the search is conducted within the same index; the index is not divided based on the type of query.
2. Structure for Grouping Episodes
- Any number of episodes can be grouped into a single scheduling entry. Whether it’s just Episode 1, Episodes 1–2, or Episodes 1–10, the process is the same.
- A single scheduling entry consists of a query, the target duration, a list of grouped episodes, and the resulting clips. For each clip, the playback order, the episode to be cut from, and the start and end times are recorded.
- The same scheduling process is run simultaneously for each group of episodes. For each episode, the system parses the query, gathers candidate scenes, selects scenes, cuts segments, and ranks them.
- Once all episodes are complete, the results are consolidated into a single list. An overall ranking across all episodes is determined, overlapping clips are merged, and the runtime is adjusted.
- The playback order is continuous throughout the entire compilation. It follows the episode order, and within each episode, it follows chronological order. When a clip from Episode 1 ends, a clip from Episode 2 plays next.
- Whether there is one episode or ten, the process remains the same. Only the list of grouped episodes gets longer, and the work for each episode runs in parallel accordingly.
3. Request Submission and Execution
- The scheduling system only accepts requests and responds immediately. The actual processing runs in the background; results are notified upon completion and can also be checked via the query interface.
- Only one request is processed at a time. If another request arrives while a request is in progress, it is immediately rejected without causing a delay.
- If no scenes match the query, the result will be empty. This is not an error. The system does not forcefully extract scenes that do not exist.
4. Plot Summary
-
For the query, specify only the range and duration. For example, “Summarize Episodes 1–2 into a 20-minute summary.”
-
The query interpretation stage classifies this query as a summary. Since a summary focuses on the entire story, all main scenes from the specified episodes become candidates.
-
For each sequence, read the scene descriptions and dialogue of the candidate scenes, and select the scenes necessary for the plot. When cutting segments, use one of two methods depending on the query.
-
Key: Cut a long, continuous segment covering the entire sequence from cause to effect.
-
Full: Cut a short clip to the minimum length that captures the decisive moment.
-
-
The result is several short clips, distributed evenly across all the episodes in the group.
-
The plot compilation must include a target runtime. Without a target, most candidates will remain, resulting in a compilation that runs for several hours.
5. Scene Compilation
- Use the scene you want to find in the query. For example, “A compilation of scenes where the protagonist fights.”
- The query interpretation stage classifies this query as a search and extracts characters, locations, and keywords. Scenes matching the characters and locations, combined with scenes retrieved from the index via the search terms, are selected as candidates. This significantly reduces the number of candidates compared to the plot summary.
- When selecting scenes, choose only those where the action described in the query actually takes place. Do not select scenes that merely mention the action.
- Clips are only selected from episodes that contain the scene. Since an action must occur from start to finish to constitute a scene, the clips tend to be longer.
- You do not need to specify a target duration. Once all scenes relevant to the topic have been collected, the process ends.

The behavior varies depending on the phrasing used in the query.
- If you use a single scene, only that scene is output as a single clip.
- If you use dialogue, the segment containing that dialogue is output.
- If you specify a number (“10,” “1 per episode”), that number of clips will be generated. The number is interpreted as a numerical value when parsing the query, and the count is handled by the code, not the model.
- If you specify “no scenes”, the result will be empty.
6. Adjusting Length
The target length is not calculated by the language model. The model only ranks clips by importance and selects the key segments to retain within a clip when it needs to be shortened. The code handles the actual calculations for trimming.

- Set an upper limit. The allowed upper limit is 110% of the target. If the total is below the upper limit, leave it as is.
- Recut only the key segments. If the total exceeds the limit, start with the highest-ranked clips and allocate the target duration proportionally to their original lengths; the model then selects one key segment from each clip. Short clips are not shortened. The number of clips included depends on the style: a “Plot Highlights” compilation includes many clips and is shortened significantly, while a “Scene Highlights” compilation includes fewer clips and is shortened less.
- If it still exceeds the limit, remove some clips. Discard clips starting with the lowest-ranked ones. Leave at least one clip.
- Do not pad the compilation. Even if the runtime is insufficient, do not pull in unselected scenes to fill the gap.
- Sort by playback order. When selecting clips, prioritize them by importance, but when exporting, arrange them by episode number or time. Compilations must play in the order of the story.
Conclusion
Currently, the compilation is structured as follows.
- It uses the same curation process as short-form content, differing only in the episode range, query, and target duration.
- Multiple episodes can be grouped into a single curation, and work on each episode runs simultaneously before being consolidated into a single list.
- “Plot Compilations” and “Scene Compilations” are produced through the same process but are differentiated based on how the query is interpreted.
- The total duration must be kept within 110% of the target; only cuts are made, not additions.
After reviewing the resulting list of clip segments on screen and requesting video compositing, the clips are cut and spliced together to form a single MP4 file.
Reference Links)
- https://langchain-ai.github.io/langgraph/
- https://github.com/milvus-io/milvus
- https://huggingface.co/Qwen/Qwen3-Embedding-4B
- https://docs.vllm.ai/
This article presents the results of research conducted with support from the Ministry of Science and ICT and the National IT Industry Promotion Agency’s “2026 Open-Source AI and Software Development and Utilization Support Project.”