rerun-mp4
Qué hace
Esta skill enseña al agente a añadir un archivo de vídeo MP4 a una grabación de Rerun sin convertirlo en imágenes. Está pensada para personas que quieren mostrar un vídeo de cámara junto a sus otros datos.
Cuándo usarla
- ✓Cuando quieres añadir un vídeo de cámara MP4 a una grabación de Rerun.
- ✓Cuando necesitas elegir entre el modo flujo y el modo recurso para un vídeo.
- ✓Cuando la sincronización del vídeo no coincide con el resto de la grabación y necesitas corregirla.
Link de la skill
https://github.com/rerun-io/rerun/blob/main/skills/rerun-mp4/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Cómo añado mi vídeo MP4 de cámara a mi grabación de Rerun para que coincida con los datos del sensor?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill explica cómo el agente construye un lector para un archivo de vídeo y qué ajustes elegir. El modo flujo mantiene cada fotograma consultable a lo largo del tiempo, mientras que el modo recurso guarda el archivo completo como un único bloque.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Rerun mp4 ingestion
Mp4Reader turns one .mp4 file into a lazy chunk stream on one entity:
compressed video samples, no decode to pixels, nothing re-encoded unless it has
to be. Everything is configured on the constructor; stream() takes no
arguments. Stream mechanics after .stream() (filter, map, merge, collect,
write) are in rerun-chunk-processing.
The API
from rerun.experimental import Mp4Reader, Mp4TranscodeOptions
reader = Mp4Reader(video_path, entity_path="/camera/front") # mode="stream" by default
stream = reader.stream() # lazy: nothing is decoded yet
Every parameter after path is keyword-only. One reader handles one file — for
several cameras, build one reader per file and LazyChunkStream.merge(...) them
(see below).
Two modes
mode |
emits | when |
|---|---|---|
"stream" (default) |
a codec chunk, per-GOP sample chunks, a keyframe marker | almost always — every frame is time-indexed and queryable |
"asset" |
the whole file as one blob, plus a frame index | the codec cannot be a VideoStream, or the source starts mid-GOP |
Reach for stream mode; the next section covers exactly what it emits. Asset mode
copies the entire file into the recording as one blob, so nothing downstream can
look at a single frame without the whole asset. It is the fallback for codecs a
VideoStream cannot carry (mp4v, image-sequence mp4), and it is what rerun video.mp4 and the built-in file importer use.
What stream mode emits
For tests/assets/video/Big_Buck_Bunny_1080_1s_h264_nobframes.mp4 (30 frames,
one GOP) with entity_path="/camera/front", the whole output is three chunks:
[0] entity=/camera/front static=True rows=1 timelines=[] cols=['VideoStream:codec']
[1] entity=/camera/front static=False rows=30 timelines=['video'] cols=['VideoStream:sample']
[2] entity=/camera/front static=False rows=1 timelines=['video'] cols=['VideoStream:is_keyframe']
- One static chunk, one row, holding
VideoStream:codec. It carries no timeline — code that walks the stream must handle that (if chunk.is_static: continue). - One temporal chunk per GOP: a keyframe plus every sample that depends on it, up to (not including) the next keyframe. Samples only — the keyframe flags are not a column here.
- One trailing
is_keyframemarker chunk, holding a sparseTruerow at each keyframe's time and nothing else. Keeping it out of the sample chunks is what lets a keyframe-only query skip the sample payload, and whatcollect(optimize=…)accepts as canonical. It is list-per-row, so a row reads back as[True], notTrue. - Timeline
video,duration[ns], values are the mp4 PTS from the start of the video. - Every chunk on the same entity.
entity_path=None(the default) derives it from the file's absolute path, sofoo/video.mp4run from/databecomes/data/foo/video.mp4. Passentity_pathexplicitly in any real pipeline.
A short clip is often a single GOP, so "three chunks total" is the normal shape —
not a sign that something was dropped. chunk_by_gop=False emits one Rerun
chunk per sample instead (the marker chunk is unaffected). That is a debugging
shape — one chunk per frame is a poor storage layout, and it also makes a
following optimize pass 6× more expensive (measured below) — so leave the
default alone unless you are inspecting individual samples.
Distinguish the three by their columns, not by position or is_static: the codec
chunk is the static one, sample chunks carry VideoStream:sample, and the marker
chunk carries only VideoStream:is_keyframe.
Supported stream-mode codecs are exactly the five VideoCodec values: H264,
H265, AV1, VP8, VP9.
Transcoding through FFmpeg
VideoStream cannot yet model DTS != PTS, so an H.264/H.265 source with
container-level B-frame reordering cannot be emitted directly. The reader
handles that itself: it re-encodes through FFmpeg with -bf 0, streams the
result back as a fragmented mp4, and turns each fragment into one GOP chunk, so
only one GOP is resident at a time. This is automatic and invisible in the API —
the output has the same shape as a clean source.
Preguntas frecuentes
¿Cuál es la diferencia entre el modo flujo y el modo recurso?
El modo flujo es el predeterminado y mantiene cada fotograma consultable a lo largo del tiempo. El modo recurso guarda el archivo completo como un único bloque y se usa cuando el vídeo no puede ser un flujo.
¿Se puede recodificar el vídeo?
Sí. La skill cubre la transcodificación con FFmpeg, incluidos ajustes como los fotogramas B, el códec de salida y la separación de los fotogramas clave.
¿Cómo uso varias cámaras?
Crea un lector para cada archivo de vídeo y después combina los flujos resultantes.
Detalles
Descripción original del autor
Ingest .mp4 video into Rerun chunk streams with rerun.experimental.Mp4Reader. Read when converting video into a VideoStream, choosing stream vs asset mode, transcoding (B-frames, output codec, GOP size) through FFmpeg, or aligning video PTS onto a recording's wall-clock timeline. Builds on rerun-chunk-processing (stream mechanics) and rerun-data-model (where the video belongs in the recording).
repo: rerun-io/rerun
Popularidad
- Estrellas en GitHub
- 12 mil
- Posición en el ranking
- #11556
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
investigate-puffin
12 milPermite que tu agente investigue grabaciones del perfilador Puffin (.puffin), encuentre el código lento y compare trazas de antes y después de un cambio.
rerun-blueprint
12 milEnseña a tu agente a cambiar el aspecto del visor de Rerun escribiendo un blueprint para una grabación o tabla, con diseño, vistas y columnas ocultas.
rerun-catalog-queries
12 milAyuda a tu agente a consultar un catálogo de Rerun desde Python más rápido, con consejos sobre idas y vueltas a la red, tamaño de los datos y lecturas lentas.
rerun-chunk-processing
12 milEnseña a tu agente a crear flujos de datos de Rerun con lectores y lentes que convierten archivos MCAP, Parquet, video o RRD en grabaciones.
Skills parecidas
taste-application
280 milAyuda a tu agente a crear vídeos con un estilo concreto: copia el ritmo de edición de una referencia, genera escenas, ajusta colores y une todo con otro material.
taste-distillation
280 milPermite a tu agente analizar vídeos y crear un paquete de estilo con colores, ritmo de corte y elementos visuales reutilizables en nuevos vídeos.
ui-demo
280 milPermite a tu agente grabar vídeos de demostración de interfaces muy pulidos. Es útil para crear tutoriales o mostrar cómo funciona una app web.