Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/004helix/h264remote
https://github.com/004helix/h264remote
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/004helix/h264remote
- Owner: 004helix
- Created: 2020-10-06T10:50:54.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-11T18:50:08.000Z (about 4 years ago)
- Last Synced: 2024-08-01T13:18:52.300Z (3 months ago)
- Language: C
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# h264send / h264feed
H264/HEVC remote camera access kit for slow and/or unstable connections
Send example:
```
$ ffmpeg -nostdin -hide_banner -nostats -rtsp_transport tcp -stimeout 5000000 \
-i rtsp://:554/user=admin_password=_channel=1_stream=1.sdp -c:v copy -f h264 - | \
h264send -a -p -k -s 1048576
```Feed example:
```
$ h264feed -a -p -k | \
ffmpeg -nostdin -hide_banner -nostats -format h264 -i - -c:v mjpeg -global_quality 85 -f mpjpeg - | \
ffmpjpeg-httpd -a 127.0.0.1 -p 8080
```The main idea is:
on sender:
- get H264/HEVC NAL byte stream on stdin from ffmpeg
- divide it to frames (VPS + PPS + SPS + I-frame / P-frame; there is no support for B-frames)
- prepend each frame with the timestamp when it was received from stdin
- encrypt data with chacha20 stream cipher and send it too feeder
- if connection to feeder has closed (or send buffer has overflowed):
- reconnect, skippinng any frames from stdin
- wait the next I-frame (prepended with VPS, PPS and SPS units)
- send "new" streamon feeder:
- accept and authenticate connection from sender
- receive and decrypt frames
- send frames to stdout keeping pause between frames according to timestamps from sender
- if new connection from sender was authenticated, all old connections will be closed (if any)