Skip to content

Commit

Permalink
Make more sense. You'd think I'd been drinking.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyA committed May 17, 2013
1 parent 49b1dde commit d9758b1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Live HLS streaming with the Raspberry Pi camera.

The h264 bitstream consists of a series of NALs (Network Address Units).
Each unit has a type; many contain compressed video data but two, SPS
and PPS contain parameter about the dimensions of the video (amongst
other things) that are needed to decode it properly.
I wanted to use the Raspberry Pi camera to encode video for HLS
streaming, the format used by iPhones, iPads and many other kinds
of device. HLS uses h264 encoding for video and AAC for audio.

Unfortunately I couldn't easily discover how to modify raspivid to
produce videos in the precise format required for HLS. I expect that
it's possible and that I didn't look hard enough.

The problem is this: the h264 bitstream consists of a series of NAL
(Network Abstraction Layer) units. Each unit has a type (a unit is
similar to a packet: just a chunk of data with a header); many contain
compressed video data but two, SPS and PPS contain parameters about the
dimensions of the video (amongst other things) that are needed to decode
it properly.

Apple's HLS HTTP streaming protocol transfers chunks of video and/or
audio in chunks typically between four and twelve seconds long. Each one
Expand Down

0 comments on commit d9758b1

Please sign in to comment.