mirror of
https://github.com/horgh/videostreamer.git
synced 2025-09-26 20:41:31 +08:00
README: Fix typo, improve wording
Not much of substance changed. I just noticed a typo and so re-read everything and adjusted some language.
This commit is contained in:
31
README.md
31
README.md
@@ -1,28 +1,29 @@
|
|||||||
videostreamer provides a way to stream video from an input source to HTTP. It
|
videostreamer provides a way to stream video from an input source to HTTP. It
|
||||||
remuxes a given video input into an MP4 container which it then streams
|
remuxes a given video input into an MP4 container which it then streams to any
|
||||||
endlessly to any connecting clients. This provides the ability to stream an
|
connecting clients. This provides the ability to stream an input source that
|
||||||
input source that may have limited connections or not accessible via HTTP.
|
may have limited connections, is not accessible via HTTP, or is not easily
|
||||||
|
embeddable in a website.
|
||||||
|
|
||||||
|
|
||||||
# Background
|
# Background
|
||||||
A friend has a camera that publishes an RTSP feed containing h264 video. It
|
A friend has a camera that publishes an RTSP feed containing h264 video. It
|
||||||
permits a limited number of connections, and being RTSP is not easily
|
permits a limited number of connections, and being RTSP is not easily
|
||||||
accessible on the web, such as in a regular HTML5 `<video>` element. This
|
accessible on the web, such as in a regular HTML5 `<video>` element.
|
||||||
project solves both of these problems. It reads the RTSP feed as input, remuxes
|
videostreamer solves both of these problems. It reads the RTSP feed as input,
|
||||||
the h264 video into an MP4 container, and streams that to HTTP clients. No
|
remuxes the h264 video into an MP4 container, and streams it to HTTP clients.
|
||||||
matter how many clients are streaming the video, videostreamer only opens one
|
No matter how many clients are streaming the video, videostreamer only opens
|
||||||
RTSP connection.
|
one RTSP connection.
|
||||||
|
|
||||||
Happily, browsers support h264 inside an MP4 container, so no transcoding is
|
Happily, browsers support h264 in an MP4 container, so no transcoding is
|
||||||
necessary. However, in order to stream the MP4, it is fragmented using
|
necessary. However, in order to stream the MP4, it is fragmented using
|
||||||
libavformat's `frag_keyframe` option. I found that in Firefox, I also had to
|
libavformat's `frag_keyframe` option. I found that for Firefox I also had to
|
||||||
set the `empty_moov` option.
|
set the `empty_moov` option.
|
||||||
|
|
||||||
|
|
||||||
# Difference from audiostreamer
|
# Difference from audiostreamer
|
||||||
I have a similar project for streaming audio called
|
I have a project for streaming audio called
|
||||||
[audiostreamer](https://github.com/horgh/audiostreamer). I wrote it before this
|
[audiostreamer](https://github.com/horgh/audiostreamer). I wrote it before this
|
||||||
one, and seeing it was succesful and gave me experience with the ffmpeg
|
one, and seeing it was successful and gave me experience with the ffmpeg
|
||||||
libraries, I decided to build this too.
|
libraries, I decided to build this too.
|
||||||
|
|
||||||
Initially I was going to make one larger project to stream either video or audio
|
Initially I was going to make one larger project to stream either video or audio
|
||||||
@@ -35,11 +36,11 @@ way to send to every client. I found that I could not gain access to the header
|
|||||||
from the libavformat API. Second, I was not able to read individual frames out
|
from the libavformat API. Second, I was not able to read individual frames out
|
||||||
and send them independently like I could do with MP3. This meant it was
|
and send them independently like I could do with MP3. This meant it was
|
||||||
impossible to know where in the MP4 container's output I could begin sending to
|
impossible to know where in the MP4 container's output I could begin sending to
|
||||||
a client that connected when another client was already streaming.
|
a new client when another client was already streaming.
|
||||||
|
|
||||||
Since it became clear that I would have to structure the program quite
|
Since it became clear that I would have to structure the program quite
|
||||||
differently, and I was happy with how audiostreamer was, I decided to split them
|
differently, and I was happy with how audiostreamer was, I decided to build
|
||||||
into two projects.
|
videostreamer as a separate project.
|
||||||
|
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
Reference in New Issue
Block a user