h264-live-player | A live h264 player for the browser ( ideal for raspberrypi
kandi X-RAY | h264-live-player Summary
kandi X-RAY | h264-live-player Summary
A live h264 player for the browser (ideal for raspberrypi / raspicam )
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of h264-live-player
h264-live-player Key Features
h264-live-player Examples and Code Snippets
Community Discussions
Trending Discussions on h264-live-player
QUESTION
I'm reading an H.264 stream from a camera on a raspberry pi. I'm trying to pass this to Broadway via websockets to render in a web page.
The stream contains NAL units, and I'm chunking it on the [0,0,0,1]
start prefix code, to send and then decode NAL units individually. I think that's working fine, but Broadway can't decode the result I end up with.
Digging into the parsing code I've based this on though, it seems to be expecting the 5th byte (straight after the start prefix code) to be either:
- 0x65 - an I frame
- 0x41 - a P frame
- 0x67 - an SPS frame
- 0x68 - a PPS frame
I've seen a lot of mention of these elsewhere too. All the units I have coming through though seem to start with (in order):
- 0x27 0x64 (1st unit)
- 0x28 0xEE (2nd unit)
- 0x25 0x88 (3rd unit, then intermittently later on)
- 0x21 0x9A (every single other unit in the stream)
What do these headers mean in an H.264 stream? Do they suggest something about what I need to do to match Broadway's expectations?
(If the full code would be useful to understand this better, see https://github.com/pimterry/pi-cam/tree/d801de9b)
...ANSWER
Answered 2017-Apr-20 at 13:44This was a red herring: the actual issue for me here was that some existing frame dropping logic meant that I wasn't passing Broadway the first few frames in the stream, and it was failing to render. Replaying the SPS and PPS frames for all new connections and making sure they're never dropped has fixed the issue nicely.
I also did work out what these bytes are though, which helped, and may be useful for others for reference:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install h264-live-player
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page