Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- LOG_FILE=/home/hass/.homeassistant/scripts/espcam_video.log
- exec 1>>${LOG_FILE} 2>>${LOG_FILE}
- date
- folder=/home/hass/.homeassistant/media/cam-vid
- id=$(date +"%Y-%m-%d_%H:%M:%S")_vid
- http_url=https://192.168.1.110:8123/api/camera_proxy_stream/camera.espcam_door_camera?token=$1
- echo "Save to: $folder/$id"
- echo "Video URL: $http_url"
- ffmpeg -r 5 -i $http_url -t 4 -c:v libx264 -profile:v main -vf format=yuv420p -preset slow -movflags +faststart -c:a copy $folder/$id.mp4
Add Comment
Please, Sign In to add comment