rerun-mp4
Fungsinya
Skill ini menunjukkan kepada agent cara menambahkan berkas video MP4 ke rekaman Rerun tanpa mengubahnya menjadi gambar. Skill ini untuk orang yang ingin video kamera ditampilkan di samping data lain mereka.
Kapan dipakai
- βSaat Anda ingin menambahkan video kamera MP4 ke rekaman Rerun.
- βSaat Anda perlu memilih antara mode stream dan mode asset untuk sebuah video.
- βSaat waktu video tidak sejalan dengan bagian lain rekaman Anda dan perlu diperbaiki.
Link skill
https://github.com/rerun-io/rerun/blob/main/skills/rerun-mp4/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBagaimana cara menambahkan video kamera MP4 saya ke rekaman Rerun agar sejalan dengan data sensor?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini menjelaskan bagaimana agent membuat pembaca untuk satu berkas video dan pengaturan mana yang dipilih. Mode stream menjaga setiap frame tetap bisa dicari dari waktu ke waktu, sedangkan mode asset menyimpan seluruh berkas sebagai satu bagian.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum
Apa perbedaan antara mode stream dan mode asset?
Mode stream adalah default dan menjaga setiap frame tetap bisa dicari dari waktu ke waktu. Mode asset menyimpan seluruh berkas sebagai satu blob dan dipakai saat video tidak bisa menjadi stream.
Apakah video bisa di-encode ulang?
Ya. Skill ini mencakup transkoding melalui FFmpeg, termasuk pengaturan seperti B-frame, codec keluaran, dan jarak keyframe.
Bagaimana cara memakai beberapa kamera?
Buat satu pembaca untuk setiap berkas video, lalu gabungkan stream yang dihasilkan.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 12k
- Peringkat
- #11556
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
investigate-puffin
12kMembantu agent Anda menyelidiki rekaman profiler Puffin (berkas .puffin), menemukan bagian kode yang lambat, dan membandingkan jejak dari sebelum dan sesudah perubahan.
rerun-blueprint
12kMengajari agent Anda mengubah tampilan viewer Rerun dengan menulis blueprint untuk sebuah rekaman atau tabel, termasuk tata letak, tampilan, dan kolom tersembunyi.
rerun-catalog-queries
12kMembantu agent Anda mengkueri katalog Rerun dari Python lebih cepat, dengan tips tentang perjalanan bolak-balik, ukuran payload, dan pembacaan dataset yang lambat.
rerun-chunk-processing
12kMengajari agent Anda membangun pipeline data Rerun dengan pembaca dan lensa yang mengubah berkas MCAP, Parquet, video, atau RRD menjadi rekaman.
Skill serupa
taste-application
280kMembantu agent Anda membuat video dengan gaya tertentu, meniru ritme editing dari video referensi, membuat adegan baru, dan menyesuaikan warna.
taste-distillation
280kMembantu agent Anda menganalisis video untuk membuat style pack berisi warna, ritme pemotongan, dan elemen visual yang bisa dipakai ulang.
ui-demo
280kMembuat agent Anda merekam video demo UI yang rapi. Berguna untuk membuat tutorial atau menunjukkan cara kerja aplikasi web.