~/bend-docscommunity

flv.bend fails

raw source on the hub · import 0xd6fc55bf65b187fec4175f80d08c165a/flv.bend as Flv

The frames inside RTMP's tags (the forms FLV keeps them in):

video H.264: a codec byte (frame type and 7 for AVC), a packet type, a 24-bit time offset; then either the configuration (the parameter sets, and how many bytes a size takes), or a picture's NAL units, each after its size. H.265, as enhanced RTMP carries it: a byte with its top bit set (frame type and packet type), the four letters "hvc1", and the same two things: the configuration, or a picture, with the time offset (packet type 1) or without (type 3). audio a format byte, then: for AAC (10), a packet type and either the configuration (profile, rate, channels) or one frame; for G.711 (7 the A-law, 8 the mu-law), the samples.

A picture comes out in Annex B form, the parameter sets in front of each key picture; an AAC frame after its ADTS header; G.711 as it is. Times are the tags' (ms, plus the video's offset), from the first one seen, in 90 kHz ticks. Other codecs are passed over.

5 imports
import Base
import ./bytes.bend as B
import ./rtmp_core.bend as K
import ./frame.bend as F
import ./audio.bend as U