Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9fb4000b80] Failed to open codec in avformat_find_stream_info
- Last message repeated 1 times
- [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9fb4000b80] Could not find codec parameters for stream 1 (Video: h264 (avc1 / 0x31637661), none, 640x360): unspecified pixel format
- Consider increasing the value for the 'analyzeduration' and 'probesize' options
- // Parsed per: https://github.com/LiminWang/simple-rtmp-server/blob/master/trunk/doc/H.264-AVC-ISO_IEC_14496-15.pdf
- var info = parseAVCConfig(packet);
- // Fortunately my video sample has one of each of these
- // I may need to concatenate multiple in the future
- var sps = info.sps[0];
- var pps = info.pps[0];
- var avcc = box(
- types.avcC,
- new Uint8Array([
- // Version
- 0x01,
- // Profile
- info.profile,
- // Profile Compat
- info.compat,
- // Level
- info.level,
- // LengthSizeMinusOne, hard-coded to 4 bytes (copied HLS.js)
- 0xfc | 3,
- // 3bit reserved (111) + numOfSequenceParameterSets
- 0xE0 | sps.byteLength
- ]
- .concat(Array.from(sps))
- .concat([
- // NumOfPictureParametersets
- pps.byteLength
- ])
- .concat(Array.from(pps))
- )
- );
- chroma_format_idc specifies the chroma sampling relative to the luma sampling as specified in clause 6.2. The value of
- chroma_format_idc shall be in the range of 0 to 3, inclusive. When chroma_format_idc is not present, it shall be inferred
- to be equal to 1 (4:2:0 chroma format).
Add Comment
Please, Sign In to add comment