Repository navigation
Conversation
0003 maps program stream map stream_type 0x80 to AV_CODEC_ID_SVAC3 in libavformat/mpeg.c, on a video stream id only (the value is user-private in ISO/IEC 13818-1), so ffmpeg -f mpeg reads SVAC the way GB/T 28181 carries it. ps_write.py writes a program stream independently of any camera (pack per access unit, system header and map on random-access units, PES split at the 16-bit length), and CI holds every corpus stream read back through it to the golden framemd5.
PR Summary by QodoRead SVAC 3.0 from GB/T 28181 MPEG program streams
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
Why
GB/T 28181 platforms carry video as an MPEG-2 program stream over RTP, and OpenIPC cameras can now send SVAC 3.0 that way. FFmpeg's MPEG-PS demuxer did not know SVAC's stream type, so it could not read such a capture.
What
0003-avformat-mpeg-read-SVAC-video-from-a-GB-T-28181-program-stream.patch: mapsstream_type0x80 in the program stream map toAV_CODEC_ID_SVAC3. It applies only on a video stream id (0xE0–0xEF), because 0x80 is user-private in ISO/IEC 13818-1. The demuxer already sets full parsing, so the SVAC3 parser applies unchanged.ffmpeg/ps_write.py: an independent program-stream writer:ffmpeg/ps_check.sh: writes every corpus stream with it, reads it back with-f mpeg, and checks against the golden framemd5. It runs as a new CI step; the CI FFmpeg build adds thempegpsdemuxer.ffmpeg/README.md: documents the patch order and the program-stream notes.Verified
n9.0.2.ps_write.py→-f mpeg, SMART_P and multi-patch streams included.PS/90000session (its RTP payloads concatenated) decodes with-f mpeg: 240 frames at 1920x1080, the same count libsvac3d gives on the extracted elementary stream.FFmpeg has no RTP depacketizer for
PS/90000itself; that is outside this repo's patches.