internal/mp4/README.md
This module provides several features:
http://192.168.1.123:1984/api/frame.mp4?src=camera1 (H264, H265)http://192.168.1.123:1984/api/stream.mp4?src=camera1 (H264, H265, AAC)http://192.168.1.123:1984/api/stream.mp4?src=camera1 (H264, H265*, AAC, OPUS, MP3, PCMA, PCMU, PCM)
mp4, mp4=flac and mp4=all param for codec filtersduration param in seconds (ex. duration=15)filename param (ex. filename=record.mp4)rotate param with 90, 180 or 270 valuesscale param with positive integer values (ex. scale=4:3)Read more about codecs filters.
PS. Rotate and scale params don't use transcoding and change video using metadata.
This examples for Home Assistant Telegram Bot integration.
url to your go2rtc web API (http://localhost:1984/ for most users)target to your Telegram chat ID (support list)src=camera1 to your stream name from go2rtc configImportant. Snapshot will be near instant for most cameras and many sources, except ffmpeg source. Because it takes a long time for ffmpeg to start streaming with video, even when you use #video=copy. Also the delay can be with cameras that do not start the stream with a keyframe.
service: telegram_bot.send_video
data:
url: http://localhost:1984/api/frame.mp4?src=camera1
target: 123456789
Record from service call to the future. Doesn't support loopback.
mp4=flac - adds support PCM audio familyfilename=record.mp4 - set name for downloaded fileservice: telegram_bot.send_video
data:
url: http://localhost:1984/api/stream.mp4?src=camera1&mp4=flac&duration=5&filename=record.mp4 # duration in seconds
target: 123456789
This example works via the mjpeg module.
service: telegram_bot.send_photo
data:
url: http://localhost:1984/api/frame.jpeg?src=camera1
target: 123456789