[Config Support]: Infinitely looping a local file in the background for demonstration purposes #15511
-
Describe the problem you are havingGood evening. I am trying to set up a Frigate instance for demonstration purposes. It is supposed to play a local .mp4 file in the background in a loop and perform object detection on it. I'd also like it to work with go2rtc for smooth playback. With my current configuration, which is inspired by the official demo page, it works almost as expected but as soon as I leave the browser tab and enter it again or reload the page, the video will start to play from the beginning. I wasn't able to find any workaround yet. Version0.14.1-f4f3cfa Frigate config filemqtt:
enabled: false
ffmpeg:
hwaccel_args: preset-vaapi
go2rtc:
webrtc:
candidates:
- 192.168.170.11:8555
ffmpeg:
file: "-re -stream_loop -1 -i {input}"
streams:
big_buck_bunny:
- ffmpeg:/media/frigate/bbb_sunflower_1080p_30fps_normal.mp4#video=h264#hardware
detectors:
ov:
type: openvino
device: GPU
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
path: /openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
objects:
track:
- bird
record:
enabled: true
retain:
days: 0
events:
pre_capture: 30
post_capture: 30
objects:
- bird
retain:
default: 1
mode: active_objects
cameras:
big_buck_bunny:
ffmpeg:
inputs:
- path: /media/frigate/bbb_sunflower_1080p_30fps_normal.mp4
input_args: -re -stream_loop -1
roles:
- detect
- record
version: 0.14Relevant Frigate log output/Relevant go2rtc log output/Frigate statsNo response Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "150mb" # update for your cameras based on calculation above
devices:
- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /root/frigate/config:/config
- /root/frigate/media:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
# - "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udpObject DetectorOpenVino Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
|
When using go2rtc, this is expected behavior. The UI stops streaming when a camera is not visible to save on bandwidth and resources. When the UI stops streaming, go2rtc stops decoding your stream. When the camera becomes visible again, go2rtc will restart - in your case, from the beginning of the file. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, that's good to know. Is there a way to work around this when using a local file as a source while still using go2rtc? |
Beta Was this translation helpful? Give feedback.
-
|
I reconfigured my test environment and don't experience issues anymore. Thank you @hawkeye217 for your assistance with the loop parameters. The final config looks like this: |
Beta Was this translation helpful? Give feedback.
I reconfigured my test environment and don't experience issues anymore. Thank you @hawkeye217 for your assistance with the loop parameters. The final config looks like this: