Skip to content

Commit

Permalink
Fixed connection-open HLS streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-romero committed Nov 18, 2024
1 parent e468f32 commit 671c431
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 65 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ lists the sub-commands, including `autodiscover` and `preview`.
Frame Grabbers are defined by a configuration dict which is usually stored as YAML. The configuration combines the camera type, the camera ID, and the camera options. The configuration is passed to the `FrameGrabber.create_grabber` method to create a grabber object. The grabber object can then be used to grab frames from the camera.


`config` can contain many details and settings about your camera, but only `input_type` is required. Available `input_type` options are: `generic_usb`, `rtsp`, `realsense`, `basler`, and `rpi_csi2`.
`config` can contain many details and settings about your camera, but only `input_type` is required. Available `input_type` options are: `generic_usb`, `rtsp`, `realsense`, `basler`, `rpi_csi2`, `hls`, and `youtube_live`.

Here's an example of a single USB camera configured with several options:
```python
Expand Down Expand Up @@ -174,8 +174,8 @@ The table below shows all available configurations and the cameras to which they
| input_type | generic_usb | required | required | required | required | required | required | required |
| id.serial_number | 23458234 | optional | - | optional | optional | - | - | - |
| id.rtsp_url | rtsp://… | - | required | - | - | - | - | - |
| id.hls_url | https://... | - | - | - | - | - | required | - |
| id.youtube_url | https://... | - | - | - | - | - | - | required |
| id.hls_url | https://.../*.m3u8 | - | - | - | - | - | required | - |
| id.youtube_url | https://www.youtube.com/watch?v=... | - | - | - | - | - | - | required |
| options.resolution.height | 480 | optional | - | - | optional | - | - | - |
| options.resolution.width | 640 | optional | - | - | optional | - | - | - |
| options.zoom.digital | 1.3 | optional | optional | optional | optional | optional | optional | optional |
Expand All @@ -189,7 +189,7 @@ The table below shows all available configurations and the cameras to which they
| options.crop.relative.right | 0.9 | optional | optional | optional | optional | optional | optional | optional |
| options.depth.side_by_side | 1 | - | - | - | optional | - | - | - |
| options.num_90_deg_rotations | 2 | optional | optional | optional | optional | optional | optional | optional |
| options.keep_connection_open | True | - | optional | - | - | - | - | - |
| options.keep_connection_open | True | - | optional | - | - | - | optional | optional |
| options.max_fps | 30 | - | optional | - | - | - | - | - |
Expand Down Expand Up @@ -318,6 +318,8 @@ if frame is None:
# For example, display it using cv2.imshow()
# For example, save it to a file
cv2.imwrite('youtube_frame.jpg', frame)
grabber.release()
```

## Contributing
Expand Down
Loading

0 comments on commit 671c431

Please sign in to comment.