Guest User

Untitled

a guest
Dec 12th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9fb4000b80] Failed to open codec in avformat_find_stream_info
  2. Last message repeated 1 times
  3. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9fb4000b80] Could not find codec parameters for stream 1 (Video: h264 (avc1 / 0x31637661), none, 640x360): unspecified pixel format
  4. Consider increasing the value for the 'analyzeduration' and 'probesize' options
  5.  
  6. // Parsed per: https://github.com/LiminWang/simple-rtmp-server/blob/master/trunk/doc/H.264-AVC-ISO_IEC_14496-15.pdf
  7. var info = parseAVCConfig(packet);
  8.  
  9. // Fortunately my video sample has one of each of these
  10. // I may need to concatenate multiple in the future
  11. var sps = info.sps[0];
  12. var pps = info.pps[0];
  13.  
  14. var avcc = box(
  15. types.avcC,
  16. new Uint8Array([
  17. // Version
  18. 0x01,
  19. // Profile
  20. info.profile,
  21. // Profile Compat
  22. info.compat,
  23. // Level
  24. info.level,
  25. // LengthSizeMinusOne, hard-coded to 4 bytes (copied HLS.js)
  26. 0xfc | 3,
  27. // 3bit reserved (111) + numOfSequenceParameterSets
  28. 0xE0 | sps.byteLength
  29. ]
  30. .concat(Array.from(sps))
  31. .concat([
  32. // NumOfPictureParametersets
  33. pps.byteLength
  34. ])
  35. .concat(Array.from(pps))
  36. )
  37. );
  38.  
  39. chroma_format_idc specifies the chroma sampling relative to the luma sampling as specified in clause 6.2. The value of
  40. chroma_format_idc shall be in the range of 0 to 3, inclusive. When chroma_format_idc is not present, it shall be inferred
  41. to be equal to 1 (4:2:0 chroma format).
Add Comment
Please, Sign In to add comment