Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

12 Commits

Repository files navigation

💜If you like my projects, you can support me.

Coin/SymbolNetworkAdress
Bitcoin (BTC)BTC1LU7DtLiKkWe3aAXbhRhNAMUFdrapWuAHW
Tether (USDT)TRC20TK7f7TXozWVbkHxdArAJd2rELu725q1Ac5
Tether (USDT)TONUQDI4e7xm_B7O_REaYd5CoyEz1Ki08t0EPlUim022_K9B2xa

sps-parser

H.264 sequence param parser (sps) written in pure C with no dependencies. Sequence parameter set is decribed somewhere in here: https://tools.ietf.org/html/rfc3984 (see below for more detailed format description). Primary use is for obtaining stream dimensions, but you can take it as a boilerplate and extract anything you need (fps and god knows what else is there). Usage:

intmain(intargc , char*argv[]) {
uint8_tbuffer[] ="J00AH41qBQBboQAAAwABAAADADKE";
uint32_tdimensions=sps_parser(buffer);
// 1280x720printf("width = %d\nheight = %d\n", dimensions >> 16, dimensions&0xFFFF);
strcpy(buffer, "J00AH41qCwEmhAAAAwAEAAADAMoQ");
dimensions=sps_parser(buffer);
// 704x576printf("width = %d\nheight = %d\n", dimensions >> 16, dimensions&0xFFFF);
strcpy(buffer, "J00AH41qCwPaEAAAAwAQAAADAyhA");
dimensions=sps_parser(buffer);
// 704x480printf("width = %d\nheight = %d\n", dimensions >> 16, dimensions&0xFFFF);
}

SPS in details

About

H.264 sequence param parser (sps) written in pure C with no dependencies

Topics

Resources

Stars

22 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages