मुख्य सामग्री पर जाएँ
Skillpedia
वीडियो एडिटिंग12k · #11556

rerun-mp4

यह क्या करती है

यह स्किल एजेंट को दिखाती है कि MP4 वीडियो फ़ाइल को तस्वीरों में बदले बिना Rerun रिकॉर्डिंग में कैसे जोड़ें। यह उन लोगों के लिए है जो कैमरा वीडियो को अपने बाकी डेटा के साथ दिखाना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप Rerun रिकॉर्डिंग में MP4 कैमरा वीडियो जोड़ना चाहते हैं।
  • ✓जब आपको किसी वीडियो के लिए स्ट्रीम मोड और एसेट मोड के बीच चुनना हो।
  • ✓जब वीडियो का समय बाकी रिकॉर्डिंग से मेल न खाए और उसे ठीक करना हो।

Skill का लिंक

https://github.com/rerun-io/rerun/blob/main/skills/rerun-mp4/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/rerun-io/rerun/blob/main/skills/rerun-mp4/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“अपनी Rerun रिकॉर्डिंग में MP4 कैमरा वीडियो कैसे जोड़ूँ, ताकि वह सेंसर डेटा के साथ मेल खाए?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल बताती है कि एजेंट एक वीडियो फ़ाइल के लिए रीडर कैसे बनाता है और कौन-सी सेटिंग चुननी है। स्ट्रीम मोड हर फ़्रेम को समय के साथ खोजने योग्य रखता है, जबकि एसेट मोड पूरी फ़ाइल को एक हिस्से के रूप में सेव करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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_keyframe marker chunk, holding a sparse True row 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 what collect(optimize=…) accepts as canonical. It is list-per-row, so a row reads back as [True], not True.
  • 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, so foo/video.mp4 run from /data becomes /data/foo/video.mp4. Pass entity_path explicitly 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.

अक्सर पूछे जाने वाले सवाल

स्ट्रीम और एसेट मोड में क्या अंतर है?

स्ट्रीम मोड डिफ़ॉल्ट है और हर फ़्रेम को समय के साथ खोजने योग्य रखता है। एसेट मोड पूरी फ़ाइल को एक blob के रूप में रखता है, और तब इस्तेमाल होता है जब वीडियो स्ट्रीम न बन सके।

क्या वीडियो को फिर से एन्कोड किया जा सकता है?

हाँ। स्किल FFmpeg से ट्रांसकोडिंग कवर करती है, जिसमें B-फ़्रेम्स, आउटपुट कोडेक और की-फ़्रेम अंतर जैसी सेटिंग शामिल हैं।

कई कैमरे कैसे इस्तेमाल करूँ?

हर वीडियो फ़ाइल के लिए एक रीडर बनाएँ, फिर परिणामी स्ट्रीम को जोड़ दें।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
12k
रैंकिंग में स्थान
#11556
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills