Repository navigation
ManagedCodecs 0.4.0
Each decoded frame's interlacing as FFmpeg reports it, and an MP4 demuxer that reads one track at a time and lists
packets without their data; CAVLC decoding is faster. New public API, hence a minor version; code built against 0.3
keeps working.
Added
- Each decoded frame's interlacing as FFmpeg reports it:
VideoFrame.IsInterlacedandIsTopFieldFirst(ffprobe's
interlaced_frameandtop_field_first),FieldOrder(the order FFmpeg's H.264 parser gives the picture, a new
FieldOrderenum withAVFieldOrder's values) andIsCodedAsFields(two field pictures), and
H264Decoder.FieldOrder, the stream's as ffprobe prints it for MP4. H.264 follows the picture timing SEI's
pic_struct and ct_type where there is one, else MBAFF or field coding and the field order counts; MJPEG frames are
not flagged, as in FFmpeg (#225). Mp4Demuxer: a file's tracks can be read one at a time,new Mp4Demuxer(stream, MediaTypes.Video)(a new
MediaTypesflags enum); the other track is left out as if the file had none, and builds no sample table and gives
no packets. AndReadPacketInfo(), the packetsReadPacketsgives without their data (a newPacketInfo: the
size, flags and timestamps), from the sample tables alone, without reading the file or allocating an array a packet,
for a duration pass, a packet list or a bitrate graph (#211).Mp4Demuxer(Stream, bool leaveOpen = false)becomes
two constructors,(Stream)and(Stream, bool), so that the new one can takeleaveOpenas an optional
parameter; calls compile and run as before.
Changed
- H.264 decodes CAVLC streams faster, bit for bit as before: 3.2% off the 720p benchmark stream's steady frame
(h264-bench-720p.mp4, Constrained Baseline) on GitHub's x64 runner, 1.8% offh264-p-refs.mp4, the CABAC
samples unchanged (compare.ymlagainst main). The residual reader takes the trailing ones' signs in one read and
run_before from one lookup.
Fixed
AviDemuxer: an empty video chunk (a dropped frame) now takes its frame's tick, as in FFmpeg, so the packets after
it have FFmpeg's pts rather than coming a frame early; it still gives no packet (#226).