Skip to content

[rtmp] E-RTMP video parsing#1818

Open
wkazmierczak wants to merge 4 commits intomasterfrom
@wkazmierczak/e-rtmp-video-parse
Open

[rtmp] E-RTMP video parsing#1818
wkazmierczak wants to merge 4 commits intomasterfrom
@wkazmierczak/e-rtmp-video-parse

Conversation

@wkazmierczak
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Enhanced RTMP (e-RTMP) video parsing support alongside the existing legacy FLV video parsing. It introduces a new FlvVideoData enum that dispatches between legacy and enhanced formats based on the IsExHeader bit, and implements parsing for Enhanced RTMP packet types including ModEx (modifier/extension) prefixes.

Changes:

  • Adds video_enhanced.rs with FlvVideoData, EnhancedVideoTag, VideoFourCc, VideoPacketType, and ModEx parsing logic
  • Refactors video.rs to extract parse_composition_time/serialize_composition_time helpers, fix a comment typo, adjust the frame type mask, and change visibility of VideoTagFrameType methods
  • Adds new error variants for unknown FourCC, packet types, and unsupported packet types

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
rtmp/src/flv/video_enhanced.rs New file: Enhanced RTMP video tag parsing with FourCC codecs, ModEx support, and packet type dispatch
rtmp/src/flv/video.rs Refactored composition time into shared helpers, adjusted bitmask for frame type, widened visibility of VideoTagFrameType methods
rtmp/src/flv/mod.rs Registers and re-exports the new video_enhanced module
rtmp/src/error.rs Adds error variants for enhanced video parsing failures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Enhanced RTMP (e-RTMP) video tag parsing support alongside the existing legacy FLV video parsing. It introduces a new FlvVideoData enum that dispatches between legacy and enhanced formats based on the IsExHeader bit, and implements full parsing for Enhanced RTMP video packets including FourCC codecs, ModEx extensions, and command frames.

Changes:

  • New video_enhanced.rs module with FlvVideoData dispatcher, EnhancedVideoTag parser, FourCC codec identifiers, ModEx resolution, and video command types
  • Refactored legacy video.rs to extract shared helpers (parse_composition_time, serialize_composition_time), adjust the frame type mask for Enhanced RTMP coexistence, and widen visibility of VideoTagFrameType methods
  • Added new error variants in error.rs for enhanced video parsing failures

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
rtmp/src/flv/video_enhanced.rs New module implementing Enhanced RTMP video tag parsing with FourCC, ModEx, multitrack (stub), and command frame support
rtmp/src/flv/video.rs Extracted composition time helpers, adjusted frame type bitmask from 4-bit to 3-bit, widened method visibility
rtmp/src/flv/mod.rs Registered and re-exported the new video_enhanced module
rtmp/src/error.rs Added error variants for unknown FourCC, packet types, ModEx types, and video commands

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wkazmierczak wkazmierczak changed the title [rtmp] e-RTMP video parsing [rtmp] E-RTMP video parsing Mar 17, 2026
@wkazmierczak wkazmierczak self-assigned this Mar 17, 2026
@wkazmierczak wkazmierczak marked this pull request as ready for review March 17, 2026 12:02
@wkazmierczak wkazmierczak requested a review from Copilot March 17, 2026 12:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Enhanced RTMP (E-RTMP) video tag parsing support alongside the existing legacy FLV video parsing. It introduces a new FlvVideoData enum that dispatches between legacy and enhanced formats based on the IsExHeader bit, and implements full parsing of Enhanced RTMP video tags including FourCC codec identification, multiple packet types, ModEx extensions, and video command signals.

Changes:

  • New video_enhanced.rs module implementing Enhanced RTMP video tag parsing with support for FourCC codecs (VP8/VP9/AV1/AVC/HEVC), ModEx extensions, and command frames
  • Fixed legacy video parsing: composition time is now correctly parsed as SI24 (signed 24-bit), and the frame type mask correctly excludes the IsExHeader bit
  • Added new error variants to FlvVideoTagParseError for enhanced video parsing failures

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
rtmp/src/flv/video_enhanced.rs New module: Enhanced RTMP video tag parsing with FourCC, ModEx, and command support
rtmp/src/flv/video.rs Fixed SI24 composition time parsing, adjusted frame type bitmask, extracted shared helpers
rtmp/src/flv/mod.rs Registers and re-exports the new video_enhanced module
rtmp/src/error.rs Adds error variants for unknown FourCC, packet types, ModEx types, and video commands

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wkazmierczak wkazmierczak requested a review from wkozyra95 March 17, 2026 12:09
@wkazmierczak wkazmierczak force-pushed the @wkazmierczak/e-rtmp-video-parse branch from e8feb77 to 79bb79c Compare March 18, 2026 15:54
@wkazmierczak wkazmierczak force-pushed the @wkazmierczak/e-rtmp-video-parse branch from d3a57ee to 1bb4578 Compare March 19, 2026 15:43
@wkazmierczak wkazmierczak requested a review from Copilot March 19, 2026 15:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial support for Enhanced RTMP (E-RTMP) video tag parsing to the rtmp::flv layer, alongside the existing legacy FLV VIDEODATA parser.

Changes:

  • Introduces a top-level FlvVideoData enum that dispatches between legacy (VideoTag) and Enhanced (ExVideoTag) parsing based on the IsExHeader bit.
  • Adds ExVideoTag parsing with FourCC codec IDs, Enhanced packet types, and ModEx prefix resolution (including timestamp offset nanos).
  • Improves legacy H.264 composition time handling by parsing/serializing SI24 composition time (including negative offsets).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
rtmp/src/flv/video.rs Updates legacy tag docs, exposes frame-type helpers to the crate, and adds SI24 composition time parse/serialize helpers.
rtmp/src/flv/mod_ex.rs New ModEx resolver for Enhanced RTMP video packets (collects modifiers and resolves final packet type).
rtmp/src/flv/mod.rs Adds Enhanced RTMP modules and introduces FlvVideoData dispatch + serialize wrapper.
rtmp/src/flv/ex_video.rs New Enhanced RTMP video tag parsing (FourCC + packet/body parsing, ModEx handling).
rtmp/src/error.rs Extends FlvVideoTagParseError with Enhanced RTMP-specific error variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wkazmierczak wkazmierczak force-pushed the @wkazmierczak/e-rtmp-video-parse branch from 1bb4578 to 1af0ea4 Compare March 19, 2026 16:41
@wkazmierczak wkazmierczak requested a review from wkozyra95 March 19, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants