Compare commits

..
595 Commits
Author SHA1 Message Date
Blake Blackshear 714d76887d use sqlitequeuedb 2021-01-24 06:53:37 -06:00
James CarlosandBlake Blackshear 0c0e1416ff Update documentation link in sidebar to new docs 2021-01-23 07:00:51 -06:00
Blake Blackshear c6044ba9a1 add debug log when cache is cleaned up 2021-01-22 17:54:30 -06:00
Blake Blackshear a7739a0a62 if detection stopped, assume the container needs a restart 2021-01-22 16:58:14 -06:00
Blake Blackshear 84ed126db6 fix table in docs 2021-01-22 08:02:09 -06:00
Blake Blackshear a76f54c326 readme update 2021-01-22 07:48:40 -06:00
Paul ArmstrongandBlake Blackshear b93d354c60 docs: move docs to docusaurus 2021-01-22 07:33:27 -06:00
Blake Blackshear 14d218af46 rate limit tracked object updates to every 5 seconds 2021-01-22 06:40:01 -06:00
Blake Blackshear bd4973e3f7 add snapshot endpoint that works during the event fixes #575 2021-01-21 18:49:20 -06:00
Blake Blackshear d94f81969b get the thumbnail instead of the full frame 2021-01-21 17:28:49 -06:00
Blake Blackshear d32fed2c01 dont wait forever for the cache 2021-01-21 17:26:53 -06:00
Blake Blackshear 7b4e510b95 fix initial switch state 2021-01-20 21:56:43 -06:00
Blake Blackshear bb4f79cdfe handle exception when frame isnt in cache 2021-01-20 21:56:43 -06:00
Paul ArmstrongandBlake Blackshear e32e69c2d0 feat(web): AutoUpdatingCameraImage to replace MJPEG feed 2021-01-20 21:15:25 -06:00
Paul ArmstrongandBlake Blackshear a71ae053e4 fix(web): set default path to cameras view 2021-01-20 06:46:25 -06:00
Blake Blackshear fcc9cd56cc update index.js to use baseUrl 2021-01-19 21:31:17 -06:00
Blake Blackshear b981a3110b first pass at subfilter for ingress support 2021-01-19 19:58:42 -06:00
Paul ArmstrongandBlake Blackshear 2da50cc538 fix(web): dark mode text color fixes
fixes #544
2021-01-19 18:02:08 -06:00
Blake Blackshear cb4a0aa594 ensure error message with missing config is printed 2021-01-19 18:00:26 -06:00
Blake Blackshear 52da1fddc7 update notification example 2021-01-19 07:41:45 -06:00
Blake Blackshear 14645ce4f8 fix mqtt switch handling 2021-01-19 07:41:17 -06:00
Blake Blackshear 97ce7f3028 initialize detection correctly from config 2021-01-19 07:40:51 -06:00
Blake Blackshear 3b5302f6ea update wheels version 2021-01-19 06:19:28 -06:00
Blake Blackshear 74eb16f213 pin numpy 2021-01-19 06:16:44 -06:00
Paul ArmstrongandBlake Blackshear a3d6bf214c feat(web): layout & auto-update debug page 2021-01-18 12:57:09 -06:00
Paul ArmstrongandBlake Blackshear 16121ffd00 fix(web): ensure button bg colors show in prod builds 2021-01-18 11:39:42 -06:00
Blake Blackshear 91628bd5d8 fix zone config 2021-01-18 06:38:26 -06:00
Blake Blackshear b10b64bf57 no longer need special aarch64 wheels build 2021-01-17 08:18:54 -06:00
Blake Blackshear 749c34be9f versioning wheels image 2021-01-16 20:03:42 -06:00
Blake Blackshear 8cfdfab985 move wheels to build container 2021-01-16 19:56:21 -06:00
Paul ArmstrongandBlake Blackshear ef25f8a31e fix(web): mask zone editor to handle object filter masks
Includes additional handlers for adding/removing masks, as well as click to copy configs

fixes #523
2021-01-16 19:09:18 -06:00
Paul ArmstrongandBlake Blackshear 2a0551a08a feat(web): hash build files to avoid cache issues 2021-01-16 19:09:18 -06:00
Paul ArmstrongandBlake Blackshear 0b80419f15 fix(web): ensure mask editing works in firefox 2021-01-16 19:09:18 -06:00
Blake Blackshear 0dc81117aa docs updates for notification changes 2021-01-16 19:09:18 -06:00
Blake Blackshear 49b29d72a7 rename snapshot endpoint to thumbnail 2021-01-16 19:09:18 -06:00
Blake Blackshear 21ece238ff mqtt tweaks for switches 2021-01-16 19:09:18 -06:00
Blake Blackshear f6ba3f2daa allow summary data to be filtered 2021-01-16 19:09:18 -06:00
Blake Blackshear bb0d3cb59a update readme 2021-01-16 19:09:18 -06:00
Blake Blackshear ca9b6d6c5c snapshots config typo 2021-01-16 19:09:18 -06:00
Blake Blackshear 3103ad2bfe update object filters to inherit like motion settings 2021-01-16 19:09:18 -06:00
Blake Blackshear eab3998ad0 remove support for image masks 2021-01-16 19:09:18 -06:00
Blake Blackshear a3dfd3a8e0 don't fallback to the CPU
fixes #381
2021-01-16 19:09:18 -06:00
Blake Blackshear f1c3087775 add change type to events topic
#476
2021-01-16 19:09:18 -06:00
Blake Blackshear 1be91ed3f2 ensure each camera has a detect role set 2021-01-16 19:09:18 -06:00
Blake Blackshear fd83c4f229 add detection enable to config
fixes #482
2021-01-16 19:09:18 -06:00
Blake Blackshear de99221ad5 add env vars to config
fixes #509
2021-01-16 19:09:18 -06:00
Blake Blackshear 6892ce56ac enable and disable detection via mqtt 2021-01-16 19:09:18 -06:00
Blake Blackshear 41cea6f62e move setproctitle to prebuilt wheel location 2021-01-16 19:09:18 -06:00
Blake Blackshear 4bbffa97df switch to docker based web builds 2021-01-16 19:09:18 -06:00
Blake Blackshear 614f8abfef handle null thumbnail data 2021-01-16 19:09:18 -06:00
Blake Blackshear 14289b5fd1 add mask as object filter 2021-01-16 19:09:18 -06:00
Blake Blackshear 4164beff1c add object masks and move moton mask 2021-01-16 19:09:18 -06:00
Blake Blackshear 9b3ab486de add missing global shapshots config 2021-01-16 19:09:18 -06:00
Patrick DecatandBlake Blackshear 232a49814a Add missing migrations in docker images 2021-01-16 19:09:18 -06:00
Paul ArmstrongandBlake Blackshear 6c61f0b135 fix(web): ensure postcss and postcss-cli are marked as deps 2021-01-16 19:09:18 -06:00
Patrick DecatandBlake Blackshear c572cec253 Fix Makefile to ignore gpg signatures in commits 2021-01-16 19:09:18 -06:00
Paul ArmstrongandBlake Blackshear d4941f2a5f feat!: web user interface 2021-01-16 19:09:18 -06:00
Blake Blackshear bf5ec2f65f try to cleanup some migration logging 2021-01-16 19:09:18 -06:00
Blake Blackshear f8e21584b6 add retention settings for snapshots 2021-01-16 19:09:18 -06:00
Blake Blackshear 3cba83f84b init variables on camera state 2021-01-16 19:09:18 -06:00
Blake Blackshear dcb4255d7e handle process exit exceptions 2021-01-16 19:09:18 -06:00
Blake Blackshear 9fc3c0dc2f store has_clip and has_snapshot on events 2021-01-16 19:09:18 -06:00
Blake Blackshear a78830b48e add database migrations 2021-01-16 19:09:18 -06:00
Nat MorrisandBlake Blackshear 949fbadcdc Set titles for forked processes 2021-01-16 19:09:18 -06:00
Nat MorrisandBlake Blackshear 12c9e63b13 New stats module, refactor stats generation out of http module.
StatsEmitter thread to send stats to MQTT every 60 seconds by default, optional stats_interval config value.

New service stats attribute, containing uptime in seconds and version.
2021-01-16 19:09:18 -06:00
Blake Blackshear 157b230702 turn off snapshots via mqtt 2021-01-16 19:09:18 -06:00
Blake Blackshear c69299d659 enable turning clips on and off via mqtt 2021-01-16 19:09:18 -06:00
Blake Blackshear 285d630770 cleanup save_Clips/clips inconsistency 2021-01-16 19:09:18 -06:00
Blake Blackshear b9318092f4 add jpg snapshots to disk and clean up config 2021-01-16 19:09:18 -06:00
Paul ArmstrongandBlake Blackshear 905c361d52 fix: ensure timestamp is drawn above mask 2021-01-13 06:55:10 -06:00
Leonardo MerzaandBlake Blackshear 4443abbc49 add notes for Blue Iris RTSP support 2020-12-31 08:36:03 -06:00
yllarandBlake Blackshear dabb36ad93 Update README.md
change tmpfs size from 100MB to 1GB
2020-12-31 08:33:31 -06:00
kluszczynandBlake Blackshear 2bc8736fd9 Recordings - fix expire_file 2020-12-22 09:58:26 -05:00
Blake Blackshear e9b3b09cc2 add clips endpoint to readme 2020-12-22 09:58:26 -05:00
Blake Blackshear ca337c32b4 better mask error handling 2020-12-22 09:58:26 -05:00
Blake Blackshear 24b8bd7c85 fix tmpfs 2020-12-22 09:58:26 -05:00
Blake Blackshear 3ad75a441d remove redundant error output 2020-12-20 08:04:54 -06:00
Blake Blackshear f006e9be8d use CACHE_DIR constant 2020-12-20 08:04:54 -06:00
Blake Blackshear 03f3ba8008 enable mounting tmpfs volume on start 2020-12-20 08:04:54 -06:00
Blake Blackshear 96a44eb7bf docs and issue template 2020-12-20 07:37:44 -06:00
Blake Blackshear 006782fe3d update process clip for latest changes 2020-12-20 07:37:44 -06:00
Blake Blackshear ff3e95bbf7 publish event updates on zone change 2020-12-20 07:37:44 -06:00
Blake Blackshear 4b95a37e65 readme updates 2020-12-20 07:37:44 -06:00
Blake Blackshear 38c661b3a8 handle scenario with empty cache 2020-12-20 07:37:44 -06:00
Blake Blackshear 0d6e4f6a66 add qsv support to amd64 image 2020-12-20 07:37:44 -06:00
Blake Blackshear 1ad2219f1c add num_threads fixes #322 2020-12-20 07:37:44 -06:00
Blake Blackshear dfcdd289c3 optimize clips fixes #299 2020-12-20 07:37:44 -06:00
Blake Blackshear 32f5f2cca9 add post_capture option 2020-12-20 07:37:44 -06:00
Blake Blackshear 24bfe9f3e8 re-crop to the object rather than the region 2020-12-20 07:37:44 -06:00
Blake Blackshear 004667dc99 allow runtime drawing settings for mjpeg and latest 2020-12-20 07:37:44 -06:00
Blake Blackshear 9d785dc781 allow the mask to be a list of masks 2020-12-20 07:37:44 -06:00
Blake Blackshear cbba5a7af0 adding version endpoint 2020-12-20 07:37:44 -06:00
Blake Blackshear 29b29ee349 configurable motion and detect settings 2020-12-20 07:37:44 -06:00
Blake Blackshear 9ad53e09af update gitignore 2020-12-20 07:37:44 -06:00
Blake Blackshear c9278991c9 fix test 2020-12-20 07:37:44 -06:00
Blake Blackshear 729de48934 switch default threshold to .7 2020-12-20 07:37:44 -06:00
Blake Blackshear 7476bff5fb allow process clips to output a csv of scores 2020-12-20 07:37:44 -06:00
Blake Blackshear 1e9eae8d9a allow db path to be customized 2020-12-20 07:37:44 -06:00
Blake Blackshear 8113a53381 add telegram example 2020-12-20 07:37:44 -06:00
Blake Blackshear 72833686f1 fix process clip 2020-12-20 07:37:44 -06:00
Blake Blackshear 096c21f105 handle empty string args 2020-12-20 07:37:44 -06:00
Blake Blackshear 181f66357b allow region to extend beyond the frame 2020-12-20 07:37:44 -06:00
tubalainenandBlake Blackshear a54fbc483c Updated file
ref: https://github.com/blakeblackshear/frigate/issues/373
2020-12-12 10:38:02 -06:00
Blake Blackshear 92d5a002d3 swap width and height to reduce confusion 2020-12-10 19:22:03 -06:00
Blake Blackshear f9184903d7 updating compose example to reduce confusion 2020-12-10 19:02:08 -06:00
Blake Blackshear 91cde6ce7b allow defining model shape and switch to mobiledet as default model 2020-12-09 07:22:26 -06:00
Blake Blackshear 186a4587c7 add model dimensions to config 2020-12-09 07:22:26 -06:00
Patrick DecatandBlake Blackshear 6049acb1f3 Document beta addon host 2020-12-08 07:25:13 -06:00
Blake Blackshear 2d2ebf313c make shm consistent with compose 2020-12-08 07:24:37 -06:00
tubalainenandBlake Blackshear 3d329dcb52 Updated docker command line...
...to correspond with 0.8.0 feature set.
2020-12-08 07:24:37 -06:00
Blake Blackshear 06854fc34f readme cleanup fixes #332 2020-12-07 18:00:12 -06:00
Blake Blackshear e01e14d866 handle and warn if roles dont match enabled features 2020-12-07 08:07:35 -06:00
Blake Blackshear 3dfd251ebb camera recommendations 2020-12-07 07:36:29 -06:00
Blake Blackshear dcea807f77 catch all psutil errors 2020-12-07 07:16:48 -06:00
Blake Blackshear 87d83ff33a clarify height width and fps 2020-12-07 07:16:28 -06:00
Blake Blackshear 1d31cbdf0d readme updates 2020-12-06 14:25:28 -06:00
Blake Blackshear e05b27b8dc tweak screenshots 2020-12-06 08:27:03 -06:00
Blake Blackshear 7111bd208e readme updates 2020-12-06 08:25:25 -06:00
Blake Blackshear 04a80280da set ffmpeg image versions 2020-12-06 07:09:14 -06:00
Blake Blackshear 3bda092140 comment you zeroconf 2020-12-06 07:05:45 -06:00
Blake Blackshear 9086820479 fix flask logger config 2020-12-05 19:05:03 -06:00
Blake Blackshear d1da57aedc fix graceful exits 2020-12-05 12:06:07 -06:00
Blake Blackshear 6ded12c566 better exception handling 2020-12-05 12:06:07 -06:00
Blake Blackshear 70352566a7 fix default args 2020-12-05 12:06:07 -06:00
Blake Blackshear cf5cc86588 fix fontconfig issue 2020-12-05 08:48:46 -06:00
Blake Blackshear e41db49ab8 doc updates 2020-12-05 08:48:46 -06:00
Blake Blackshear 1b7effafee update some default config values 2020-12-05 08:48:46 -06:00
Blake Blackshear 69e9e0b0bf log level configuration 2020-12-05 08:48:46 -06:00
Blake Blackshear 89624df411 no need to write jpg disk 2020-12-05 08:48:46 -06:00
Blake Blackshear d1a7405211 dont delete the recordings directory 2020-12-05 08:48:46 -06:00
Blake Blackshear 040f8c7c20 default save_clips objects 2020-12-05 08:48:46 -06:00
Blake Blackshear 6d7acabf4c add logging for directory creation 2020-12-05 08:48:46 -06:00
Blake Blackshear 45a8b42157 exit on config errors 2020-12-05 08:48:46 -06:00
Blake Blackshear 8785be24b7 add zeroconf discovery 2020-12-05 08:48:46 -06:00
Blake Blackshear cc0812540c optional android notification aspect ratio 2020-12-05 08:48:46 -06:00
Blake Blackshear 5cf38ca4f7 reduce min timestamp size 2020-12-05 08:48:46 -06:00
Blake Blackshear 7e4395c30e publish object counts rather than on/off 2020-12-05 08:48:46 -06:00
Blake Blackshear 598d3aeda2 make directories constants 2020-12-05 08:48:46 -06:00
Blake Blackshear 012dbf81f7 cleanup empty directories 2020-12-05 08:48:46 -06:00
Blake Blackshear f869def12e serve up recordings with nginx 2020-12-05 08:48:46 -06:00
Blake Blackshear 31f7666337 add recording maintenance 2020-12-05 08:48:46 -06:00
Blake Blackshear 9e339acbca add record settings to config 2020-12-05 08:48:46 -06:00
Blake Blackshear 8f8054a299 fix log timeout 2020-12-05 08:48:46 -06:00
Blake Blackshear f7021eec4c ensure zones dont have the same name as a camera 2020-12-05 08:48:46 -06:00
Blake Blackshear c124153da4 graceful exit of subprocesses 2020-12-05 08:48:46 -06:00
Blake Blackshear 706c2f921e add multiple streams per camera 2020-12-05 08:48:46 -06:00
Blake Blackshear de1d66bcb9 fix fontconfig error 2020-12-05 08:48:46 -06:00
Blake Blackshear 4502ca8e80 add support for rebroadcasting as rtmp 2020-12-05 08:48:46 -06:00
Blake Blackshear 32a66fe5e8 avoid null error 2020-12-05 08:48:46 -06:00
Blake Blackshear e1251aafdb minimize logging 2020-12-05 08:48:46 -06:00
Blake Blackshear 587494068c oops 2020-12-05 08:48:46 -06:00
Blake Blackshear 7a4d90a47a only publish end events for true positives 2020-12-05 08:48:46 -06:00
Blake Blackshear d06b587d33 ensure all events are cleaned up 2020-12-05 08:48:46 -06:00
Blake Blackshear eef70e434b publish events like a change feed 2020-12-05 08:48:46 -06:00
Blake Blackshear b39da3ee01 pull from memory if event in progress 2020-12-05 08:48:46 -06:00
Blake Blackshear e07c4e0d8c add endpoint for event thumbnail 2020-12-05 08:48:46 -06:00
Blake Blackshear 2f41ba6f77 add service to get by id 2020-12-05 08:48:46 -06:00
Blake Blackshear bf95af0f22 add zones to summary data 2020-12-05 08:48:46 -06:00
Blake Blackshear 2e15847f86 sleep in the right place 2020-12-05 08:48:46 -06:00
Blake Blackshear 5992e85dc8 manage events for unlisted cameras 2020-12-05 08:48:46 -06:00
Blake Blackshear 24d416b869 add event cleanup thread 2020-12-05 08:48:46 -06:00
Blake Blackshear 5dbf368c4b add clip retention to config 2020-12-05 08:48:46 -06:00
Blake Blackshear 7d56fe105f use localtime in group by 2020-12-05 08:48:46 -06:00
Blake Blackshear e9327aa18c new http endpoints 2020-12-05 08:48:46 -06:00
Blake Blackshear df56e079de add parameters to event query 2020-12-05 08:48:46 -06:00
Blake Blackshear 8c5bfbd187 only save events when a clip is created 2020-12-05 08:48:46 -06:00
Blake Blackshear 2613e74f97 add bas64 encoded thumbnail to the database 2020-12-05 08:48:46 -06:00
Blake Blackshear 9a7fb96357 check for None value thumbnail_data 2020-12-05 08:48:46 -06:00
Blake Blackshear 37f9dfed92 only set thumbnail data if object is a true positive 2020-12-05 08:48:46 -06:00
Blake Blackshear 68c1544808 add some debug logging to frame cache 2020-12-05 08:48:46 -06:00
Blake Blackshear 2b3d3c5824 dont use a property 2020-12-05 08:48:46 -06:00
Blake Blackshear efea87a3ea attempt to fix missing thumbs 2020-12-05 08:48:46 -06:00
Blake Blackshear 977785fb10 better frame handling for best images 2020-12-05 08:48:46 -06:00
Blake Blackshear 4e113e62c0 cleanup false_positive attribute 2020-12-05 08:48:46 -06:00
Blake Blackshear 5080b2d781 ensure some valid thumbnail is available 2020-12-05 08:48:46 -06:00
Blake Blackshear 5cfd6d1edb don't save thumbnails for false positives 2020-12-05 08:48:46 -06:00
Blake Blackshear 27ae4d8ab0 cleanup 2020-12-05 08:48:46 -06:00
Blake Blackshear 3db33302ec reduce logging 2020-12-05 08:48:46 -06:00
Blake Blackshear f2910d48e0 fixes 2020-12-05 08:48:46 -06:00
Blake Blackshear cf0f8892e2 update nginx config 2020-12-05 08:48:46 -06:00
Blake Blackshear 4d22e172ff stop writing json file to disk 2020-12-05 08:48:46 -06:00
Blake Blackshear 8874a55b0f create tracked object class and save thumbnails 2020-12-05 08:48:46 -06:00
Blake Blackshear 24b703a875 maintain thumbnail frames for tracked objects 2020-12-05 08:48:46 -06:00
Blake Blackshear 8b8f5b5c40 sort imports 2020-12-05 08:48:46 -06:00
Blake Blackshear eac81136d2 naming threads and processes for logs 2020-12-05 08:48:46 -06:00
Blake Blackshear d1e27b43ea use a queue for logging 2020-12-05 08:48:46 -06:00
Blake Blackshear 105dcb7094 create typed config classes 2020-12-05 08:48:46 -06:00
Blake Blackshear c0a16efdc1 add nginx and change default file locations 2020-12-05 08:48:46 -06:00
Blake Blackshear 2800c54743 config setup 2020-12-05 08:48:46 -06:00
Blake Blackshear 2a24e8abcb add watchdog 2020-12-05 08:48:46 -06:00
Blake Blackshear 37ee746ebb add back all endpoints 2020-12-05 08:48:46 -06:00
Blake Blackshear 7ee6bfe855 add event processor 2020-12-05 08:48:46 -06:00
Blake Blackshear 40f57a8754 add capture processes 2020-12-05 08:48:46 -06:00
Blake Blackshear e0da462223 add camera processors 2020-12-05 08:48:46 -06:00
Blake Blackshear 47a9fc4292 add detected_frames_processor 2020-12-05 08:48:46 -06:00
Blake Blackshear 03fe5158db add detector processes 2020-12-05 08:48:46 -06:00
Blake Blackshear 72be6b480d init db/http/mqtt 2020-12-05 08:48:46 -06:00
Blake Blackshear a8964dcc1f app container and config schema 2020-12-05 08:48:46 -06:00
Blake Blackshear 732e91ee42 move primary script into the module 2020-12-05 08:48:46 -06:00
Blake Blackshear 27da080ce6 saving events and simple endpoint 2020-12-05 08:48:46 -06:00
Blake Blackshear 075d06b108 basic database model and api endpoint 2020-12-05 08:48:46 -06:00
Blake Blackshear 95dc17ffcd store events in tinydb 2020-12-05 08:48:46 -06:00
Blake Blackshear 408b53f8b4 update events model 2020-12-05 08:48:46 -06:00
Marc SeegerandBlake Blackshear 3ef68a297a Add support for AMD Ryzen iGPU (fixes #311)
This package will add support for the iGPU of AMD Ryzen and presumably a few more AMD cards.
See details of the package here: https://packages.ubuntu.com/focal/mesa-va-drivers
It also adds support for the open source Nvidia Nouveau driver according to https://wiki.debian.org/HardwareVideoAcceleration
2020-12-05 07:00:07 -06:00
Michael WeiandBlake Blackshear 3e9b3711dc Use cv2.bitwise_and instead of numpy.where 2020-12-05 06:59:28 -06:00
Gerard EscalanteandBlake Blackshear a1cc9ad1f0 Revert one other change 2020-11-17 10:50:38 -06:00
Gerard EscalanteandBlake Blackshear 29e8aa4020 Remove unnecessary install; fix default env var value 2020-11-17 10:50:38 -06:00
Gerard EscalanteandBlake Blackshear 777aff403f Fix errors when using nvidia images 2020-11-17 10:50:38 -06:00
Blake BlackshearandGitHub 4b3b702459 Update bug_report.md 2020-11-15 14:51:20 -06:00
Michael WeiandBlake Blackshear 893e6b40a7 nvidia ffmpeg support 2020-11-08 16:42:17 -06:00
Michael WeiandBlake Blackshear a85d780020 lock libedgetpu1 to 15.0, update tflite_runtime 2020-11-08 16:40:01 -06:00
Blake BlackshearandGitHub 34439699ae tweak logo 2020-10-26 10:05:26 -05:00
Blake Blackshear 64b63142b1 start the frame rate tracker 2020-10-26 08:01:18 -05:00
Blake Blackshear cee1ab000b make ffmpeg pid available for cache maintenance (fixes #271) 2020-10-26 08:01:18 -05:00
Blake Blackshear 3ff98770c1 link to mjpeg documentation 2020-10-26 06:36:03 -05:00
tubalainenandBlake Blackshear 244203463d Update on where to find the draw_zones 2020-10-26 06:36:03 -05:00
Blake Blackshear b6f7940b10 hwaccel docs 2020-10-25 14:30:36 -05:00
Blake Blackshear 75312602aa add support for iHD driver 2020-10-25 14:30:36 -05:00
Blake Blackshear 75977128f0 ensure dummy frame is in yuv shape 2020-10-25 14:30:36 -05:00
Blake Blackshear eafde6c677 capture ffmpeg in a dedicated process 2020-10-25 14:30:36 -05:00
Blake Blackshear da0598baef disable flask warning 2020-10-25 14:30:36 -05:00
Blake Blackshear 35ba5e2f7c improve frame memory management 2020-10-25 14:30:36 -05:00
Blake Blackshear 49258d6dbe tweaks for recent issues 2020-10-24 08:52:40 -05:00
Blake Blackshear 5a081e4f00 docs rewrite 2020-10-24 08:23:16 -05:00
Blake Blackshear 4feae472e9 reformatting and fixing typos 2020-10-23 06:56:06 -05:00
tubalainenandBlake Blackshear 4e83239258 Updated information on poly mask 2020-10-23 06:56:06 -05:00
tubalainenandBlake Blackshear c4cccf44a5 poly example image 2020-10-23 06:38:41 -05:00
jacobgibbsandBlake Blackshear 64e7cbcc62 Update README.md
Update attributes name to pull through the FPS
2020-10-19 15:04:34 -05:00
Blake Blackshear dd86e4f317 fix clips path and check for symlinks 2020-10-19 07:01:31 -05:00
Blake Blackshear 4db285a875 remove reference to stable 2020-10-18 14:12:25 -05:00
Blake Blackshear 939d1ba091 use global and ensure dirs exist 2020-10-18 13:47:13 -05:00
Blake Blackshear 0fe8d486d9 make cache/clips dirs configurable 2020-10-18 13:47:13 -05:00
Blake Blackshear a3cb02af5c sync arch names with hassio 2020-10-18 13:47:13 -05:00
Blake Blackshear 45a6b8452c allow config file to be specified by env var and allow json 2020-10-18 13:47:13 -05:00
Blake Blackshear 9d594cc640 allow setting config file location via env var 2020-10-18 13:47:13 -05:00
Blake Blackshear 59e41ae1ac update sample config 2020-10-18 13:47:13 -05:00
Blake Blackshear c6ed16465b move the timestamp to bottom 2020-10-18 13:47:13 -05:00
Blake Blackshear 8f14b36f5a tweak size 2020-10-18 13:47:13 -05:00
Blake Blackshear b6c2491e3b use the actual original shape 2020-10-18 13:47:13 -05:00
Blake Blackshear 8e31d04d90 scale font of timestamp dynamically 2020-10-18 13:47:13 -05:00
Blake Blackshear bf93fbb357 add ability to draw bounding boxes/timestamps on snapshots 2020-10-18 13:47:13 -05:00
Blake Blackshear c064b244db handle empty best frames 2020-10-18 13:47:13 -05:00
Blake Blackshear 0280610e96 fix detector cleanup 2020-10-18 13:47:13 -05:00
Blake Blackshear 4363623c45 reduce zone filter bouncing 2020-10-18 13:47:13 -05:00
Blake Blackshear c960914ec3 prevent the camera process from hanging 2020-10-18 13:47:13 -05:00
Blake Blackshear 9ecc80b443 syntax error 2020-10-18 13:47:13 -05:00
Blake Blackshear 3e146de0a2 update docs 2020-10-18 13:47:13 -05:00
Blake Blackshear bee54c39dc update default detectors 2020-10-18 13:47:13 -05:00
Blake Blackshear 623d138d60 use dictionary for detectors for sensors 2020-10-18 13:47:13 -05:00
Blake Blackshear 76befc1249 only draw during debug 2020-10-18 13:47:13 -05:00
Dejan ZelicandBlake Blackshear 51251b9fb0 Added Healthcheck to Docker Compose
Frigate provides an HTTP server that can be used to detect if frigate is running or not. Using the docker-compose "healthcheck" feature we can set automations to restart the service if it stops working.
2020-10-18 13:47:13 -05:00
RadegastandBlake Blackshear 8c45076bb6 Fix error in the docker run command
I have very little experience with Docker, but it seems the command in the README has two mistakes in it:

- unknown shorthand flag: 'n' in -name
- docker: Error response from daemon: Invalid container name (blakeblackshear/frigate:stable), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed.

I am running Docker version 19.03.13-ce, build 4484c46d9d on Arch linux.
2020-10-18 13:47:13 -05:00
Blake Blackshear 7d683ef399 cleanup frame queue 2020-10-18 13:47:13 -05:00
Blake Blackshear e4da3822b1 cleanup detection shms 2020-10-18 13:47:13 -05:00
Blake Blackshear 12c4cd77c5 only convert pix_fmt when necessary 2020-10-18 13:47:13 -05:00
Blake Blackshear a611cbb942 use yuv420p pixel format for motion 2020-10-18 13:47:13 -05:00
Blake Blackshear f946813ccb support multiple coral devices (fixes #100) 2020-10-18 13:47:13 -05:00
Blake Blackshear 49fca1b839 print stacktraceon segfaults 2020-10-18 13:47:13 -05:00
Blake Blackshear 54cb4a2180 prevent frame from being deleted while in use 2020-10-18 13:47:13 -05:00
Blake Blackshear 9954e3b11e build ffmpeg in separate container 2020-10-18 13:47:13 -05:00
Blake Blackshear 82692b0ddc arm64 ffmpeg cleanup 2020-10-18 13:47:13 -05:00
Blake Blackshear 9d4fdec12f arm64 ffmpeg build 2020-10-18 13:47:13 -05:00
Blake Blackshear ed72c995ef ffmpeg 4.3.1 build for amd64 2020-10-18 13:47:13 -05:00
Blake Blackshear 66c77d1157 base image build cleanup 2020-10-18 13:47:13 -05:00
Blake Blackshear 40c322ad47 arm64 support 2020-10-18 13:47:13 -05:00
Blake Blackshear 83f1e0d713 add rpi dockerfile 2020-10-18 13:47:13 -05:00
Blake Blackshear 2d89044bd3 update dockerfiles for amd64 2020-10-18 13:47:13 -05:00
Blake Blackshear dc4d24c2b9 Base dockerfile for building wheels 2020-10-18 13:47:13 -05:00
Blake Blackshear d5fb20c524 refactor dockerfile 2020-10-18 13:47:13 -05:00
Blake Blackshear 7e92e8bfe8 fix shared memory store usage for events 2020-10-18 13:47:13 -05:00
Blake Blackshear efdcfcef97 cleanup 2020-10-18 13:47:13 -05:00
Blake Blackshear 574ee2a46f update detection handoff to use shared memory 2020-10-18 13:47:13 -05:00
Blake Blackshear ec4d048905 upgrade to python3.8 and switch from plasma store to shared_memory 2020-10-18 13:47:13 -05:00
Blake Blackshear b063099b2a fix zone filters fixes #218 2020-10-11 11:38:32 -05:00
Blake Blackshear 2937dac4c3 update config merging and example config 2020-10-11 11:38:32 -05:00
Blake BlackshearandGitHub 7c283a1805 remove affiliate links 2020-10-08 07:26:02 -05:00
Blake Blackshear 309c0dcda3 proper handling of crop param (fixes #208) 2020-09-20 20:58:10 -05:00
Blake Blackshear b35cc01035 allow the best image timeout to be configurable 2020-09-18 07:14:44 -05:00
Blake Blackshear 6e79a5402e Readme updates 2020-09-17 07:37:27 -05:00
Blake Blackshear a989f8daaf update readme 2020-09-17 07:37:27 -05:00
Blake Blackshear 7880d24b29 prevent the cache from growing indefinitely 2020-09-17 07:37:27 -05:00
Blake Blackshear fdc8bbf72d move zone config under each camera 2020-09-17 07:37:27 -05:00
Blake Blackshear 005e188d38 continue if frames not in frame manager 2020-09-17 07:37:27 -05:00
Blake Blackshear adcc3e9b98 copy obj so crop doesnt change 2020-09-17 07:37:27 -05:00
Blake Blackshear 5fe201da25 avoid processing broken frames 2020-09-17 07:37:27 -05:00
Blake Blackshear 974f7bd0df fix mqtt snapshot 2020-09-17 07:37:27 -05:00
Blake Blackshear 780ae7cd4f allow specifying labels to save clips for 2020-09-17 07:37:27 -05:00
Blake Blackshear 50e568b84c allow setting size and cropping of snapshots and best.jpg endpoint 2020-09-17 07:37:27 -05:00
Blake Blackshear 1ce993051e add support for polygon masks 2020-09-17 07:37:27 -05:00
Blake Blackshear 69406343ee allow setting the camera fps if needed 2020-09-17 07:37:27 -05:00
Blake Blackshear 1c33b8acb2 handle mask files that failed to read 2020-09-17 07:37:27 -05:00
Blake Blackshear 5e77436d39 fix coral fps value 2020-09-17 07:37:27 -05:00
Blake Blackshear e26308a05b print score info 2020-09-17 07:37:27 -05:00
Blake Blackshear c16ee3186f fix masks 2020-09-17 07:37:27 -05:00
Blake Blackshear fedeeab561 fix watchdog 2020-09-17 07:37:27 -05:00
Blake Blackshear bfcaabecfa fix var name 2020-09-17 07:37:27 -05:00
Blake Blackshear 606fa6f6d5 once a true positive always a true positive 2020-09-17 07:37:27 -05:00
Blake Blackshear 6a8d8bf53d dont trigger zones for false positives 2020-09-17 07:37:27 -05:00
Blake Blackshear 1f81cba706 only save a clip if its not a false positive 2020-09-17 07:37:27 -05:00
Blake Blackshear 5db7b242aa another fix 2020-09-17 07:37:27 -05:00
Blake Blackshear 0b7f65e227 fixes 2020-09-17 07:37:27 -05:00
Blake Blackshear 2f758af097 allow setting specific edgetpu in config 2020-09-17 07:37:27 -05:00
Blake Blackshear f64320a464 remove invalid tests 2020-09-17 07:37:27 -05:00
Blake Blackshear 3e87ef6426 update pip 2020-09-17 07:37:27 -05:00
Blake Blackshear acb75fa02d refactor and reduce false positives 2020-09-17 07:37:27 -05:00
Blake Blackshear ea4ecae27c Refactor with a working false positive test 2020-09-17 07:37:27 -05:00
Carl ElkinsandBlake Blackshear a8556a729b Added support for PCIe TPU, as well as USB
Also added message showing which found
2020-09-04 20:56:16 -05:00
Blake BlackshearandGitHub 068df3ef2d Update bug_report.md 2020-08-22 06:49:45 -05:00
Blake BlackshearandGitHub b304139db2 Update bug_report.md 2020-08-22 06:49:05 -05:00
Ryan PressandBlake Blackshear df2aae5169 Fix zone filters 2020-08-19 09:58:53 -05:00
Blake BlackshearandGitHub 351ac4ec7d Update bug_report.md 2020-08-17 07:48:53 -05:00
Blake BlackshearandGitHub 12e40291c0 Update bug_report.md 2020-08-17 07:41:13 -05:00
Blake BlackshearandGitHub 8af7d51159 Update issue templates 2020-08-17 07:33:51 -05:00
Blake Blackshear 84ada716ac fix readme images 2020-08-09 13:18:12 -05:00
Blake Blackshear cbcc89be9c readme tweaks 2020-08-09 13:16:40 -05:00
Blake Blackshear 73a5e11b9b Add details for debug info 2020-08-09 13:06:33 -05:00
Blake Blackshear 194baaeb56 fix example config 2020-08-08 20:58:54 -05:00
Blake Blackshear 469259d663 dont refresh cache if exiting 2020-08-08 07:40:48 -05:00
Blake Blackshear f3db69d975 update docs 2020-08-08 07:40:48 -05:00
Blake Blackshear 0914cb71ad allow resizing best image 2020-08-08 07:40:48 -05:00
Blake Blackshear 0ae2806eb4 fix overwriting variable 2020-08-08 07:40:48 -05:00
Blake Blackshear adcfe699c2 ensure frigate can exit gracefully 2020-08-08 07:40:48 -05:00
Blake Blackshear e5048f98b6 fix latest size calculation 2020-08-08 07:40:48 -05:00
Blake Blackshear e6c6338266 allow mask to be base64 encoded into the config file 2020-08-08 07:40:48 -05:00
Blake Blackshear 1f03c8cb8c add latest jpg endpoint 2020-08-08 07:40:48 -05:00
Blake Blackshear 69f5249788 initial implementation of zones 2020-08-08 07:40:48 -05:00
Blake Blackshear 3a1f1c946b better camera name handling 2020-08-01 18:20:44 -05:00
Blake Blackshear d88745af6e simplify directory creation 2020-08-01 18:20:44 -05:00
Blake Blackshear 709d917f0c update snapshot with better scores 2020-08-01 18:20:44 -05:00
Blake Blackshear 918386bdc1 use a random string in the object id instead of the index 2020-08-01 18:20:44 -05:00
Blake Blackshear a8c0fadf95 make pre_capture time configurable 2020-08-01 18:20:44 -05:00
Blake Blackshear 6dc7b8f246 typo 2020-08-01 18:20:44 -05:00
Blake Blackshear 71f6f0bee4 typo 2020-08-01 18:20:44 -05:00
Blake Blackshear a00afb61c0 add warning about cache to config 2020-08-01 18:20:44 -05:00
Blake Blackshear 5dbe6c5f36 add mqtt messages to readme 2020-08-01 18:20:44 -05:00
Blake Blackshear 16732aa5b3 update example config 2020-08-01 18:20:44 -05:00
Blake Blackshear 3d2f1437e4 filter objects before triggering events 2020-08-01 18:20:44 -05:00
Blake Blackshear fbe721c860 remove vsync drop because it breaks segment 2020-08-01 18:20:44 -05:00
Blake Blackshear 7383db60b0 save clips for tracked objects 2020-08-01 18:20:44 -05:00
Blake Blackshear 53ccc903da switch to MIT license 2020-07-26 12:07:47 -05:00
Blake Blackshear 9d1f9f35e5 fix model paths 2020-07-26 12:07:47 -05:00
Blake Blackshear c1f522ff54 fix box merging 2020-07-26 12:00:46 -05:00
mattheysandBlake Blackshear b345571a63 Update CPU model to Mobilenet v2
Inference speed went from ~470ms to ~530ms, however average confidence went from ~75% to ~90%+
2020-07-03 12:32:01 -05:00
Blake Blackshear f29ee6165f add proxmox tip 2020-07-01 07:49:01 -05:00
Blake Blackshear ec6432cc5f add hardware section and fix typos 2020-07-01 07:49:01 -05:00
walthowdandBlake Blackshear 8c917667b6 Added mask overlay example and docker logging 2020-07-01 07:49:01 -05:00
walthowdandBlake Blackshear 941434b8d8 Added mask overlay example 2020-07-01 07:49:01 -05:00
walthowdandBlake Blackshear 2d0632adf8 Updated README with abstracted HA config, expanded tips section 2020-07-01 07:49:01 -05:00
walthowdandBlake Blackshear f1afaf641a Mask example images 2020-07-01 07:49:01 -05:00
Blake Blackshear 743116a733 install tzdata 2020-06-02 05:25:02 -05:00
Blake Blackshear 8e77cf25d9 handle ffmpeg process hangs that dont exit ffmpeg 2020-06-02 05:25:02 -05:00
Blake Blackshear 7d33e03943 ensure detection_start doesnt change values between conditions 2020-06-02 05:25:02 -05:00
Blake Blackshear 0c44666c89 drop plasma store stderr logs 2020-06-02 05:25:02 -05:00
Blake Blackshear ddaa746807 resize to aspect ratio of frame 2020-06-02 05:25:02 -05:00
Blake Blackshear 760e1ffe1d skip frames in the capture thread instead 2020-06-02 05:25:02 -05:00
Blake Blackshear 15b4024715 expose frame time at each step of processing 2020-06-02 05:25:02 -05:00
Blake BlackshearandBlake Blackshear 918112a793 ensure the previous frame is deleted when the new one is stored 2020-06-02 05:25:02 -05:00
Blake Blackshear 4ee200a81c move ffmpeg capture to a separate thread and use a queue 2020-06-02 05:25:02 -05:00
Blake Blackshear e37eba49ff make object processor resilient to plasma failures 2020-06-02 05:25:02 -05:00
Blake Blackshear 6de8e3bd1f remove sharedarray references 2020-06-02 05:25:02 -05:00
Blake Blackshear 3a9781c4f8 handle various scenarios with external process failures 2020-06-02 05:25:02 -05:00
Blake Blackshear a60b9211d2 allow specifying debug view fps and size 2020-03-03 20:26:53 -06:00
Blake Blackshear 777fb1d5d1 Update to latest url for tensorflow lite wheel 2020-03-03 20:26:53 -06:00
Blake Blackshear 8e9110f42e if the detections dont come back in 10s, give up 2020-03-03 20:26:53 -06:00
Blake Blackshear c80137e059 call the restart function and handle errors better in the detection process 2020-03-03 20:26:53 -06:00
Blake Blackshear 2768e1dadb clarify mqtt password readme 2020-03-03 20:26:53 -06:00
Blake Blackshear 2fbba01577 readme updates 2020-03-03 20:26:53 -06:00
Blake Blackshear e7c536ea31 allow mqtt password to be set by env var 2020-03-03 20:26:53 -06:00
Blake Blackshear 1734c0569a update benchmark script to mirror actual frigate use 2020-03-03 20:26:53 -06:00
Blake Blackshear a5bef89123 improve detection processing and restart when stuck 2020-03-03 20:26:53 -06:00
Blake Blackshear d8aa73d26e handle ffmpeg process failures in the camera process itself 2020-03-03 20:26:53 -06:00
Blake Blackshear 791409d5e5 add a few print statements for debugging 2020-03-03 20:26:53 -06:00
Blake Blackshear 01bf89907d dont kill the camera process from the main process 2020-03-03 20:26:53 -06:00
Blake Blackshear 8e73c7e95e increase the buffer size a bit 2020-03-03 20:26:53 -06:00
Blake Blackshear 088bd18adb add a few more metrics to debug 2020-03-03 20:26:53 -06:00
Blake Blackshear 2e8c7ec225 cleanup the plasma store when finished with a frame 2020-03-03 20:26:53 -06:00
Blake Blackshear 9340a74371 dont redirect stdout for plasma store 2020-03-03 20:26:53 -06:00
Blake Blackshear 5998de610b reset detection fps 2020-03-03 20:26:53 -06:00
Blake Blackshear dfabff3846 dont change dictionary while iterating 2020-03-03 20:26:53 -06:00
Blake Blackshear 76a7a3bad5 allow specifying the frame size in the config instead of detecting 2020-03-03 20:26:53 -06:00
Blake Blackshear a3fa97dd52 ensure missing objects are expired even when other object types are in the frame 2020-03-03 20:26:53 -06:00
Blake Blackshear 1d2a41129c Fix watchdog last_frame calculation 2020-03-03 20:26:53 -06:00
Blake Blackshear 956298128d cleanup 2020-03-03 20:26:53 -06:00
Blake Blackshear e6892d66b8 update docs and add back benchmark 2020-03-03 20:26:53 -06:00
Blake Blackshear 6ef22cf578 fix watchdog 2020-03-03 20:26:53 -06:00
Blake Blackshear 3e6f6edf7e check avg wait before dropping frames 2020-03-03 20:26:53 -06:00
Blake Blackshear 81c5b96ed7 fix watchdog restart 2020-03-03 20:26:53 -06:00
Blake Blackshear 6f6d202c99 improve watchdog and coral fps tracking 2020-03-03 20:26:53 -06:00
Blake Blackshear 2fc389c3ad dont log http requests 2020-03-03 20:26:53 -06:00
Blake Blackshear 05951aa7da cleanup 2020-03-03 20:26:53 -06:00
Blake Blackshear bb8e4621f5 add models and convert speed to ms 2020-03-03 20:26:53 -06:00
Blake Blackshear 04e9ab5ce4 add watchdog for camera processes 2020-03-03 20:26:53 -06:00
Blake Blackshear 1089a40943 cleanup old code 2020-03-03 20:26:53 -06:00
Blake Blackshear 68c3a069ba add a min_fps option 2020-03-03 20:26:53 -06:00
Blake Blackshear 80b9652f7a check plasma store and consolidate frame drawing 2020-03-03 20:26:53 -06:00
Blake Blackshear 569e07949f split into separate processes 2020-03-03 20:26:53 -06:00
Blake Blackshear ffa9534549 update tflite to 2.1.0 2020-03-03 20:26:53 -06:00
Blake Blackshear c539993387 refactor some classes into new files 2020-03-03 20:26:53 -06:00
Blake Blackshear 8a572f96d5 tweak process handoff 2020-03-03 20:26:53 -06:00
Blake Blackshear 24cb3508e8 Mostly working detection in a separate process 2020-03-03 20:26:53 -06:00
Blake Blackshear 3f34c57e31 read from ffmpeg 2020-03-03 20:26:53 -06:00
Blake Blackshear 4c618daa90 WIP: revamp to incorporate motion 2020-03-03 20:26:53 -06:00
Blake Blackshear cd057370e1 fallback to opencv to detect resolution and allow config to specify 2020-02-22 09:03:00 -06:00
Blake Blackshear 6263912655 use ffprobe to get frame shape (fixes #87) 2020-02-22 09:03:00 -06:00
Blake Blackshear af247275cf make timestamp on snapshots configurable (fixes #88) 2020-02-22 09:03:00 -06:00
Blake Blackshear 1198c29dac make watchdog timeout configurable per camera (fixes #95) 2020-02-22 09:03:00 -06:00
Blake Blackshear 169603d3ff attempt to fix regions in process key error 2020-02-22 09:03:00 -06:00
Blake Blackshear dc7eecebc6 clarify config 2020-02-22 09:03:00 -06:00
Blake Blackshear 0dd4087d5d switch base image back to ubuntu:18.04 2020-02-22 09:03:00 -06:00
Blake Blackshear 6ecf87fc60 update config example 2020-02-22 09:03:00 -06:00
Blake Blackshear ebcf1482f8 remove region in process when skipping 2020-02-22 09:03:00 -06:00
Blake Blackshear 50bcf60893 switch to opencv headless 2020-02-22 09:03:00 -06:00
Blake Blackshear 38efbd63ea add camera name to ffmpeg log messages 2020-02-22 09:03:00 -06:00
Blake Blackshear 50bcad8b77 skip regions when the queue is too full and add more locks 2020-02-22 09:03:00 -06:00
Blake Blackshear cfffb219ae switch back to stretch for hwaccel issues 2020-02-22 09:03:00 -06:00
Blake Blackshear 382d7be50a check correct object 2020-02-22 09:03:00 -06:00
Blake Blackshear f43dc36a37 cleanup 2020-02-22 09:03:00 -06:00
Blake Blackshear 38e7fa07d2 add a label position arg for bounding boxes 2020-02-22 09:03:00 -06:00
Blake Blackshear e261c20819 let the queues get as big as needed 2020-02-22 09:03:00 -06:00
Blake Blackshear 3a66e672d3 notify mqtt when objects deregistered 2020-02-22 09:03:00 -06:00
Blake Blackshear 2aada930e3 fix multiple object type tracking 2020-02-22 09:03:00 -06:00
Blake Blackshear d87f4407a0 switch everything to run off of tracked objects 2020-02-22 09:03:00 -06:00
Blake Blackshear be5a114f6a group by label before tracking objects 2020-02-22 09:03:00 -06:00
Blake Blackshear 32b212c7b6 fix mask filtering 2020-02-22 09:03:00 -06:00
Blake Blackshear 76c8e3a12f make a copy 2020-02-22 09:03:00 -06:00
Blake Blackshear 16f7a361c3 fix object filters 2020-02-22 09:03:00 -06:00
Blake Blackshear 634b87307f group by label before suppressing boxes 2020-02-22 09:03:00 -06:00
Blake Blackshear 1d4fbbdba3 update all obj props 2020-02-22 09:03:00 -06:00
Blake Blackshear 65579e9cbf add thread to write frames to disk 2020-02-22 09:03:00 -06:00
Blake Blackshear 49dc029c43 merge boxes by label 2020-02-22 09:03:00 -06:00
Blake Blackshear 08174d8db2 fix color of best image 2020-02-22 09:03:00 -06:00
Blake Blackshear 5199242a68 remove unused current frame variable 2020-02-22 09:03:00 -06:00
Blake Blackshear 725dd3220c removing pillow-simd for now 2020-02-22 09:03:00 -06:00
Blake Blackshear 10dc56f6ea revamp dockerfile 2020-02-22 09:03:00 -06:00
Blake Blackshear cc2abe93a6 track objects and add config for tracked objects 2020-02-22 09:03:00 -06:00
Blake Blackshear 0c6717090c implement filtering and switch to NMS with OpenCV 2020-02-22 09:03:00 -06:00
Blake Blackshear f5a2252b29 cleanup imports 2020-02-22 09:03:00 -06:00
Blake Blackshear 02efb6f415 fixing a few things 2020-02-22 09:03:00 -06:00
Blake Blackshear 5b4c6e50bc dedupe detected objects 2020-02-22 09:03:00 -06:00
Blake Blackshear 9cc46a71cb working dynamic regions, but messy 2020-02-22 09:03:00 -06:00
Blake Blackshear be1673b00a process detected objects in a queue 2020-02-22 09:03:00 -06:00
Blake Blackshear b6130e77ff label threads and implements stats endpoint 2020-02-22 09:03:00 -06:00
Blake Blackshear 4180c710cd refactor resizing into generic priority queues 2020-02-22 09:03:00 -06:00
Blake Blackshear ab3e70b4db check to see if we have a frame before trying to send 2020-01-02 07:39:57 -06:00
Blake Blackshear d90e408d50 set the current object status to off when expired 2020-01-02 07:39:57 -06:00
Blake Blackshear 6c87ce0879 cache the computed jpg bytes to reduce cpu usage 2020-01-02 07:39:57 -06:00
Blake Blackshear b7b4e38f62 slow down the preview feed to lower cpu usage 2020-01-02 07:39:57 -06:00
Blake Blackshear 480175d70f add color map to use different colors for different objects 2020-01-02 07:39:57 -06:00
Blake Blackshear bee99ca6ff track and report all detected object types 2020-01-02 07:39:57 -06:00
Blake BlackshearandGitHub 5c01720567 Update README.md 2019-12-12 08:08:32 -06:00
Blake BlackshearandGitHub 262f45c8bc Update sponsorship option 2019-12-11 06:35:17 -06:00
tubalainenandBlake Blackshear 22bb17b2fd Filename updated but not the reference 2019-12-09 06:01:27 -06:00
Blake Blackshear 3a3afe14bf change the ffmpeg config for global defaults and overrides 2019-12-08 16:03:23 -06:00
Blake Blackshear 01f058a482 clarify optional properties 2019-12-08 16:03:23 -06:00
Blake Blackshear d899ef158e fix datestamp positioning 2019-12-08 16:03:23 -06:00
Blake Blackshear 39d64f7ba7 add health check and handle bad camera names 2019-12-08 16:03:23 -06:00
Blake Blackshear f148eb5a7b add some comments for regions 2019-12-08 16:03:23 -06:00
Blake Blackshear 297e2f1c0c allow mqtt client_id to be set for multi frigate setups 2019-12-08 16:03:23 -06:00
Blake Blackshear e818744d81 print the frame time on the image 2019-12-08 08:55:54 -06:00
Blake Blackshear ceedfae993 add max person area 2019-12-08 07:17:18 -06:00
Blake Blackshear e13563770d allow full customization of input 2019-12-08 07:06:52 -06:00
Blake Blackshear a659019d1a move config example 2019-12-08 07:06:52 -06:00
blakeblackshear ba71927d53 allow setting custom output params and setting the log level for ffmpeg 2019-08-25 08:54:19 -05:00
blakeblackshear 04fed31eac increase watchdog timeout to 10 seconds 2019-08-25 08:54:19 -05:00
blakeblackshear ebaa8fac01 tweak input params and gracefully kill ffmpeg 2019-08-25 08:54:19 -05:00
blakeblackshear 2ec45cd1b6 send the best person frame over mqtt for faster updates in homeassistant 2019-08-25 08:54:19 -05:00
blakeblackshear 700bd1e3ef use a thread to capture frames from the subprocess so it can be killed properly 2019-07-30 19:11:22 -05:00
Alexis BirkillandBlake Blackshear c9e9f7a735 Fix comparison of object x-coord against mask (#52) 2019-07-30 19:11:22 -05:00
blakeblackshear aea4dc8724 a few fixes 2019-07-30 19:11:22 -05:00
blakeblackshear 12d5007b90 add required packages for VAAPI 2019-07-30 19:11:22 -05:00
blakeblackshear 8970e73f75 comment formatting and comment out mask in example config 2019-07-30 19:11:22 -05:00
blakeblackshear 1ba006b24f add some comments to the sample config 2019-07-30 19:11:22 -05:00
blakeblackshear 4a58f16637 tweak the label position 2019-07-30 19:11:22 -05:00
blakeblackshear 436b876b24 add support for ffmpeg hwaccel params and better mask handling 2019-07-30 19:11:22 -05:00
blakeblackshear a770ab7f69 specify a client id for frigate 2019-07-30 19:11:22 -05:00
blakeblackshear 806acaf445 update dockerignore and debug option 2019-07-30 19:11:22 -05:00
Kyle NiewiadaandBlake Blackshear c653567cc1 Add area labels to bounding boxes (#47)
* Add object size to the bounding box

Remove script from Dockerfile

Fix framerate command

Move default value for framerate

update dockerfile

dockerfile changes

Add person_area label to surrounding box


Update dockerfile


ffmpeg config bug


Add `person_area` label to `best_person` frame


Resolve debug view showing area label for non-persons


Add object size to the bounding box


Add object size to the bounding box

* Move object area outside of conditional to work with all object types
2019-07-30 19:11:22 -05:00
blakeblackshear 8fee8f86a2 take_frame config example 2019-07-30 19:11:22 -05:00
blakeblackshear 59a4b0e650 add ability to process every nth frame 2019-07-30 19:11:22 -05:00
blakeblackshear 834a3df0bc added missing scripts 2019-07-30 19:11:22 -05:00
blakeblackshear c41b104997 extra ffmpeg params to reduce latency 2019-07-30 19:11:22 -05:00
blakeblackshear 7028b05856 add a benchmark script 2019-07-30 19:11:22 -05:00
blakeblackshear 2d22a04391 reduce verbosity of ffmpeg 2019-07-30 19:11:22 -05:00
blakeblackshear baa587028b use a regular subprocess for ffmpeg, refactor bounding box drawing 2019-07-30 19:11:22 -05:00
blakeblackshear 2b51dc3e5b experimental: running ffmpeg directly and capturing raw frames 2019-07-30 19:11:22 -05:00
blakeblackshear 9f8278ea8f working odroid build, still needs hwaccel 2019-07-30 19:11:22 -05:00
Blake BlackshearandGitHub 56b9c754f5 Update README.md 2019-06-18 06:19:13 -07:00
Blake BlackshearandGitHub 5c4f5ef3f0 Create FUNDING.yml 2019-06-18 06:15:05 -07:00
Blake BlackshearandGitHub 8c924896c5 Merge pull request #36 from drcrimzon/patch-1
Add MQTT connection error handling
2019-05-15 07:10:53 -05:00
Mike WilkinsonandGitHub 2c2f0044b9 Remove error redundant check 2019-05-14 11:09:57 -04:00
Mike WilkinsonandGitHub 874e9085a7 Add MQTT connection error handling 2019-05-14 08:34:14 -04:00
Blake BlackshearandGitHub e791d6646b Merge pull request #34 from blakeblackshear/watchdog
0.1.2
2019-05-11 07:43:09 -05:00
blakeblackshear 3019b0218c make the threshold configurable per region. fixes #31 2019-05-11 07:39:27 -05:00
blakeblackshear 6900e140d5 add a watchdog to the capture process to detect silent failures. fixes #27 2019-05-11 07:16:15 -05:00
Blake BlackshearandGitHub 911c1b2bfa Merge pull request #32 from tubalainen/patch-2
Clarification on username and password for MQTT
2019-05-11 07:14:19 -05:00
Blake BlackshearandGitHub f4587462cf Merge pull request #33 from tubalainen/patch-3
Update of the home assistant integration example
2019-05-11 07:14:01 -05:00
tubalainenandGitHub cac1faa8ac Update of the home assistant integration example
sensor to binary_sensor
device_class type "moving" does not exist, update to "motion"
2019-05-10 16:47:40 +02:00
tubalainenandGitHub 9525bae5a3 Clarification on username and password for MQTT 2019-05-10 16:36:22 +02:00
blakeblackshear dbcfd109f6 fix missing import 2019-05-10 06:19:39 -05:00
Blake BlackshearandGitHub f95d8b6210 Merge pull request #26 from blakeblackshear/mask
add the ability to mask the standing location of a person
2019-05-01 06:43:32 -05:00
blakeblackshear 4dacf02ef9 add the ability to mask the standing location of a person 2019-04-30 20:35:22 -05:00
Blake BlackshearandGitHub 3e803b6a03 Merge pull request #20 from blakeblackshear/edgetpu
edgetpu
2019-03-30 08:28:36 -05:00
blakeblackshear 7a7f507781 update diagram 2019-03-30 08:22:41 -05:00
blakeblackshear e0b9b616ce cleanup and update readme 2019-03-30 07:58:31 -05:00
blakeblackshear 4476bd8a13 log capture process pid 2019-03-29 21:18:20 -05:00
blakeblackshear 5aa3775c77 create a camera object for each camera in the config 2019-03-29 21:14:24 -05:00
blakeblackshear edf0cd36df add back flask endpoints 2019-03-29 21:02:40 -05:00
blakeblackshear 0279121d77 WIP: convert to camera class 2019-03-29 20:49:27 -05:00
blakeblackshear 8774e537dc implementing a config file for a single camera 2019-03-28 07:30:58 -05:00
blakeblackshear 0514eeac03 switch to a thread for object detection 2019-03-27 20:44:57 -05:00
blakeblackshear a074945394 missing param and updated readme 2019-03-27 06:55:32 -05:00
blakeblackshear a26d2217d4 implement min person size again 2019-03-27 06:45:27 -05:00
blakeblackshear 200d769003 removing motion detection 2019-03-27 06:17:00 -05:00
blakeblackshear 48aa245914 convert docker build to x86 2019-03-26 05:44:33 -05:00
blakeblackshear ada8ffccf9 fix for queue size growing too large 2019-03-25 20:35:44 -05:00
blakeblackshear bca4e78e9a use a queue instead 2019-03-25 06:24:36 -05:00
blakeblackshear 7d3027e056 looping over all regions with motion. ugly, but working 2019-03-20 07:11:38 -05:00
blakeblackshear c406fda288 fixes 2019-03-19 06:29:58 -05:00
blakeblackshear 8ff9a982b6 start the detection process 2019-03-18 07:48:04 -05:00
blakeblackshear f2c205be99 prep frames for object detection in a separate process 2019-03-18 07:24:24 -05:00
blakeblackshear 862aa2d3f0 only resize when needed 2019-03-17 20:12:31 -05:00
blakeblackshear 8bae05cfe2 first working version, single region and motion detection disabled 2019-03-17 09:03:52 -05:00
blakeblackshear de9c3f4d74 wait 5 seconds to clear the motion flag 2019-03-15 20:16:19 -05:00
blakeblackshear c12e19349e only cleanup old objects when motion is detected so stationary objects are still detected 2019-03-15 20:15:41 -05:00
blakeblackshear afb70f11a8 switch mqtt to a binary on/off instead of sending a message for each score 2019-03-12 20:54:43 -05:00
blakeblackshear 85259ca00c add support for mqtt user/pass. closes #7 2019-03-09 13:41:35 -06:00
blakeblackshear 1a55008cd5 update readme 2019-03-05 21:42:09 -06:00
blakeblackshear 2bf4820dc6 update readme 2019-03-03 10:04:27 -06:00
blakeblackshear e597a08a66 prevent unnecessary early exit from loop 2019-03-02 15:20:53 -06:00
blakeblackshear 5dc76803d6 cleanup 2019-02-28 06:49:27 -06:00
blakeblackshear 80f7e998ae resend availability if disconnected 2019-02-28 06:30:34 -06:00
blakeblackshear df7b90e367 store the best recent person image and reconnect the RTSP stream if unable to grab several consecutive frames 2019-02-27 20:55:07 -06:00
blakeblackshear 2e3c9da650 manage 2 seconds worth of motion frames for processing 2019-02-26 20:29:52 -06:00
blakeblackshear 89c03c4455 update readme 2019-02-25 20:34:04 -06:00
blakeblackshear c5e4bc275c update readme 2019-02-25 20:30:18 -06:00
blakeblackshear 86f5d8128d initial refactoring 2019-02-25 20:27:02 -06:00
blakeblackshear 9186634c60 update readme 2019-02-25 06:48:31 -06:00
blakeblackshear 039782ad2e add min person area per region 2019-02-25 06:48:01 -06:00
blakeblackshear bf6d6c3796 make debug a env var 2019-02-24 08:41:03 -06:00
blakeblackshear b4e5c812ce switch to a queue for detected objects and expire objects after 1 second 2019-02-24 08:13:36 -06:00
blakeblackshear 122a1666ca just save images when a person is detected 2019-02-23 07:43:14 -06:00
blakeblackshear 5258803cd7 only save images of persons 2019-02-22 21:03:47 -06:00
blakeblackshear 9486a321c6 update masks 2019-02-21 06:45:36 -06:00
blakeblackshear bff1826bf5 only write the first motion frame 2019-02-20 17:44:51 -06:00
blakeblackshear 19323ac957 only clear the flag and notify if it was set 2019-02-20 17:43:27 -06:00
blakeblackshear aeece7b98c handle RTSP stream errors 2019-02-20 07:12:07 -06:00
blakeblackshear a73760989c clarify comment 2019-02-20 07:11:49 -06:00
Blake BlackshearandGitHub eded4d172f Merge pull request #5 from blakeblackshear/motion_masking
Motion masking
2019-02-20 06:21:22 -06:00
blakeblackshear 496b96b4f7 make motion detection less sensitive to rain
reduces the significance of fast moving objects and prioritizes objects that overlap in location across. multiple frames
2019-02-20 06:20:52 -06:00
blakeblackshear f54fa2e56c add the ability to apply a masking image 2019-02-19 21:15:57 -06:00
Blake BlackshearandGitHub 2929773c10 Merge pull request #4 from blakeblackshear/thread_signals
Thread signals
2019-02-19 06:48:15 -06:00
blakeblackshear c43d83be20 update readme 2019-02-19 06:47:37 -06:00
blakeblackshear b6547de82c adjust debugging params and alpha for background averaging 2019-02-19 06:47:00 -06:00
blakeblackshear 290150603e remove debug time 2019-02-17 20:36:01 -06:00
blakeblackshear 03c57bf67d use a condition to signal to the mqtt publisher that objects were parsed 2019-02-17 13:12:27 -06:00
blakeblackshear 42ff739cea move mqtt motion publishing into separate thread 2019-02-17 12:59:51 -06:00
blakeblackshear 92e1833def use a condition to notify when object detection has run 2019-02-17 12:32:19 -06:00
blakeblackshear 957bd2adeb use events to signal when motion is detected 2019-02-17 12:12:48 -06:00
blakeblackshear 8525f05f29 get a lock when copying frame for mjpeg stream 2019-02-17 11:54:40 -06:00
blakeblackshear b67f323215 use a lock and condition to signal to motion detection processes 2019-02-17 11:52:56 -06:00
blakeblackshear 284a96d5c7 update readme 2019-02-17 10:37:11 -06:00
blakeblackshear a84f88c5a5 comments 2019-02-17 10:36:09 -06:00
blakeblackshear 2b0ebfa354 draw contours and area on image for motion debugging 2019-02-17 10:34:48 -06:00
blakeblackshear d9d3937a0f reset motion counter when no contours exist 2019-02-17 08:00:35 -06:00
blakeblackshear 7d4cfe43ad WIP: debug images 2019-02-17 07:27:11 -06:00
blakeblackshear f7c8b742e8 increase min confidence to .5 2019-02-17 07:26:09 -06:00
blakeblackshear 861539e8b5 require a minimum of 3 consecutive motion frames to try and reduce false positives from rain 2019-02-16 15:05:58 -06:00
blakeblackshear 225f434718 reduce motion timeout to 2 seconds 2019-02-16 15:04:31 -06:00
blakeblackshear 6bdacffa2e reduce the motion detection timeout to 5 seconds 2019-02-10 20:09:25 -06:00
blakeblackshear a3c5dd91a1 use a topic prefix and implement last will messages 2019-02-10 14:43:21 -06:00
blakeblackshear d43c17238c update readme 2019-02-10 14:25:30 -06:00
blakeblackshear f3376a83d6 merged shared memory objects and regions and set color of bounding box based on motion 2019-02-10 14:25:17 -06:00
Blake BlackshearandGitHub 30c223711d Merge pull request #3 from blakeblackshear/mqtt
Mqtt
2019-02-10 12:01:47 -06:00
blakeblackshear ab1fda3a0e add mqtt and update readme 2019-02-10 12:00:52 -06:00
blakeblackshear 83c9b8fb7a add mqtt to dockerfile 2019-02-10 08:03:12 -06:00
Blake BlackshearandGitHub e997591e70 Merge pull request #2 from blakeblackshear/motion_detection
Motion detection
2019-02-09 20:40:49 -06:00
blakeblackshear ebd15489b0 add support for a minimum object size 2019-02-09 20:38:11 -06:00
blakeblackshear 51e8a8300f add imutils to container 2019-02-09 20:37:46 -06:00
blakeblackshear 80dbed8055 integrate object detection with motion detection 2019-02-09 10:17:07 -06:00
blakeblackshear 53c9a7368d rework object detection to watch the motion flag 2019-02-09 09:15:55 -06:00
blakeblackshear 5d894f006a basic motion detection working 2019-02-09 08:51:11 -06:00
blakeblackshear d8f27658f8 create shared value for motion detection 2019-02-09 07:32:49 -06:00
Blake BlackshearandGitHub 6e8409d203 Merge pull request #1 from blakeblackshear/regions
Regions
2019-02-09 07:24:58 -06:00
blakeblackshear 3e4256602f update readme 2019-02-09 07:23:54 -06:00
blakeblackshear 071fcf6ea2 update opencv 2019-02-09 07:23:18 -06:00
blakeblackshear 4a77046c7c update readme 2019-02-04 07:10:42 -06:00
blakeblackshear 0359e2d2a1 dynamic number of processes based on selected regions 2019-02-04 07:07:13 -06:00
blakeblackshear 623a3044fb multiple hard coded processes 2019-02-04 06:34:32 -06:00
blakeblackshear 072997736c parse the objects into a global array in a separate thread 2019-02-04 06:18:49 -06:00
blakeblackshear b91c24bf8f crop the frame and calculate the coordinates in the subprocess and add labels to the image 2019-02-02 08:16:35 -06:00
blakeblackshear 11af9bb953 wip: focus on dynamic region and delay drawing until viewing 2019-02-01 21:38:13 -06:00
blakeblackshear a976403edc got bounding boxes repositioned for full frame 2019-02-01 06:57:03 -06:00
blakeblackshear 98ce5a4a59 wip: just detect objects in a specific area 2019-02-01 06:35:48 -06:00
blakeblackshear 7e3d2f6611 reduce CPU usage 2019-02-01 06:35:10 -06:00
blakeblackshear 72393be6d6 initial commit 2019-01-26 08:02:59 -06:00
191 changed files with 33452 additions and 943 deletions
+7
View File
@@ -0,0 +1,7 @@
README.md
docs/
.gitignore
debug
config/
*.pyc
.git
+1
View File
@@ -0,0 +1 @@
github: blakeblackshear
+56
View File
@@ -0,0 +1,56 @@
---
name: Bug report or Support request
about: ''
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what your issue is.
**Version of frigate**
Output from `/version`
**Config file**
Include your full config file wrapped in triple back ticks.
```yaml
config here
```
**Frigate container logs**
```
Include relevant log output here
```
**Frigate stats**
```json
Output from frigate's /stats endpoint
```
**FFprobe from your camera**
Run the following command and paste output below
```
ffprobe <stream_url>
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Computer Hardware**
- OS: [e.g. Ubuntu, Windows]
- Install method: [e.g. Addon, Docker Compose, Docker Command]
- Virtualization: [e.g. Proxmox, Virtualbox]
- Coral Version: [e.g. USB, PCIe, None]
- Network Setup: [e.g. Wired, WiFi]
**Camera Info:**
- Manufacturer: [e.g. Dahua]
- Model: [e.g. IPC-HDW5231R-ZE]
- Resolution: [e.g. 720p]
- FPS: [e.g. 5]
**Additional context**
Add any other context about the problem here.
+28
View File
@@ -0,0 +1,28 @@
name: On push
on:
push:
branches:
- master
- release-0.8.0
jobs:
deploy-docs:
name: Deploy docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 12.x
- run: npm install
- name: Build docs
run: npm run build
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
+11
View File
@@ -0,0 +1,11 @@
.DS_Store
*.pyc
debug
.vscode
config/config.yml
models
*.mp4
*.db
frigate/version.py
web/build
web/node_modules
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-5
View File
@@ -1,5 +0,0 @@
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
-2
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
/*! algoliasearch-lite.umd.js | 4.8.4 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{179:function(n,i,o){"use strict";o.r(i);var r=o(55);for(var t in r)["default"].indexOf(t)<0&&function(n){o.d(i,n,(function(){return r[n]}))}(t)}}]);
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{117:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),l=a(110);t.default=function(){return o.a.createElement(l.a,{title:"Page Not Found"},o.a.createElement("main",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]);
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{75:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return u})),r.d(t,"default",(function(){return s}));var n=r(3),a=r(7),o=(r(0),r(99)),i={id:"web",title:"Web Interface"},c={unversionedId:"usage/web",id:"usage/web",isDocsHomePage:!1,title:"Web Interface",description:"Frigate comes bundled with a simple web ui that supports the following:",source:"@site/docs/usage/web.md",slug:"/usage/web",permalink:"/frigate/usage/web",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/web.md",version:"current",sidebar:"docs",previous:{title:"Integration with Home Assistant",permalink:"/frigate/usage/home-assistant"},next:{title:"HTTP API",permalink:"/frigate/usage/api"}},u=[],l={toc:u};function s(e){var t=e.components,r=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(n.a)({},l,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Frigate comes bundled with a simple web ui that supports the following:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Show cameras"),Object(o.b)("li",{parentName:"ul"},"Browse events"),Object(o.b)("li",{parentName:"ul"},"Mask helper")))}s.isMDXComponent=!0},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return m}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=a.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),p=s(r),f=n,m=p["".concat(i,".").concat(f)]||p[f]||b[f]||o;return r?a.a.createElement(m,c(c({ref:t},l),{},{components:r})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l<o;l++)i[l]=r[l];return a.a.createElement.apply(null,i)}return a.a.createElement.apply(null,r)}f.displayName="MDXCreateElement"}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-31
View File
@@ -1,31 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-alpha.70">
<link rel="alternate" type="application/rss+xml" href="/frigate/blog/rss.xml" title="Frigate Blog RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/frigate/blog/atom.xml" title="Frigate Blog Atom Feed">
<link rel="search" type="application/opensearchdescription+xml" title="Frigate" href="/frigate/opensearch.xml"><title data-react-helmet="true">Page Not Found | Frigate</title><meta data-react-helmet="true" property="og:title" content="Page Not Found | Frigate"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" name="docsearch:language" content="en"><meta data-react-helmet="true" name="docsearch:docusaurus_tag" content="default"><link data-react-helmet="true" rel="shortcut icon" href="/frigate/img/favicon.ico"><link data-react-helmet="true" rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/frigate/styles.4dd8d972.css">
<link rel="preload" href="/frigate/styles.0df63e1c.js" as="script">
<link rel="preload" href="/frigate/runtime~main.85a22073.js" as="script">
<link rel="preload" href="/frigate/main.b6b2d1f0.js" as="script">
<link rel="preload" href="/frigate/1.d4a988ac.js" as="script">
<link rel="preload" href="/frigate/2.cbe00df1.js" as="script">
<link rel="preload" href="/frigate/28.fabd8c68.js" as="script">
<link rel="preload" href="/frigate/31.3f82c6fa.js" as="script">
<link rel="preload" href="/frigate/935f2afb.06dae20f.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<nav aria-label="Skip navigation links"><button type="button" tabindex="0" class="skipToContent_11B0">Skip to main content</button></nav><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><div aria-label="Navigation bar toggle" class="navbar__toggle" role="button" tabindex="0"><svg aria-label="Menu" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></div><a class="navbar__brand" href="/frigate/"><img src="/frigate/img/logo.svg" alt="Frigate" class="themedImage_YANc themedImage--light_3CMI navbar__logo"><img src="/frigate/img/logo-dark.svg" alt="Frigate" class="themedImage_YANc themedImage--dark_3ARp navbar__logo"><strong class="navbar__title">Frigate</strong></a><a class="navbar__item navbar__link" href="/frigate/">Docs</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/blakeblackshear/frigate" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub</a><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_2N3Q"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_3NWk">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_3NWk">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><div class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></div></button></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/frigate/"><img src="/frigate/img/logo.svg" alt="Frigate" class="themedImage_YANc themedImage--light_3CMI navbar__logo"><img src="/frigate/img/logo-dark.svg" alt="Frigate" class="themedImage_YANc themedImage--dark_3ARp navbar__logo"><strong class="navbar__title">Frigate</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/frigate/">Docs</a></li><li class="menu__list-item"><a href="https://github.com/blakeblackshear/frigate" target="_blank" rel="noopener noreferrer" class="menu__link">GitHub</a></li></ul></div></div></div></nav><div class="main-wrapper"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">Community</h4><ul class="footer__items"><li class="footer__item"><a href="https://github.com/blakeblackshear/frigate" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://github.com/blakeblackshear/frigate/discussions" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discussions</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2021 Blake Blackshear</div></div></div></footer></div>
<script src="/frigate/styles.0df63e1c.js"></script>
<script src="/frigate/runtime~main.85a22073.js"></script>
<script src="/frigate/main.b6b2d1f0.js"></script>
<script src="/frigate/1.d4a988ac.js"></script>
<script src="/frigate/2.cbe00df1.js"></script>
<script src="/frigate/28.fabd8c68.js"></script>
<script src="/frigate/31.3f82c6fa.js"></script>
<script src="/frigate/935f2afb.06dae20f.js"></script>
</body>
</html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{159:function(e,t,r){"use strict";r.r(t),t.default=r.p+"assets/images/diagram-3101f1674015822e176773924caae31a.png"},81:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return s})),r.d(t,"default",(function(){return u}));var n=r(3),o=r(7),a=(r(0),r(99)),i={id:"how-it-works",title:"How Frigate Works",sidebar_label:"How it works"},c={unversionedId:"how-it-works",id:"how-it-works",isDocsHomePage:!1,title:"How Frigate Works",description:"Frigate is designed to minimize resource and maximize performance by only looking for objects when and where it is necessary",source:"@site/docs/how-it-works.md",slug:"/how-it-works",permalink:"/frigate/how-it-works",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/how-it-works.md",version:"current",sidebar_label:"How it works",sidebar:"docs",previous:{title:"Frigate",permalink:"/frigate/"},next:{title:"Recommended hardware",permalink:"/frigate/hardware"}},s=[],l={toc:s};function u(e){var t=e.components,i=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(n.a)({},l,i,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"Frigate is designed to minimize resource and maximize performance by only looking for objects when and where it is necessary"),Object(a.b)("p",null,Object(a.b)("img",{alt:"Diagram",src:r(159).default})),Object(a.b)("ol",null,Object(a.b)("li",{parentName:"ol"},"Look for Motion"),Object(a.b)("li",{parentName:"ol"},"Calculate Detection Regions"),Object(a.b)("li",{parentName:"ol"},"Run Object Detection")))}u.isMDXComponent=!0},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return m}));var n=r(0),o=r.n(n);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(r),b=n,m=p["".concat(i,".").concat(b)]||p[b]||f[b]||a;return r?o.a.createElement(m,c(c({ref:t},l),{},{components:r})):o.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=b;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l<a;l++)i[l]=r[l];return o.a.createElement.apply(null,i)}return o.a.createElement.apply(null,r)}b.displayName="MDXCreateElement"}}]);
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{84:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","isLast":true,"docsSidebars":{"docs":[{"collapsed":true,"type":"category","label":"Frigate","items":[{"type":"link","label":"Features","href":"/frigate/"},{"type":"link","label":"How it works","href":"/frigate/how-it-works"},{"type":"link","label":"Recommended hardware","href":"/frigate/hardware"},{"type":"link","label":"Installation","href":"/frigate/installation"},{"type":"link","label":"Troubleshooting and FAQ","href":"/frigate/troubleshooting"}]},{"collapsed":true,"type":"category","label":"Configuration","items":[{"type":"link","label":"Configuration","href":"/frigate/configuration/index"},{"type":"link","label":"Cameras","href":"/frigate/configuration/cameras"},{"type":"link","label":"Optimizing performance","href":"/frigate/configuration/optimizing"},{"type":"link","label":"Detectors","href":"/frigate/configuration/detectors"},{"type":"link","label":"Reducing false positives","href":"/frigate/configuration/false_positives"},{"type":"link","label":"Available objects","href":"/frigate/configuration/objects"},{"type":"link","label":"Advanced","href":"/frigate/configuration/advanced"}]},{"collapsed":true,"type":"category","label":"Usage","items":[{"type":"link","label":"Home Assistant","href":"/frigate/usage/home-assistant"},{"type":"link","label":"Web Interface","href":"/frigate/usage/web"},{"type":"link","label":"HTTP API","href":"/frigate/usage/api"},{"type":"link","label":"MQTT","href":"/frigate/usage/mqtt"}]},{"collapsed":true,"type":"category","label":"Development","items":[{"type":"link","label":"Contributing","href":"/frigate/contributing"}]}]},"permalinkToSidebar":{"/frigate/configuration/advanced":"docs","/frigate/configuration/cameras":"docs","/frigate/configuration/detectors":"docs","/frigate/configuration/false_positives":"docs","/frigate/configuration/index":"docs","/frigate/configuration/objects":"docs","/frigate/configuration/optimizing":"docs","/frigate/contributing":"docs","/frigate/hardware":"docs","/frigate/how-it-works":"docs","/frigate/":"docs","/frigate/installation":"docs","/frigate/troubleshooting":"docs","/frigate/usage/api":"docs","/frigate/usage/home-assistant":"docs","/frigate/usage/mqtt":"docs","/frigate/usage/web":"docs"}}')}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
docs.frigate.video
+21
View File
@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2020 Blake Blackshear
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+59
View File
@@ -0,0 +1,59 @@
default_target: amd64_frigate
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
version:
echo "VERSION='0.8.0-$(COMMIT_HASH)'" > frigate/version.py
web:
docker build --tag frigate-web --file docker/Dockerfile.web web/
amd64_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.1-amd64 --file docker/Dockerfile.wheels .
amd64_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:1.1.0-amd64 --file docker/Dockerfile.ffmpeg.amd64 .
amd64_frigate: version web
docker build --tag frigate-base --build-arg ARCH=amd64 --build-arg FFMPEG_VERSION=1.1.0 --build-arg WHEELS_VERSION=1.0.1 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.amd64 .
amd64_all: amd64_wheels amd64_ffmpeg amd64_frigate
amd64nvidia_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.1-amd64nvidia --file docker/Dockerfile.wheels .
amd64nvidia_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:1.0.0-amd64nvidia --file docker/Dockerfile.ffmpeg.amd64nvidia .
amd64nvidia_frigate: version web
docker build --tag frigate-base --build-arg ARCH=amd64nvidia --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.1 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.amd64nvidia .
amd64nvidia_all: amd64nvidia_wheels amd64nvidia_ffmpeg amd64nvidia_frigate
aarch64_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.1-aarch64 --file docker/Dockerfile.wheels .
aarch64_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:1.0.0-aarch64 --file docker/Dockerfile.ffmpeg.aarch64 .
aarch64_frigate: version web
docker build --tag frigate-base --build-arg ARCH=aarch64 --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.1 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.aarch64 .
armv7_all: armv7_wheels armv7_ffmpeg armv7_frigate
armv7_wheels:
docker build --tag blakeblackshear/frigate-wheels:1.0.1-armv7 --file docker/Dockerfile.wheels .
armv7_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:1.0.0-armv7 --file docker/Dockerfile.ffmpeg.armv7 .
armv7_frigate: version web
docker build --tag frigate-base --build-arg ARCH=armv7 --build-arg FFMPEG_VERSION=1.0.0 --build-arg WHEELS_VERSION=1.0.1 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.armv7 .
armv7_all: armv7_wheels armv7_ffmpeg armv7_frigate
.PHONY: web
+22
View File
@@ -0,0 +1,22 @@
<p align="center">
<img align="center" alt="logo" src="docs/static/img/frigate.png">
</p>
# Frigate - NVR With Realtime Object Detection for IP Cameras
A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.
Use of a [Google Coral Accelerator](https://coral.ai/products/) is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead.
- Tight integration with HomeAssistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration)
- Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary
- Leverages multiprocessing heavily with an emphasis on realtime over processing every frame
- Uses a very low overhead motion detection to determine where to run object detection
- Object detection with TensorFlow runs in separate processes for maximum FPS
- Communicates over MQTT for easy integration into other systems
- 24/7 recording
- Re-streaming via RTMP to reduce the number of connections to your camera
## Documentation
View the documentation at https://blakeblackshear.github.io/frigate
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 781 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Executable
+93
View File
@@ -0,0 +1,93 @@
import os
from statistics import mean
import multiprocessing as mp
import numpy as np
import datetime
from frigate.edgetpu import LocalObjectDetector, EdgeTPUProcess, RemoteObjectDetector, load_labels
my_frame = np.expand_dims(np.full((300,300,3), 1, np.uint8), axis=0)
labels = load_labels('/labelmap.txt')
######
# Minimal same process runner
######
# object_detector = LocalObjectDetector()
# tensor_input = np.expand_dims(np.full((300,300,3), 0, np.uint8), axis=0)
# start = datetime.datetime.now().timestamp()
# frame_times = []
# for x in range(0, 1000):
# start_frame = datetime.datetime.now().timestamp()
# tensor_input[:] = my_frame
# detections = object_detector.detect_raw(tensor_input)
# parsed_detections = []
# for d in detections:
# if d[1] < 0.4:
# break
# parsed_detections.append((
# labels[int(d[0])],
# float(d[1]),
# (d[2], d[3], d[4], d[5])
# ))
# frame_times.append(datetime.datetime.now().timestamp()-start_frame)
# duration = datetime.datetime.now().timestamp()-start
# print(f"Processed for {duration:.2f} seconds.")
# print(f"Average frame processing time: {mean(frame_times)*1000:.2f}ms")
def start(id, num_detections, detection_queue, event):
object_detector = RemoteObjectDetector(str(id), '/labelmap.txt', detection_queue, event)
start = datetime.datetime.now().timestamp()
frame_times = []
for x in range(0, num_detections):
start_frame = datetime.datetime.now().timestamp()
detections = object_detector.detect(my_frame)
frame_times.append(datetime.datetime.now().timestamp()-start_frame)
duration = datetime.datetime.now().timestamp()-start
object_detector.cleanup()
print(f"{id} - Processed for {duration:.2f} seconds.")
print(f"{id} - FPS: {object_detector.fps.eps():.2f}")
print(f"{id} - Average frame processing time: {mean(frame_times)*1000:.2f}ms")
######
# Separate process runner
######
# event = mp.Event()
# detection_queue = mp.Queue()
# edgetpu_process = EdgeTPUProcess(detection_queue, {'1': event}, 'usb:0')
# start(1, 1000, edgetpu_process.detection_queue, event)
# print(f"Average raw inference speed: {edgetpu_process.avg_inference_speed.value*1000:.2f}ms")
####
# Multiple camera processes
####
camera_processes = []
events = {}
for x in range(0, 10):
events[str(x)] = mp.Event()
detection_queue = mp.Queue()
edgetpu_process_1 = EdgeTPUProcess(detection_queue, events, 'usb:0')
edgetpu_process_2 = EdgeTPUProcess(detection_queue, events, 'usb:1')
for x in range(0, 10):
camera_process = mp.Process(target=start, args=(x, 300, detection_queue, events[str(x)]))
camera_process.daemon = True
camera_processes.append(camera_process)
start_time = datetime.datetime.now().timestamp()
for p in camera_processes:
p.start()
for p in camera_processes:
p.join()
duration = datetime.datetime.now().timestamp()-start_time
print(f"Total - Processed for {duration:.2f} seconds.")
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://blakeblackshear.github.io/blog</id>
<title>Frigate Blog</title>
<updated>2015-10-25T23:29:00.000Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<link rel="alternate" href="https://blakeblackshear.github.io/blog"/>
<subtitle>Frigate Blog</subtitle>
<icon>https://blakeblackshear.github.io/img/favicon.ico</icon>
</feed>
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Frigate Blog</title>
<link>https://blakeblackshear.github.io/blog</link>
<description>Frigate Blog</description>
<lastBuildDate>Sun, 25 Oct 2015 23:29:00 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>https://github.com/jpmonette/feed</generator>
</channel>
</rss>
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{92:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return c})),r.d(t,"metadata",(function(){return i})),r.d(t,"toc",(function(){return u})),r.d(t,"Highlight",(function(){return p})),r.d(t,"default",(function(){return d}));var n=r(3),o=r(7),a=(r(0),r(99)),c={id:"mdx",title:"Powered by MDX"},i={unversionedId:"mdx",id:"mdx",isDocsHomePage:!1,title:"Powered by MDX",description:"You can write JSX and use React components within your Markdown thanks to MDX.",source:"@site/docs/mdx.md",slug:"/mdx",permalink:"/frigate/mdx",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/mdx.md",version:"current"},u=[],p=function(e){var t=e.children,r=e.color;return Object(a.b)("span",{style:{backgroundColor:r,borderRadius:"2px",color:"#fff",padding:"0.2rem"}},t)},l={toc:u,Highlight:p};function d(e){var t=e.components,r=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(n.a)({},l,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"You can write JSX and use React components within your Markdown thanks to ",Object(a.b)("a",Object(n.a)({parentName:"p"},{href:"https://mdxjs.com/"}),"MDX"),"."),Object(a.b)(p,{color:"#25c2a0",mdxType:"Highlight"},"Docusaurus green")," and ",Object(a.b)(p,{color:"#1877F2",mdxType:"Highlight"},"Facebook blue")," are my favorite colors.",Object(a.b)("p",null,"I can write ",Object(a.b)("strong",{parentName:"p"},"Markdown")," alongside my ",Object(a.b)("em",{parentName:"p"},"JSX"),"!"))}d.isMDXComponent=!0},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return b}));var n=r(0),o=r.n(n);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=o.a.createContext({}),l=function(e){var t=o.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=l(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,c=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),d=l(r),f=n,b=d["".concat(c,".").concat(f)]||d[f]||s[f]||a;return r?o.a.createElement(b,i(i({ref:t},p),{},{components:r})):o.a.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var p=2;p<a;p++)c[p]=r[p];return o.a.createElement.apply(null,c)}return o.a.createElement.apply(null,r)}f.displayName="MDXCreateElement"}}]);
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{93:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return u})),r.d(t,"default",(function(){return l}));var n=r(3),o=r(7),a=(r(0),r(99)),i={id:"howtos",title:"Community Guides",sidebar_label:"Community Guides"},c={unversionedId:"usage/howtos",id:"usage/howtos",isDocsHomePage:!1,title:"Community Guides",description:"Communitiy Guides/How-To's",source:"@site/docs/usage/howtos.md",slug:"/usage/howtos",permalink:"/frigate/usage/howtos",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/howtos.md",version:"current",sidebar_label:"Community Guides"},u=[{value:"Communitiy Guides/How-To&#39;s",id:"communitiy-guideshow-tos",children:[]}],s={toc:u};function l(e){var t=e.components,r=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(n.a)({},s,r,{components:t,mdxType:"MDXLayout"}),Object(a.b)("h2",{id:"communitiy-guideshow-tos"},"Communitiy Guides/How-To's"),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},"Best Camera AI Person & Object Detection - How to Setup Frigate w/ Home Assistant - digiblurDIY ",Object(a.b)("a",Object(n.a)({parentName:"li"},{href:"https://youtu.be/V8vGdoYO6-Y"}),"YouTube")," - ",Object(a.b)("a",Object(n.a)({parentName:"li"},{href:"https://www.digiblur.com/2021/05/how-to-setup-frigate-home-assistant.html"}),"Article")),Object(a.b)("li",{parentName:"ul"},"Even More Free Local Object Detection with Home Assistant - Frigate Install - Everything Smart Home ",Object(a.b)("a",Object(n.a)({parentName:"li"},{href:"https://youtu.be/pqDCEZSVeRk"}),"YouTube")),Object(a.b)("li",{parentName:"ul"},"Home Assistant Frigate integration for local image recognition - KPeyanski ",Object(a.b)("a",Object(n.a)({parentName:"li"},{href:"https://youtu.be/Q2UT78lFQpo"}),"YouTube")," - ",Object(a.b)("a",Object(n.a)({parentName:"li"},{href:"https://peyanski.com/home-assistant-frigate-integration/"}),"Article"))))}l.isMDXComponent=!0},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f}));var n=r(0),o=r.n(n);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=o.a.createContext({}),l=function(e){var t=o.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),p=l(r),b=n,f=p["".concat(i,".").concat(b)]||p[b]||m[b]||a;return r?o.a.createElement(f,c(c({ref:t},s),{},{components:r})):o.a.createElement(f,c({ref:t},s))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=b;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var s=2;s<a;s++)i[s]=r[s];return o.a.createElement.apply(null,i)}return o.a.createElement.apply(null,r)}b.displayName="MDXCreateElement"}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-48
View File
@@ -1,48 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-alpha.70">
<link rel="alternate" type="application/rss+xml" href="/frigate/blog/rss.xml" title="Frigate Blog RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/frigate/blog/atom.xml" title="Frigate Blog Atom Feed">
<link rel="search" type="application/opensearchdescription+xml" title="Frigate" href="/frigate/opensearch.xml"><title data-react-helmet="true">nVidia hardware decoder | Frigate</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" name="docsearch:language" content="en"><meta data-react-helmet="true" name="docsearch:version" content="current"><meta data-react-helmet="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="nVidia hardware decoder | Frigate"><meta data-react-helmet="true" name="description" content="Certain nvidia cards include a hardware decoder, which can greatly improve the"><meta data-react-helmet="true" property="og:description" content="Certain nvidia cards include a hardware decoder, which can greatly improve the"><meta data-react-helmet="true" property="og:url" content="https://blakeblackshear.github.io/frigate/configuration/nvdec"><link data-react-helmet="true" rel="shortcut icon" href="/frigate/img/favicon.ico"><link data-react-helmet="true" rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin="anonymous"><link data-react-helmet="true" rel="canonical" href="https://blakeblackshear.github.io/frigate/configuration/nvdec"><link rel="stylesheet" href="/frigate/styles.4dd8d972.css">
<link rel="preload" href="/frigate/styles.0df63e1c.js" as="script">
<link rel="preload" href="/frigate/runtime~main.85a22073.js" as="script">
<link rel="preload" href="/frigate/main.b6b2d1f0.js" as="script">
<link rel="preload" href="/frigate/1.d4a988ac.js" as="script">
<link rel="preload" href="/frigate/2.cbe00df1.js" as="script">
<link rel="preload" href="/frigate/28.fabd8c68.js" as="script">
<link rel="preload" href="/frigate/31.3f82c6fa.js" as="script">
<link rel="preload" href="/frigate/935f2afb.06dae20f.js" as="script">
<link rel="preload" href="/frigate/17896441.da8a454f.js" as="script">
<link rel="preload" href="/frigate/57316f1e.8b05c337.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<nav aria-label="Skip navigation links"><button type="button" tabindex="0" class="skipToContent_11B0">Skip to main content</button></nav><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><div aria-label="Navigation bar toggle" class="navbar__toggle" role="button" tabindex="0"><svg aria-label="Menu" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></div><a class="navbar__brand" href="/frigate/"><img src="/frigate/img/logo.svg" alt="Frigate" class="themedImage_YANc themedImage--light_3CMI navbar__logo"><img src="/frigate/img/logo-dark.svg" alt="Frigate" class="themedImage_YANc themedImage--dark_3ARp navbar__logo"><strong class="navbar__title">Frigate</strong></a><a class="navbar__item navbar__link" href="/frigate/">Docs</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/blakeblackshear/frigate" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub</a><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_2N3Q"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_3NWk">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_3NWk">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><div class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></div></button></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/frigate/"><img src="/frigate/img/logo.svg" alt="Frigate" class="themedImage_YANc themedImage--light_3CMI navbar__logo"><img src="/frigate/img/logo-dark.svg" alt="Frigate" class="themedImage_YANc themedImage--dark_3ARp navbar__logo"><strong class="navbar__title">Frigate</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/frigate/">Docs</a></li><li class="menu__list-item"><a href="https://github.com/blakeblackshear/frigate" target="_blank" rel="noopener noreferrer" class="menu__link">GitHub</a></li></ul></div></div></div></nav><div class="main-wrapper"><div class="docPage_vMrn"><main class="docMainContainer_2iGs"><div class="container padding-vert--lg docItemWrapper_1bxp"><div class="row"><div class="col docItemCol_U38p"><div class="docItemContainer_a7m4"><article><header><h1 class="docTitle_Oumm">nVidia hardware decoder</h1></header><div class="markdown"><p>Certain nvidia cards include a hardware decoder, which can greatly improve the
performance of video decoding. In order to use NVDEC, a special build of
ffmpeg with NVDEC support is required. The special docker architecture &#x27;amd64nvidia&#x27;
includes this support for amd64 platforms. An aarch64 for the Jetson, which
also includes NVDEC may be added in the future.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_prK2" id="docker-setup"></a>Docker setup<a class="hash-link" href="#docker-setup" title="Direct link to heading">#</a></h2><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_prK2" id="requirements"></a>Requirements<a class="hash-link" href="#requirements" title="Direct link to heading">#</a></h3><p><a href="https://www.nvidia.com/en-us/drivers/unix/" target="_blank" rel="noopener noreferrer">nVidia closed source driver</a> required to access NVDEC.
<a href="https://github.com/NVIDIA/nvidia-docker" target="_blank" rel="noopener noreferrer">nvidia-docker</a> required to pass NVDEC to docker.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_prK2" id="setting-up-docker-compose"></a>Setting up docker-compose<a class="hash-link" href="#setting-up-docker-compose" title="Direct link to heading">#</a></h3><p>In order to pass NVDEC, the docker engine must be set to <code>nvidia</code> and the environment variables
<code>NVIDIA_VISIBLE_DEVICES=all</code> and <code>NVIDIA_DRIVER_CAPABILITIES=compute,utility,video</code> must be set.</p><p>In a docker compose file, these lines need to be set:</p><div class="mdxCodeBlock_1zKU"><div class="codeBlockContent_actS"><div tabindex="0" class="prism-code language-undefined codeBlock_tuNs thin-scrollbar"><div class="codeBlockLines_3uvA" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">services:</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> frigate:</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> ...</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> image: blakeblackshear/frigate:stable-amd64nvidia</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> runtime: nvidia</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> environment:</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> - NVIDIA_VISIBLE_DEVICES=all</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> - NVIDIA_DRIVER_CAPABILITIES=compute,utility,video</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_2GIj">Copy</button></div></div><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_prK2" id="setting-up-the-configuration-file"></a>Setting up the configuration file<a class="hash-link" href="#setting-up-the-configuration-file" title="Direct link to heading">#</a></h3><p>In your frigate config.yml, you&#x27;ll need to set ffmpeg to use the hardware decoder.
The decoder you choose will depend on the input video.</p><p>A list of supported codecs (you can use <code>ffmpeg -decoders | grep cuvid</code> in the container to get a list)</p><div class="mdxCodeBlock_1zKU"><div class="codeBlockContent_actS"><div tabindex="0" class="prism-code language-undefined codeBlock_tuNs thin-scrollbar"><div class="codeBlockLines_3uvA" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... h263_cuvid Nvidia CUVID H263 decoder (codec h263)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... h264_cuvid Nvidia CUVID H264 decoder (codec h264)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_2GIj">Copy</button></div></div><p>For example, for H265 video (hevc), you&#x27;ll select <code>hevc_cuvid</code>. Add
<code>-c:v hevc_cuvid</code> to your ffmpeg input arguments:</p><div class="mdxCodeBlock_1zKU"><div class="codeBlockContent_actS"><div tabindex="0" class="prism-code language-undefined codeBlock_tuNs thin-scrollbar"><div class="codeBlockLines_3uvA" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">ffmpeg:</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> input_args:</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> ...</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> - -c:v</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> - hevc_cuvid</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_2GIj">Copy</button></div></div><p>If everything is working correctly, you should see a significant improvement in performance.
Verify that hardware decoding is working by running <code>nvidia-smi</code>, which should show the ffmpeg
processes:</p><div class="mdxCodeBlock_1zKU"><div class="codeBlockContent_actS"><div tabindex="0" class="prism-code language-undefined codeBlock_tuNs thin-scrollbar"><div class="codeBlockLines_3uvA" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">+-----------------------------------------------------------------------------+</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| NVIDIA-SMI 455.38 Driver Version: 455.38 CUDA Version: 11.1 |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">|-------------------------------+----------------------+----------------------+</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| | | MIG M. |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">|===============================+======================+======================|</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 GeForce GTX 166... Off | 00000000:03:00.0 Off | N/A |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 38% 41C P2 36W / 125W | 2082MiB / 5942MiB | 5% Default |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| | | N/A |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">+-------------------------------+----------------------+----------------------+</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">+-----------------------------------------------------------------------------+</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| Processes: |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| GPU GI CI PID Type Process name GPU Memory |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| ID ID Usage |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">|=============================================================================|</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12737 C ffmpeg 249MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12751 C ffmpeg 249MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12772 C ffmpeg 249MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12775 C ffmpeg 249MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12800 C ffmpeg 249MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12811 C ffmpeg 417MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">| 0 N/A N/A 12827 C ffmpeg 417MiB |</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">+-----------------------------------------------------------------------------+</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_2GIj">Copy</button></div></div><p>To further improve performance, you can set ffmpeg to skip frames in the output,
using the fps filter:</p><div class="mdxCodeBlock_1zKU"><div class="codeBlockContent_actS"><div tabindex="0" class="prism-code language-undefined codeBlock_tuNs thin-scrollbar"><div class="codeBlockLines_3uvA" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain"> output_args:</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> - -filter:v</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain"> - fps=fps=5</span></div></div></div><button type="button" aria-label="Copy code to clipboard" class="copyButton_2GIj">Copy</button></div></div><p>This setting, for example, allows Frigate to consume my 10-15fps camera streams on
my relatively low powered Haswell machine with relatively low cpu usage.</p></div></article><div class="margin-vert--xl"><div class="row"><div class="col"><a href="https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/nvdec.md" target="_blank" rel="noreferrer noopener"><svg fill="currentColor" height="1.2em" width="1.2em" preserveAspectRatio="xMidYMid meet" role="img" viewBox="0 0 40 40" class="iconEdit_2LL7"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div></div></div><div class="margin-vert--lg"><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></div></div></div><div class="col col--3"><div class="tableOfContents_2xL- thin-scrollbar"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#docker-setup" class="table-of-contents__link">Docker setup</a><ul><li><a href="#requirements" class="table-of-contents__link">Requirements</a></li><li><a href="#setting-up-docker-compose" class="table-of-contents__link">Setting up docker-compose</a></li><li><a href="#setting-up-the-configuration-file" class="table-of-contents__link">Setting up the configuration file</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">Community</h4><ul class="footer__items"><li class="footer__item"><a href="https://github.com/blakeblackshear/frigate" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://github.com/blakeblackshear/frigate/discussions" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discussions</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2021 Blake Blackshear</div></div></div></footer></div>
<script src="/frigate/styles.0df63e1c.js"></script>
<script src="/frigate/runtime~main.85a22073.js"></script>
<script src="/frigate/main.b6b2d1f0.js"></script>
<script src="/frigate/1.d4a988ac.js"></script>
<script src="/frigate/2.cbe00df1.js"></script>
<script src="/frigate/28.fabd8c68.js"></script>
<script src="/frigate/31.3f82c6fa.js"></script>
<script src="/frigate/935f2afb.06dae20f.js"></script>
<script src="/frigate/17896441.da8a454f.js"></script>
<script src="/frigate/57316f1e.8b05c337.js"></script>
</body>
</html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+22
View File
@@ -0,0 +1,22 @@
FROM frigate-base
LABEL maintainer "blakeb@blakeshome.com"
ENV DEBIAN_FRONTEND=noninteractive
# Install packages for apt repo
RUN apt-get -qq update \
&& apt-get -qq install --no-install-recommends -y \
# ffmpeg runtime dependencies
libgomp1 \
# runtime dependencies
libopenexr24 \
libgstreamer1.0-0 \
libgstreamer-plugins-base1.0-0 \
libopenblas-base \
libjpeg-turbo8 \
libpng16-16 \
libtiff5 \
libdc1394-22 \
## Tensorflow lite
&& pip3 install https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_aarch64.whl \
&& rm -rf /var/lib/apt/lists/* \
&& (apt-get autoremove -y; apt-get autoclean -y)
+18
View File
@@ -0,0 +1,18 @@
FROM frigate-base
LABEL maintainer "blakeb@blakeshome.com"
# By default, use the i965 driver
ENV LIBVA_DRIVER_NAME=i965
# Install packages for apt repo
RUN apt-get -qq update \
&& apt-get -qq install --no-install-recommends -y \
# ffmpeg dependencies
libgomp1 \
# VAAPI drivers for Intel hardware accel
libva-drm2 libva2 libmfx1 i965-va-driver vainfo intel-media-va-driver mesa-va-drivers \
## Tensorflow lite
&& wget -q https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \
&& python3.8 -m pip install tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \
&& rm tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \
&& rm -rf /var/lib/apt/lists/* \
&& (apt-get autoremove -y; apt-get autoclean -y)
+47
View File
@@ -0,0 +1,47 @@
FROM frigate-base
LABEL maintainer "blakeb@blakeshome.com"
# Install packages for apt repo
RUN apt-get -qq update \
&& apt-get -qq install --no-install-recommends -y \
# ffmpeg dependencies
libgomp1 \
## Tensorflow lite
&& wget -q https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \
&& python3.8 -m pip install tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \
&& rm tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \
&& rm -rf /var/lib/apt/lists/* \
&& (apt-get autoremove -y; apt-get autoclean -y)
# nvidia layer (see https://gitlab.com/nvidia/container-images/cuda/blob/master/dist/11.1/ubuntu20.04-x86_64/base/Dockerfile)
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg2 curl ca-certificates && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub | apt-key add - && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \
apt-get purge --autoremove -y curl \
&& rm -rf /var/lib/apt/lists/*
ENV CUDA_VERSION 11.1.1
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-11-1=11.1.74-1 \
cuda-compat-11-1 \
&& ln -s cuda-11.1 /usr/local/cuda && \
rm -rf /var/lib/apt/lists/*
# Required for nvidia-docker v1
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.1 brand=tesla,driver>=418,driver<419 brand=tesla,driver>=440,driver<441 brand=tesla,driver>=450,driver<451"
+24
View File
@@ -0,0 +1,24 @@
FROM frigate-base
LABEL maintainer "blakeb@blakeshome.com"
ENV DEBIAN_FRONTEND=noninteractive
# Install packages for apt repo
RUN apt-get -qq update \
&& apt-get -qq install --no-install-recommends -y \
# ffmpeg runtime dependencies
libgomp1 \
# runtime dependencies
libopenexr24 \
libgstreamer1.0-0 \
libgstreamer-plugins-base1.0-0 \
libopenblas-base \
libjpeg-turbo8 \
libpng16-16 \
libtiff5 \
libdc1394-22 \
libaom0 \
libx265-179 \
## Tensorflow lite
&& pip3 install https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_armv7l.whl \
&& rm -rf /var/lib/apt/lists/* \
&& (apt-get autoremove -y; apt-get autoclean -y)
+58
View File
@@ -0,0 +1,58 @@
ARG ARCH=amd64
ARG WHEELS_VERSION
ARG FFMPEG_VERSION
FROM blakeblackshear/frigate-wheels:${WHEELS_VERSION}-${ARCH} as wheels
FROM blakeblackshear/frigate-ffmpeg:${FFMPEG_VERSION}-${ARCH} as ffmpeg
FROM frigate-web as web
FROM ubuntu:20.04
LABEL maintainer "blakeb@blakeshome.com"
COPY --from=ffmpeg /usr/local /usr/local/
COPY --from=wheels /wheels/. /wheels/
ENV FLASK_ENV=development
# ENV FONTCONFIG_PATH=/etc/fonts
ENV DEBIAN_FRONTEND=noninteractive
# Install packages for apt repo
RUN apt-get -qq update \
&& apt-get upgrade -y \
&& apt-get -qq install --no-install-recommends -y \
gnupg wget unzip tzdata nginx libnginx-mod-rtmp \
&& apt-get -qq install --no-install-recommends -y \
python3-pip \
&& pip3 install -U /wheels/*.whl \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \
&& echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \
&& echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \
&& apt-get -qq update && apt-get -qq install --no-install-recommends -y \
libedgetpu1-max=15.0 \
&& rm -rf /var/lib/apt/lists/* /wheels \
&& (apt-get autoremove -y; apt-get autoclean -y)
RUN pip3 install \
peewee_migrate \
zeroconf \
voluptuous
COPY nginx/nginx.conf /etc/nginx/nginx.conf
# get model and labels
COPY labelmap.txt /labelmap.txt
RUN wget -q https://github.com/google-coral/test_data/raw/master/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite -O /edgetpu_model.tflite
RUN wget -q https://github.com/google-coral/test_data/raw/master/ssdlite_mobiledet_coco_qat_postprocess.tflite -O /cpu_model.tflite
WORKDIR /opt/frigate/
ADD frigate frigate/
ADD migrations migrations/
COPY --from=web /opt/frigate/build web/
COPY run.sh /run.sh
RUN chmod +x /run.sh
EXPOSE 5000
EXPOSE 1935
CMD ["/run.sh"]
+474
View File
@@ -0,0 +1,474 @@
# inspired by:
# https://github.com/collelog/ffmpeg/blob/master/4.3.1-alpine-rpi4-arm64v8.Dockerfile
# https://github.com/mmastrac/ffmpeg-omx-rpi-docker/blob/master/Dockerfile
# https://github.com/jrottenberg/ffmpeg/pull/158/files
# https://github.com/jrottenberg/ffmpeg/pull/239
FROM ubuntu:20.04 AS base
WORKDIR /tmp/workdir
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -yqq update && \
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \
apt-get autoremove -y && \
apt-get clean -y
FROM base as build
ENV FFMPEG_VERSION=4.3.1 \
AOM_VERSION=v1.0.0 \
FDKAAC_VERSION=0.1.5 \
FREETYPE_VERSION=2.5.5 \
FRIBIDI_VERSION=0.19.7 \
KVAZAAR_VERSION=1.2.0 \
LAME_VERSION=3.100 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
THEORA_VERSION=1.1.1 \
VORBIS_VERSION=1.3.5 \
VPX_VERSION=1.8.0 \
WEBP_VERSION=1.0.2 \
X264_VERSION=20170226-2245-stable \
X265_VERSION=3.1.1 \
XAU_VERSION=1.0.9 \
XORG_MACROS_VERSION=1.19.2 \
XPROTO_VERSION=7.0.31 \
XVID_VERSION=1.3.4 \
LIBZMQ_VERSION=4.3.2 \
SRC=/usr/local
ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz"
ARG FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8 0.19.7.tar.gz"
ARG LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz"
ARG OGG_SHA256SUM="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692 libogg-1.3.2.tar.gz"
ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9 opus-1.2.tar.gz"
ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz"
ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz"
ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz"
ARG LIBZMQ_SHA256SUM="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb v4.3.2.tar.gz"
ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib
ARG MAKEFLAGS="-j2"
ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig"
ARG PREFIX=/opt/ffmpeg
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64:/usr/lib64:/usr/lib:/lib64:/lib"
RUN buildDeps="autoconf \
automake \
cmake \
curl \
bzip2 \
libexpat1-dev \
g++ \
gcc \
git \
gperf \
libtool \
make \
nasm \
perl \
pkg-config \
python \
libssl-dev \
yasm \
linux-headers-raspi2 \
libomxil-bellagio-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
RUN \
DIR=/tmp/opencore-amr && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## x264 http://www.videolan.org/developers/x264.html
RUN \
DIR=/tmp/x264 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \
tar -jx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### x265 http://x265.org/
RUN \
DIR=/tmp/x265 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \
tar -zx && \
cd x265_${X265_VERSION}/build/linux && \
sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \
sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \
export CXXFLAGS="${CXXFLAGS} -fPIC" && \
./multilib.sh && \
make -C 8bit install && \
rm -rf ${DIR}
### libogg https://www.xiph.org/ogg/
RUN \
DIR=/tmp/ogg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \
echo ${OGG_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libopus https://www.opus-codec.org/
RUN \
DIR=/tmp/opus && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \
echo ${OPUS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libvorbis https://xiph.org/vorbis/
RUN \
DIR=/tmp/vorbis && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \
echo ${VORBIS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libvorbis-${VORBIS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libtheora http://www.theora.org/
RUN \
DIR=/tmp/theora && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \
echo ${THEORA_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libvpx https://www.webmproject.org/code/
RUN \
DIR=/tmp/vpx && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \
--disable-debug --disable-examples --disable-docs --disable-install-bins && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libwebp https://developers.google.com/speed/webp/
RUN \
DIR=/tmp/vebp && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libmp3lame http://lame.sourceforge.net/
RUN \
DIR=/tmp/lame && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### xvid https://www.xvid.com/
RUN \
DIR=/tmp/xvid && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \
echo ${XVID_SHA256SUM} | sha256sum --check && \
tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \
cd xvidcore/build/generic && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### fdk-aac https://github.com/mstorsjo/fdk-aac
RUN \
DIR=/tmp/fdk-aac && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## openjpeg https://github.com/uclouvain/openjpeg
RUN \
DIR=/tmp/openjpeg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
export CFLAGS="${CFLAGS} -DPNG_ARM_NEON_OPT=0" && \
cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## freetype https://www.freetype.org/
RUN \
DIR=/tmp/freetype && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
echo ${FREETYPE_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## libvstab https://github.com/georgmartius/vid.stab
RUN \
DIR=/tmp/vid.stab && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \
echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## fridibi https://www.fribidi.org/
RUN \
DIR=/tmp/fribidi && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \
echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \
sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \
./bootstrap --no-config --auto && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j1 && \
make -j $(nproc) install && \
rm -rf ${DIR}
## kvazaar https://github.com/ultravideo/kvazaar
RUN \
DIR=/tmp/kvazaar && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/aom && \
git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} ; \
cd ${DIR} ; \
rm -rf CMakeCache.txt CMakeFiles ; \
mkdir -p ./aom_build ; \
cd ./aom_build ; \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 ..; \
make ; \
make install ; \
rm -rf ${DIR}
## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/xproto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libXau && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libpthread-stubs && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb-proto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## libzmq https://github.com/zeromq/libzmq/
RUN \
DIR=/tmp/libzmq && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \
echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \
tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make -j $(nproc) && \
make check && \
make -j $(nproc) install && \
rm -rf ${DIR}
## ffmpeg https://ffmpeg.org/
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-shared \
--enable-avresample \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-gpl \
--enable-libfreetype \
--enable-libvidstab \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
--enable-libxcb \
--enable-libx265 \
--enable-libxvid \
--enable-libx264 \
--enable-nonfree \
--enable-openssl \
--enable-libfdk_aac \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-libzmq \
--extra-libs=-ldl \
--prefix="${PREFIX}" \
--enable-libopenjpeg \
--enable-libkvazaar \
--enable-libaom \
--extra-libs=-lpthread \
# --enable-omx \
# --enable-omx-rpi \
# --enable-mmal \
--enable-v4l2_m2m \
--enable-neon \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" && \
make -j $(nproc) && \
make -j $(nproc) install && \
make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \
make distclean && \
hash -r && \
cd tools && \
make qt-faststart && cp qt-faststart ${PREFIX}/bin/
## cleanup
RUN \
ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \
for lib in /usr/local/lib/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \
cp ${PREFIX}/bin/* /usr/local/bin/ && \
cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \
LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf && \
cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \
mkdir -p /usr/local/lib/pkgconfig && \
for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \
sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib/pkgconfig/"${pc##*/}"; \
done
FROM base AS release
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64:/lib:/lib64
CMD ["--help"]
ENTRYPOINT ["ffmpeg"]
COPY --from=build /usr/local /usr/local/
# Run ffmpeg with -c:v h264_v4l2m2m to enable HW accell for decoding on raspberry pi4 64-bit
+468
View File
@@ -0,0 +1,468 @@
# inspired by:
# https://github.com/collelog/ffmpeg/blob/master/4.3.1-alpine-rpi4-arm64v8.Dockerfile
# https://github.com/jrottenberg/ffmpeg/pull/158/files
# https://github.com/jrottenberg/ffmpeg/pull/239
FROM ubuntu:20.04 AS base
WORKDIR /tmp/workdir
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -yqq update && \
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \
apt-get autoremove -y && \
apt-get clean -y
FROM base as build
ENV FFMPEG_VERSION=4.3.1 \
AOM_VERSION=v1.0.0 \
FDKAAC_VERSION=0.1.5 \
FREETYPE_VERSION=2.5.5 \
FRIBIDI_VERSION=0.19.7 \
KVAZAAR_VERSION=1.2.0 \
LAME_VERSION=3.100 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
THEORA_VERSION=1.1.1 \
VORBIS_VERSION=1.3.5 \
VPX_VERSION=1.8.0 \
WEBP_VERSION=1.0.2 \
X264_VERSION=20170226-2245-stable \
X265_VERSION=3.1.1 \
XAU_VERSION=1.0.9 \
XORG_MACROS_VERSION=1.19.2 \
XPROTO_VERSION=7.0.31 \
XVID_VERSION=1.3.4 \
LIBZMQ_VERSION=4.3.2 \
SRC=/usr/local
ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz"
ARG FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8 0.19.7.tar.gz"
ARG LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz"
ARG OGG_SHA256SUM="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692 libogg-1.3.2.tar.gz"
ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9 opus-1.2.tar.gz"
ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz"
ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz"
ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz"
ARG LIBZMQ_SHA256SUM="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb v4.3.2.tar.gz"
ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib
ARG MAKEFLAGS="-j2"
ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig"
ARG PREFIX=/opt/ffmpeg
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64:/usr/lib64:/usr/lib:/lib64:/lib"
RUN buildDeps="autoconf \
automake \
cmake \
curl \
bzip2 \
libexpat1-dev \
g++ \
gcc \
git \
gperf \
libtool \
make \
nasm \
perl \
pkg-config \
python \
libssl-dev \
yasm \
libva-dev \
libmfx-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
RUN \
DIR=/tmp/opencore-amr && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
## x264 http://www.videolan.org/developers/x264.html
RUN \
DIR=/tmp/x264 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \
tar -jx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \
make && \
make install && \
rm -rf ${DIR}
### x265 http://x265.org/
RUN \
DIR=/tmp/x265 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \
tar -zx && \
cd x265_${X265_VERSION}/build/linux && \
sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \
sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \
./multilib.sh && \
make -C 8bit install && \
rm -rf ${DIR}
### libogg https://www.xiph.org/ogg/
RUN \
DIR=/tmp/ogg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \
echo ${OGG_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libopus https://www.opus-codec.org/
RUN \
DIR=/tmp/opus && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \
echo ${OPUS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libvorbis https://xiph.org/vorbis/
RUN \
DIR=/tmp/vorbis && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \
echo ${VORBIS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libvorbis-${VORBIS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libtheora http://www.theora.org/
RUN \
DIR=/tmp/theora && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \
echo ${THEORA_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libvpx https://www.webmproject.org/code/
RUN \
DIR=/tmp/vpx && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \
--disable-debug --disable-examples --disable-docs --disable-install-bins && \
make && \
make install && \
rm -rf ${DIR}
### libwebp https://developers.google.com/speed/webp/
RUN \
DIR=/tmp/vebp && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libmp3lame http://lame.sourceforge.net/
RUN \
DIR=/tmp/lame && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \
make && \
make install && \
rm -rf ${DIR}
### xvid https://www.xvid.com/
RUN \
DIR=/tmp/xvid && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \
echo ${XVID_SHA256SUM} | sha256sum --check && \
tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \
cd xvidcore/build/generic && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \
make && \
make install && \
rm -rf ${DIR}
### fdk-aac https://github.com/mstorsjo/fdk-aac
RUN \
DIR=/tmp/fdk-aac && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \
make && \
make install && \
rm -rf ${DIR}
## openjpeg https://github.com/uclouvain/openjpeg
RUN \
DIR=/tmp/openjpeg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make && \
make install && \
rm -rf ${DIR}
## freetype https://www.freetype.org/
RUN \
DIR=/tmp/freetype && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
echo ${FREETYPE_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
## libvstab https://github.com/georgmartius/vid.stab
RUN \
DIR=/tmp/vid.stab && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \
echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make && \
make install && \
rm -rf ${DIR}
## fridibi https://www.fribidi.org/
RUN \
DIR=/tmp/fribidi && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \
echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \
sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \
./bootstrap --no-config --auto && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j1 && \
make install && \
rm -rf ${DIR}
## kvazaar https://github.com/ultravideo/kvazaar
RUN \
DIR=/tmp/kvazaar && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/aom && \
git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} ; \
cd ${DIR} ; \
rm -rf CMakeCache.txt CMakeFiles ; \
mkdir -p ./aom_build ; \
cd ./aom_build ; \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 ..; \
make ; \
make install ; \
rm -rf ${DIR}
## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/xproto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libXau && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libpthread-stubs && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb-proto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
## libzmq https://github.com/zeromq/libzmq/
RUN \
DIR=/tmp/libzmq && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \
echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \
tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make && \
make check && \
make install && \
rm -rf ${DIR}
## ffmpeg https://ffmpeg.org/
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-shared \
--enable-avresample \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-gpl \
--enable-libfreetype \
--enable-libvidstab \
--enable-libmfx \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
--enable-libxcb \
--enable-libx265 \
--enable-libxvid \
--enable-libx264 \
--enable-nonfree \
--enable-openssl \
--enable-libfdk_aac \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-libzmq \
--extra-libs=-ldl \
--prefix="${PREFIX}" \
--enable-libopenjpeg \
--enable-libkvazaar \
--enable-libaom \
--extra-libs=-lpthread \
--enable-vaapi \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" && \
make && \
make install && \
make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \
make distclean && \
hash -r && \
cd tools && \
make qt-faststart && cp qt-faststart ${PREFIX}/bin/
## cleanup
RUN \
ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \
for lib in /usr/local/lib/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \
cp ${PREFIX}/bin/* /usr/local/bin/ && \
cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \
LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf && \
cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \
mkdir -p /usr/local/lib/pkgconfig && \
for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \
sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib/pkgconfig/"${pc##*/}"; \
done
FROM base AS release
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64:/lib:/lib64
CMD ["--help"]
ENTRYPOINT ["ffmpeg"]
COPY --from=build /usr/local /usr/local/
RUN \
apt-get update -y && \
apt-get install -y --no-install-recommends libva-drm2 libva2 i965-va-driver mesa-va-drivers && \
rm -rf /var/lib/apt/lists/*
+549
View File
@@ -0,0 +1,549 @@
# inspired by https://github.com/jrottenberg/ffmpeg/blob/master/docker-images/4.3/ubuntu1804/Dockerfile
# ffmpeg - http://ffmpeg.org/download.html
#
# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
#
# https://hub.docker.com/r/jrottenberg/ffmpeg/
#
#
FROM nvidia/cuda:11.1-devel-ubuntu20.04 AS devel-base
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /tmp/workdir
RUN apt-get -yqq update && \
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \
apt-get autoremove -y && \
apt-get clean -y
FROM nvidia/cuda:11.1-runtime-ubuntu20.04 AS runtime-base
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /tmp/workdir
RUN apt-get -yqq update && \
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 libxcb-shape0-dev && \
apt-get autoremove -y && \
apt-get clean -y
FROM devel-base as build
ENV NVIDIA_HEADERS_VERSION=9.1.23.1
ENV FFMPEG_VERSION=4.3.1 \
AOM_VERSION=v1.0.0 \
FDKAAC_VERSION=0.1.5 \
FREETYPE_VERSION=2.5.5 \
FRIBIDI_VERSION=0.19.7 \
KVAZAAR_VERSION=1.2.0 \
LAME_VERSION=3.100 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
THEORA_VERSION=1.1.1 \
VORBIS_VERSION=1.3.5 \
VPX_VERSION=1.8.0 \
WEBP_VERSION=1.0.2 \
X264_VERSION=20170226-2245-stable \
X265_VERSION=3.1.1 \
XAU_VERSION=1.0.9 \
XORG_MACROS_VERSION=1.19.2 \
XPROTO_VERSION=7.0.31 \
XVID_VERSION=1.3.4 \
LIBZMQ_VERSION=4.3.2 \
LIBSRT_VERSION=1.4.1 \
LIBARIBB24_VERSION=1.0.3 \
LIBPNG_VERSION=1.6.9 \
SRC=/usr/local
ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz"
ARG FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8 0.19.7.tar.gz"
ARG LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz"
ARG OGG_SHA256SUM="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692 libogg-1.3.2.tar.gz"
ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9 opus-1.2.tar.gz"
ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz"
ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz"
ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz"
ARG LIBZMQ_SHA256SUM="02ecc88466ae38cf2c8d79f09cfd2675ba299a439680b64ade733e26a349edeb v4.3.2.tar.gz"
ARG LIBARIBB24_SHA256SUM="f61560738926e57f9173510389634d8c06cabedfa857db4b28fb7704707ff128 v1.0.3.tar.gz"
ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib
ARG MAKEFLAGS="-j2"
ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig"
ARG PREFIX=/opt/ffmpeg
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64"
RUN buildDeps="autoconf \
automake \
cmake \
curl \
bzip2 \
libexpat1-dev \
g++ \
gcc \
git \
gperf \
libtool \
make \
nasm \
perl \
pkg-config \
python \
libssl-dev \
yasm \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
RUN \
DIR=/tmp/nv-codec-headers && \
git clone https://github.com/FFmpeg/nv-codec-headers ${DIR} && \
cd ${DIR} && \
git checkout n${NVIDIA_HEADERS_VERSION} && \
make PREFIX="${PREFIX}" && \
make install PREFIX="${PREFIX}" && \
rm -rf ${DIR}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
RUN \
DIR=/tmp/opencore-amr && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
## x264 http://www.videolan.org/developers/x264.html
RUN \
DIR=/tmp/x264 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \
tar -jx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \
make && \
make install && \
rm -rf ${DIR}
### x265 http://x265.org/
RUN \
DIR=/tmp/x265 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \
tar -zx && \
cd x265_${X265_VERSION}/build/linux && \
sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \
sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \
./multilib.sh && \
make -C 8bit install && \
rm -rf ${DIR}
### libogg https://www.xiph.org/ogg/
RUN \
DIR=/tmp/ogg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \
echo ${OGG_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libopus https://www.opus-codec.org/
RUN \
DIR=/tmp/opus && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \
echo ${OPUS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libvorbis https://xiph.org/vorbis/
RUN \
DIR=/tmp/vorbis && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \
echo ${VORBIS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libvorbis-${VORBIS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libtheora http://www.theora.org/
RUN \
DIR=/tmp/theora && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \
echo ${THEORA_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libvpx https://www.webmproject.org/code/
RUN \
DIR=/tmp/vpx && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \
--disable-debug --disable-examples --disable-docs --disable-install-bins && \
make && \
make install && \
rm -rf ${DIR}
### libwebp https://developers.google.com/speed/webp/
RUN \
DIR=/tmp/vebp && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
### libmp3lame http://lame.sourceforge.net/
RUN \
DIR=/tmp/lame && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \
make && \
make install && \
rm -rf ${DIR}
### xvid https://www.xvid.com/
RUN \
DIR=/tmp/xvid && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \
echo ${XVID_SHA256SUM} | sha256sum --check && \
tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \
cd xvidcore/build/generic && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \
make && \
make install && \
rm -rf ${DIR}
### fdk-aac https://github.com/mstorsjo/fdk-aac
RUN \
DIR=/tmp/fdk-aac && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \
make && \
make install && \
rm -rf ${DIR}
## openjpeg https://github.com/uclouvain/openjpeg
RUN \
DIR=/tmp/openjpeg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make && \
make install && \
rm -rf ${DIR}
## freetype https://www.freetype.org/
RUN \
DIR=/tmp/freetype && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
echo ${FREETYPE_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
## libvstab https://github.com/georgmartius/vid.stab
RUN \
DIR=/tmp/vid.stab && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \
echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make && \
make install && \
rm -rf ${DIR}
## fridibi https://www.fribidi.org/
RUN \
DIR=/tmp/fribidi && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \
echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \
sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \
./bootstrap --no-config --auto && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j1 && \
make install && \
rm -rf ${DIR}
## kvazaar https://github.com/ultravideo/kvazaar
RUN \
DIR=/tmp/kvazaar && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/aom && \
git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} ; \
cd ${DIR} ; \
rm -rf CMakeCache.txt CMakeFiles ; \
mkdir -p ./aom_build ; \
cd ./aom_build ; \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 ..; \
make ; \
make install ; \
rm -rf ${DIR}
## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/xproto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libXau && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libpthread-stubs && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb-proto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make && \
make install && \
rm -rf ${DIR}
## libzmq https://github.com/zeromq/libzmq/
RUN \
DIR=/tmp/libzmq && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \
echo ${LIBZMQ_SHA256SUM} | sha256sum --check && \
tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make && \
make check && \
make install && \
rm -rf ${DIR}
## libsrt https://github.com/Haivision/srt
RUN \
DIR=/tmp/srt && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/Haivision/srt/archive/v${LIBSRT_VERSION}.tar.gz && \
tar -xz --strip-components=1 -f v${LIBSRT_VERSION}.tar.gz && \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make && \
make install && \
rm -rf ${DIR}
## libpng
RUN \
DIR=/tmp/png && \
mkdir -p ${DIR} && \
cd ${DIR} && \
git clone https://git.code.sf.net/p/libpng/code ${DIR} -b v${LIBPNG_VERSION} --depth 1 && \
./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make check && \
make install && \
rm -rf ${DIR}
## libaribb24
RUN \
DIR=/tmp/b24 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/nkoriyama/aribb24/archive/v${LIBARIBB24_VERSION}.tar.gz && \
echo ${LIBARIBB24_SHA256SUM} | sha256sum --check && \
tar -xz --strip-components=1 -f v${LIBARIBB24_VERSION}.tar.gz && \
autoreconf -fiv && \
./configure CFLAGS="-I${PREFIX}/include -fPIC" --prefix="${PREFIX}" && \
make && \
make install && \
rm -rf ${DIR}
## ffmpeg https://ffmpeg.org/
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-shared \
--enable-avresample \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-gpl \
--enable-libfreetype \
--enable-libvidstab \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
--enable-libxcb \
--enable-libx265 \
--enable-libxvid \
--enable-libx264 \
--enable-nonfree \
--enable-openssl \
--enable-libfdk_aac \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-libzmq \
--extra-libs=-ldl \
--prefix="${PREFIX}" \
--enable-libopenjpeg \
--enable-libkvazaar \
--enable-libaom \
--extra-libs=-lpthread \
--enable-libsrt \
--enable-libaribb24 \
--enable-nvenc \
--enable-cuda \
--enable-cuvid \
--enable-libnpp \
--extra-cflags="-I${PREFIX}/include -I${PREFIX}/include/ffnvcodec -I/usr/local/cuda/include/" \
--extra-ldflags="-L${PREFIX}/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/" && \
make && \
make install && \
make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \
make distclean && \
hash -r && \
cd tools && \
make qt-faststart && cp qt-faststart ${PREFIX}/bin/
## cleanup
RUN \
LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/lib64:${LD_LIBRARY_PATH}" ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \
for lib in /usr/local/lib/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \
cp ${PREFIX}/bin/* /usr/local/bin/ && \
cp -r ${PREFIX}/share/* /usr/local/share/ && \
LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf && \
cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \
mkdir -p /usr/local/lib/pkgconfig && \
for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \
sed "s:${PREFIX}:/usr/local:g; s:/lib64:/lib:g" <"$pc" >/usr/local/lib/pkgconfig/"${pc##*/}"; \
done
FROM runtime-base AS release
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
CMD ["--help"]
ENTRYPOINT ["ffmpeg"]
# copy only needed files, without copying nvidia dev files
COPY --from=build /usr/local/bin /usr/local/bin/
COPY --from=build /usr/local/share /usr/local/share/
COPY --from=build /usr/local/lib /usr/local/lib/
COPY --from=build /usr/local/include /usr/local/include/
# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output
+490
View File
@@ -0,0 +1,490 @@
# inspired by:
# https://github.com/collelog/ffmpeg/blob/master/4.3.1-alpine-rpi4-arm64v8.Dockerfile
# https://github.com/mmastrac/ffmpeg-omx-rpi-docker/blob/master/Dockerfile
# https://github.com/jrottenberg/ffmpeg/pull/158/files
# https://github.com/jrottenberg/ffmpeg/pull/239
FROM ubuntu:20.04 AS base
WORKDIR /tmp/workdir
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -yqq update && \
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \
apt-get autoremove -y && \
apt-get clean -y
FROM base as build
ENV FFMPEG_VERSION=4.3.1 \
AOM_VERSION=v1.0.0 \
FDKAAC_VERSION=0.1.5 \
FREETYPE_VERSION=2.5.5 \
FRIBIDI_VERSION=0.19.7 \
KVAZAAR_VERSION=1.2.0 \
LAME_VERSION=3.100 \
LIBPTHREAD_STUBS_VERSION=0.4 \
LIBVIDSTAB_VERSION=1.1.0 \
LIBXCB_VERSION=1.13.1 \
XCBPROTO_VERSION=1.13 \
OGG_VERSION=1.3.2 \
OPENCOREAMR_VERSION=0.1.5 \
OPUS_VERSION=1.2 \
OPENJPEG_VERSION=2.1.2 \
THEORA_VERSION=1.1.1 \
VORBIS_VERSION=1.3.5 \
VPX_VERSION=1.8.0 \
WEBP_VERSION=1.0.2 \
X264_VERSION=20170226-2245-stable \
X265_VERSION=3.1.1 \
XAU_VERSION=1.0.9 \
XORG_MACROS_VERSION=1.19.2 \
XPROTO_VERSION=7.0.31 \
XVID_VERSION=1.3.4 \
LIBZMQ_VERSION=4.3.3 \
SRC=/usr/local
ARG FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz"
ARG FRIBIDI_SHA256SUM="3fc96fa9473bd31dcb5500bdf1aa78b337ba13eb8c301e7c28923fea982453a8 0.19.7.tar.gz"
ARG LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz"
ARG OGG_SHA256SUM="e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692 libogg-1.3.2.tar.gz"
ARG OPUS_SHA256SUM="77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9 opus-1.2.tar.gz"
ARG THEORA_SHA256SUM="40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b libtheora-1.1.1.tar.gz"
ARG VORBIS_SHA256SUM="6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce libvorbis-1.3.5.tar.gz"
ARG XVID_SHA256SUM="4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f xvidcore-1.3.4.tar.gz"
ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib
ARG MAKEFLAGS="-j2"
ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/ffmpeg/lib64/pkgconfig:/opt/vc/lib/pkgconfig"
ARG PREFIX=/opt/ffmpeg
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64:/usr/lib64:/usr/lib:/lib64:/lib:/opt/vc/lib"
RUN buildDeps="autoconf \
automake \
cmake \
curl \
bzip2 \
libexpat1-dev \
g++ \
gcc \
git \
gperf \
libtool \
make \
nasm \
perl \
pkg-config \
python \
sudo \
libssl-dev \
yasm \
linux-headers-raspi2 \
libomxil-bellagio-dev \
libx265-dev \
libaom-dev \
zlib1g-dev" && \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends ${buildDeps}
## opencore-amr https://sourceforge.net/projects/opencore-amr/
RUN \
DIR=/tmp/opencore-amr && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## x264 http://www.videolan.org/developers/x264.html
RUN \
DIR=/tmp/x264 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | \
tar -jx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
# ### x265 http://x265.org/
# RUN \
# DIR=/tmp/x265 && \
# mkdir -p ${DIR} && \
# cd ${DIR} && \
# curl -sL https://download.videolan.org/pub/videolan/x265/x265_${X265_VERSION}.tar.gz | \
# tar -zx && \
# cd x265_${X265_VERSION}/build/linux && \
# sed -i "/-DEXTRA_LIB/ s/$/ -DCMAKE_INSTALL_PREFIX=\${PREFIX}/" multilib.sh && \
# sed -i "/^cmake/ s/$/ -DENABLE_CLI=OFF/" multilib.sh && \
# # export CXXFLAGS="${CXXFLAGS} -fPIC" && \
# ./multilib.sh && \
# make -C 8bit install && \
# rm -rf ${DIR}
### libogg https://www.xiph.org/ogg/
RUN \
DIR=/tmp/ogg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \
echo ${OGG_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libogg-${OGG_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libopus https://www.opus-codec.org/
RUN \
DIR=/tmp/opus && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz && \
echo ${OPUS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f opus-${OPUS_VERSION}.tar.gz && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libvorbis https://xiph.org/vorbis/
RUN \
DIR=/tmp/vorbis && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \
echo ${VORBIS_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libvorbis-${VORBIS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libtheora http://www.theora.org/
RUN \
DIR=/tmp/theora && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.gz && \
echo ${THEORA_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f libtheora-${THEORA_VERSION}.tar.gz && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub && \
./configure --prefix="${PREFIX}" --with-ogg="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libvpx https://www.webmproject.org/code/
RUN \
DIR=/tmp/vpx && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://codeload.github.com/webmproject/libvpx/tar.gz/v${VPX_VERSION} | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-pic --enable-shared \
--disable-debug --disable-examples --disable-docs --disable-install-bins && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libwebp https://developers.google.com/speed/webp/
RUN \
DIR=/tmp/vebp && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### libmp3lame http://lame.sourceforge.net/
RUN \
DIR=/tmp/lame && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://versaweb.dl.sourceforge.net/project/lame/lame/$(echo ${LAME_VERSION} | sed -e 's/[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)/\1.\2/')/lame-${LAME_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" --enable-shared --enable-nasm --disable-frontend && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### xvid https://www.xvid.com/
RUN \
DIR=/tmp/xvid && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \
echo ${XVID_SHA256SUM} | sha256sum --check && \
tar -zx -f xvidcore-${XVID_VERSION}.tar.gz && \
cd xvidcore/build/generic && \
./configure --prefix="${PREFIX}" --bindir="${PREFIX}/bin" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
### fdk-aac https://github.com/mstorsjo/fdk-aac
RUN \
DIR=/tmp/fdk-aac && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
autoreconf -fiv && \
./configure --prefix="${PREFIX}" --enable-shared --datadir="${DIR}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## openjpeg https://github.com/uclouvain/openjpeg
RUN \
DIR=/tmp/openjpeg && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sL https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz | \
tar -zx --strip-components=1 && \
export CFLAGS="${CFLAGS} -DPNG_ARM_NEON_OPT=0" && \
cmake -DBUILD_THIRDPARTY:BOOL=ON -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## freetype https://www.freetype.org/
RUN \
DIR=/tmp/freetype && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
echo ${FREETYPE_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f freetype-${FREETYPE_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## libvstab https://github.com/georgmartius/vid.stab
RUN \
DIR=/tmp/vid.stab && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB_VERSION}.tar.gz && \
echo ${LIBVIDSTAB_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f v${LIBVIDSTAB_VERSION}.tar.gz && \
cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" . && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## fridibi https://www.fribidi.org/
RUN \
DIR=/tmp/fribidi && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/fribidi/fribidi/archive/${FRIBIDI_VERSION}.tar.gz && \
echo ${FRIBIDI_SHA256SUM} | sha256sum --check && \
tar -zx --strip-components=1 -f ${FRIBIDI_VERSION}.tar.gz && \
sed -i 's/^SUBDIRS =.*/SUBDIRS=gen.tab charset lib bin/' Makefile.am && \
./bootstrap --no-config --auto && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j1 && \
make -j $(nproc) install && \
rm -rf ${DIR}
## kvazaar https://github.com/ultravideo/kvazaar
RUN \
DIR=/tmp/kvazaar && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f v${KVAZAAR_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
# RUN \
# DIR=/tmp/aom && \
# git clone --branch ${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom ${DIR} ; \
# cd ${DIR} ; \
# rm -rf CMakeCache.txt CMakeFiles ; \
# mkdir -p ./aom_build ; \
# cd ./aom_build ; \
# cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DBUILD_SHARED_LIBS=1 ..; \
# make ; \
# make install ; \
# rm -rf ${DIR}
## libxcb (and supporting libraries) for screen capture https://xcb.freedesktop.org/
RUN \
DIR=/tmp/xorg-macros && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive//individual/util/util-macros-${XORG_MACROS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f util-macros-${XORG_MACROS_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/xproto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/proto/xproto-${XPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xproto-${XPROTO_VERSION}.tar.gz && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -o config.guess && \
curl -sL 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -o config.sub && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libXau && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://www.x.org/archive/individual/lib/libXau-${XAU_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libXau-${XAU_VERSION}.tar.gz && \
./configure --srcdir=${DIR} --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libpthread-stubs && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libpthread-stubs-${LIBPTHREAD_STUBS_VERSION}.tar.gz && \
./configure --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb-proto && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f xcb-proto-${XCBPROTO_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
RUN \
DIR=/tmp/libxcb && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f libxcb-${LIBXCB_VERSION}.tar.gz && \
ACLOCAL_PATH="${PREFIX}/share/aclocal" ./autogen.sh && \
./configure --prefix="${PREFIX}" --disable-static --enable-shared && \
make -j $(nproc) && \
make -j $(nproc) install && \
rm -rf ${DIR}
## libzmq https://github.com/zeromq/libzmq/
RUN \
DIR=/tmp/libzmq && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLO https://github.com/zeromq/libzmq/archive/v${LIBZMQ_VERSION}.tar.gz && \
tar -xz --strip-components=1 -f v${LIBZMQ_VERSION}.tar.gz && \
./autogen.sh && \
./configure --prefix="${PREFIX}" && \
make -j $(nproc) && \
# make check && \
make -j $(nproc) install && \
rm -rf ${DIR}
## userland https://github.com/raspberrypi/userland
RUN \
DIR=/tmp/userland && \
mkdir -p ${DIR} && \
cd ${DIR} && \
git clone --depth 1 https://github.com/raspberrypi/userland.git . && \
./buildme && \
rm -rf ${DIR}
## ffmpeg https://ffmpeg.org/
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
tar -jx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.bz2
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-shared \
--enable-avresample \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-gpl \
--enable-libfreetype \
--enable-libvidstab \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
--enable-libxcb \
--enable-libx265 \
--enable-libxvid \
--enable-libx264 \
--enable-nonfree \
--enable-openssl \
--enable-libfdk_aac \
--enable-postproc \
--enable-small \
--enable-version3 \
--enable-libzmq \
--extra-libs=-ldl \
--prefix="${PREFIX}" \
--enable-libopenjpeg \
--enable-libkvazaar \
--enable-libaom \
--extra-libs=-lpthread \
--enable-omx \
--enable-omx-rpi \
--enable-mmal \
--enable-v4l2_m2m \
--enable-neon \
--extra-cflags="-I${PREFIX}/include" \
--extra-ldflags="-L${PREFIX}/lib" && \
make -j $(nproc) && \
make -j $(nproc) install && \
make tools/zmqsend && cp tools/zmqsend ${PREFIX}/bin/ && \
make distclean && \
hash -r && \
cd tools && \
make qt-faststart && cp qt-faststart ${PREFIX}/bin/
## cleanup
RUN \
ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \
# copy userland lib too
ldd ${PREFIX}/bin/ffmpeg | grep opt/vc | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \
for lib in /usr/local/lib/*.so.*; do ln -s "${lib##*/}" "${lib%%.so.*}".so; done && \
cp ${PREFIX}/bin/* /usr/local/bin/ && \
cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \
LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf && \
cp -r ${PREFIX}/include/libav* ${PREFIX}/include/libpostproc ${PREFIX}/include/libsw* /usr/local/include && \
mkdir -p /usr/local/lib/pkgconfig && \
for pc in ${PREFIX}/lib/pkgconfig/libav*.pc ${PREFIX}/lib/pkgconfig/libpostproc.pc ${PREFIX}/lib/pkgconfig/libsw*.pc; do \
sed "s:${PREFIX}:/usr/local:g" <"$pc" >/usr/local/lib/pkgconfig/"${pc##*/}"; \
done
FROM base AS release
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64:/lib:/lib64
RUN \
apt-get -yqq update && \
apt-get install -yq --no-install-recommends libx265-dev libaom-dev && \
apt-get autoremove -y && \
apt-get clean -y
CMD ["--help"]
ENTRYPOINT ["ffmpeg"]
COPY --from=build /usr/local /usr/local/
+9
View File
@@ -0,0 +1,9 @@
ARG NODE_VERSION=14.0
FROM node:${NODE_VERSION}
WORKDIR /opt/frigate
COPY . .
RUN npm install && npm run build
+42
View File
@@ -0,0 +1,42 @@
FROM ubuntu:20.04 as build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update \
&& apt-get -qq install -y \
python3 \
python3-dev \
wget \
# opencv dependencies
build-essential cmake git pkg-config libgtk-3-dev \
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \
gfortran openexr libatlas-base-dev libssl-dev\
libtbb2 libtbb-dev libdc1394-22-dev libopenexr-dev \
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \
# scipy dependencies
gcc gfortran libopenblas-dev liblapack-dev cython
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
&& python3 get-pip.py "pip==20.2.4"
RUN pip3 install scikit-build
RUN pip3 wheel --wheel-dir=/wheels \
opencv-python-headless \
# pinning due to issue in 1.19.5 https://github.com/numpy/numpy/issues/18131
numpy==1.19.4 \
imutils \
scipy \
psutil \
Flask \
paho-mqtt \
PyYAML \
matplotlib \
click \
setproctitle \
peewee
FROM scratch
COPY --from=build /wheels /wheels
+20
View File
@@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+33
View File
@@ -0,0 +1,33 @@
# Website
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
## Installation
```console
yarn install
```
## Local Development
```console
yarn start
```
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
## Build
```console
yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
## Deployment
```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
+139
View File
@@ -0,0 +1,139 @@
---
id: advanced
title: Advanced
sidebar_label: Advanced
---
## Advanced configuration
### `motion`
Global motion detection config. These may also be defined at the camera level.
```yaml
motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold: 25
# Optional: Minimum size in pixels in the resized motion image that counts as motion
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller
# moving objects.
contour_area: 100
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
# Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
# Too low and a fast moving person wont be detected as motion.
delta_alpha: 0.2
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
# Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
# Low values will cause things like moving shadows to be detected as motion for longer.
# https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
frame_alpha: 0.2
# Optional: Height of the resized motion frame (default: 1/6th of the original frame height)
# This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.
# Lower values result in less CPU, but small changes may not register as motion.
frame_height: 180
```
### `detect`
Global object detection settings. These may also be defined at the camera level.
```yaml
detect:
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)
max_disappeared: 10
```
### `logger`
Change the default log level for troubleshooting purposes.
```yaml
logger:
# Optional: default log level (default: shown below)
default: info
# Optional: module by module log level configuration
logs:
frigate.mqtt: error
```
Available log levels are: `debug`, `info`, `warning`, `error`, `critical`
Examples of available modules are:
- `frigate.app`
- `frigate.mqtt`
- `frigate.edgetpu`
- `frigate.zeroconf`
- `detector.<detector_name>`
- `watchdog.<camera_name>`
- `ffmpeg.<camera_name>.<sorted_roles>` NOTE: All FFmpeg logs are sent as `error` level.
### `environment_vars`
This section can be used to set environment variables for those unable to modify the environment of the container (ie. within Hass.io)
```yaml
environment_vars:
EXAMPLE_VAR: value
```
### `database`
Event and clip information is managed in a sqlite database at `/media/frigate/clips/frigate.db`. If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant.
If you are storing your clips on a network share (SMB, NFS, etc), you may get a `database is locked` error message on startup. You can customize the location of the database in the config if necessary.
This may need to be in a custom location if network storage is used for clips.
```yaml
database:
path: /media/frigate/clips/frigate.db
```
### `detectors`
```yaml
detectors:
# Required: name of the detector
coral:
# Required: type of the detector
# Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu
# Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
device: usb
# Optional: num_threads value passed to the tflite.Interpreter (default: shown below)
# This value is only used for CPU types
num_threads: 3
```
### `model`
```yaml
model:
# Required: height of the trained model
height: 320
# Required: width of the trained model
width: 320
```
## Custom Models
Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts:
- CPU Model: `/cpu_model.tflite`
- EdgeTPU Model: `/edgetpu_model.tflite`
- Labels: `/labelmap.txt`
You also need to update the model width/height in the config if they differ from the defaults.
### Customizing the Labelmap
The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change:
- Download the [COCO labelmap](https://dl.google.com/coral/canned_models/coco_labels.txt)
- Modify the label names as desired. For example, change `7 truck` to `7 car`
- Mount the new file at `/labelmap.txt` in the container with an additional volume
```
-v ./config/labelmap.txt:/labelmap.txt
```
+410
View File
@@ -0,0 +1,410 @@
---
id: cameras
title: Cameras
---
## Setting Up Camera Inputs
Up to 4 inputs can be configured for each camera and the role of each input can be mixed and matched based on your needs. This allows you to use a lower resolution stream for object detection, but create clips from a higher resolution stream, or vice versa.
Each role can only be assigned to one input per camera. The options for roles are as follows:
| Role | Description |
| -------- | ------------------------------------------------------------------------------------ |
| `detect` | Main feed for object detection |
| `clips` | Clips of events from objects detected in the `detect` feed. [docs](#recording-clips) |
| `record` | Saves 60 second segments of the video feed. [docs](#247-recordings) |
| `rtmp` | Broadcast as an RTMP feed for other services to consume. [docs](#rtmp-streams) |
### Example
```yaml
mqtt:
host: mqtt.server.com
cameras:
back:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/live
roles:
- clips
- record
width: 1280
height: 720
fps: 5
```
## Masks & Zones
### Masks
Masks are used to ignore initial detection in areas of your camera's field of view.
There are two types of masks available:
- **Motion masks**: Motion masks are used to prevent unwanted types of motion from triggering detection. Try watching the video feed with `Motion Boxes` enabled to see what may be regularly detected as motion. For example, you want to mask out your timestamp, the sky, rooftops, etc. Keep in mind that this mask only prevents motion from being detected and does not prevent objects from being detected if object detection was started due to motion in unmasked areas. Motion is also used during object tracking to refine the object detection area in the next frame. Over masking will make it more difficult for objects to be tracked. To see this effect, create a mask, and then watch the video feed with `Motion Boxes` enabled again.
- **Object filter masks**: Object filter masks are used to filter out false positives for a given object type. These should be used to filter any areas where it is not possible for an object of that type to be. The bottom center of the detected object's bounding box is evaluated against the mask. If it is in a masked area, it is assumed to be a false positive. For example, you may want to mask out rooftops, walls, the sky, treetops for people. For cars, masking locations other than the street or your driveway will tell frigate that anything in your yard is a false positive.
To create a poly mask:
1. Visit the [web UI](/usage/web)
1. Click the camera you wish to create a mask for
1. Click "Mask & Zone creator"
1. Click "Add" on the type of mask or zone you would like to create
1. Click on the camera's latest image to create a masked area. The yaml representation will be updated in real-time
1. When you've finished creating your mask, click "Copy" and paste the contents into your `config.yaml` file and restart Frigate
Example of a finished row corresponding to the below example image:
```yaml
motion:
mask: '0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432'
```
![poly](/img/example-mask-poly.png)
```yaml
# Optional: camera level motion config
motion:
# Optional: motion mask
# NOTE: see docs for more detailed info on creating masks
mask: 0,900,1080,900,1080,1920,0,1920
```
### Zones
Zones allow you to define a specific area of the frame and apply additional filters for object types so you can determine whether or not an object is within a particular area. Zones cannot have the same name as a camera. If desired, a single zone can include multiple cameras if you have multiple cameras covering the same area by configuring zones with the same name for each camera.
During testing, `draw_zones` should be set in the config to draw the zone on the frames so you can adjust as needed. The zone line will increase in thickness when any object enters the zone.
To create a zone, follow the same steps above for a "Motion mask", but use the section of the web UI for creating a zone instead.
```yaml
# Optional: zones for this camera
zones:
# Required: name of the zone
# NOTE: This must be different than any camera names, but can match with another zone on another
# camera.
front_steps:
# Required: List of x,y coordinates to define the polygon of the zone.
# NOTE: Coordinates can be generated at https://www.image-map.net/
coordinates: 545,1077,747,939,788,805
# Optional: Zone level object filters.
# NOTE: The global and camera filters are applied upstream.
filters:
person:
min_area: 5000
max_area: 100000
threshold: 0.7
```
## Objects
```yaml
# Optional: Camera level object filters config.
objects:
track:
- person
- car
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
mask: 0,0,1000,0,1000,200,0,200
```
## Clips
Frigate can save video clips without any CPU overhead for encoding by simply copying the stream directly with FFmpeg. It leverages FFmpeg's segment functionality to maintain a cache of video for each camera. The cache files are written to disk at `/tmp/cache` and do not introduce memory overhead. When an object is being tracked, it will extend the cache to ensure it can assemble a clip when the event ends. Once the event ends, it again uses FFmpeg to assemble a clip by combining the video clips without any encoding by the CPU. Assembled clips are are saved to `/media/frigate/clips`. Clips are retained according to the retention settings defined on the config for each object type.
:::caution
Previous versions of frigate included `-vsync drop` in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set.
:::
```yaml
clips:
# Required: enables clips for the camera (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: Number of seconds before the event to include in the clips (default: shown below)
pre_capture: 5
# Optional: Number of seconds after the event to include in the clips (default: shown below)
post_capture: 5
# Optional: Objects to save clips for. (default: all tracked objects)
objects:
- person
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
```
## Snapshots
Frigate can save a snapshot image to `/media/frigate/clips` for each event named as `<camera>-<id>.jpg`.
```yaml
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
```
## 24/7 Recordings
24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH/<camera_name>/MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config.
:::caution
Previous versions of frigate included `-vsync drop` in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set.
:::
```yaml
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: False
# Optional: Number of days to retain (default: global setting)
retain_days: 30
```
## RTMP streams
Frigate can re-stream your video feed as a RTMP feed for other applications such as HomeAssistant to utilize it at `rtmp://<frigate_host>/live/<camera_name>`. Port 1935 must be open. This allows you to use a video feed for detection in frigate and HomeAssistant live view at the same time without having to make two separate connections to the camera. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate.
Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization.
## Full example
The following is a full example of all of the options together for a camera configuration
```yaml
cameras:
# Required: name of the camera
back:
# Required: ffmpeg settings for the camera
ffmpeg:
# Required: A list of input streams for the camera. See documentation for more information.
inputs:
# Required: the path to the stream
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
# Required: list of roles for this stream. valid values are: detect,record,clips,rtmp
# NOTICE: In addition to assigning the record, clips, and rtmp roles,
# they must also be enabled in the camera config.
roles:
- detect
- rtmp
# Optional: stream specific global args (default: inherit)
global_args:
# Optional: stream specific hwaccel args (default: inherit)
hwaccel_args:
# Optional: stream specific input args (default: inherit)
input_args:
# Optional: camera specific global args (default: inherit)
global_args:
# Optional: camera specific hwaccel args (default: inherit)
hwaccel_args:
# Optional: camera specific input args (default: inherit)
input_args:
# Optional: camera specific output args (default: inherit)
output_args:
# Required: width of the frame for the input with the detect role
width: 1280
# Required: height of the frame for the input with the detect role
height: 720
# Optional: desired fps for your camera for the input with the detect role
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
# Frigate will attempt to autodetect if not specified.
fps: 5
# Optional: camera level motion config
motion:
# Optional: motion mask
# NOTE: see docs for more detailed info on creating masks
mask: 0,900,1080,900,1080,1920,0,1920
# Optional: timeout for highest scoring image before allowing it
# to be replaced by a newer image. (default: shown below)
best_image_timeout: 60
# Optional: zones for this camera
zones:
# Required: name of the zone
# NOTE: This must be different than any camera names, but can match with another zone on another
# camera.
front_steps:
# Required: List of x,y coordinates to define the polygon of the zone.
# NOTE: Coordinates can be generated at https://www.image-map.net/
coordinates: 545,1077,747,939,788,805
# Optional: Zone level object filters.
# NOTE: The global and camera filters are applied upstream.
filters:
person:
min_area: 5000
max_area: 100000
threshold: 0.7
# Optional: Camera level detect settings
detect:
# Optional: enables detection for the camera (default: True)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)
max_disappeared: 10
# Optional: save clips configuration
clips:
# Required: enables clips for the camera (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: Number of seconds before the event to include in the clips (default: shown below)
pre_capture: 5
# Optional: Number of seconds after the event to include in the clips (default: shown below)
post_capture: 5
# Optional: Objects to save clips for. (default: all tracked objects)
objects:
- person
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: False
# Optional: Number of days to retain (default: global setting)
retain_days: 30
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: True
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
# Optional: Configuration for the jpg snapshots published via MQTT
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: True
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: True
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: True
# Optional: crop the snapshot (default: shown below)
crop: True
# Optional: height to resize the snapshot to (default: shown below)
height: 270
# Optional: Camera level object filters config.
objects:
track:
- person
- car
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
mask: 0,0,1000,0,1000,200,0,200
```
## Camera specific configuration
### RTMP Cameras
The input parameters need to be adjusted for RTMP cameras
```yaml
ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -use_wallclock_as_timestamps
- '1'
```
### Blue Iris RTSP Cameras
You will need to remove `nobuffer` flag for Blue Iris RTSP cameras
```yaml
ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -rtsp_transport
- tcp
- -stimeout
- '5000000'
- -use_wallclock_as_timestamps
- '1'
```
+53
View File
@@ -0,0 +1,53 @@
---
id: detectors
title: Detectors
---
The default config will look for a USB Coral device. If you do not have a Coral, you will need to configure a CPU detector. If you have PCI or multiple Coral devices, you need to configure your detector devices in the config file. When using multiple detectors, they run in dedicated processes, but pull from a common queue of requested detections across all cameras.
Frigate supports `edgetpu` and `cpu` as detector types. The device value should be specified according to the [Documentation for the TensorFlow Lite Python API](https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api).
**Note**: There is no support for Nvidia GPUs to perform object detection with tensorflow. It can be used for ffmpeg decoding, but not object detection.
Single USB Coral:
```yaml
detectors:
coral:
type: edgetpu
device: usb
```
Multiple USB Corals:
```yaml
detectors:
coral1:
type: edgetpu
device: usb:0
coral2:
type: edgetpu
device: usb:1
```
Mixing Corals:
```yaml
detectors:
coral_usb:
type: edgetpu
device: usb
coral_pci:
type: edgetpu
device: pci
```
CPU Detectors (not recommended):
```yaml
detectors:
cpu1:
type: cpu
cpu2:
type: cpu
```
@@ -0,0 +1,19 @@
---
id: false_positives
title: Reducing false positives
---
Tune your object filters to adjust false positives: `min_area`, `max_area`, `min_score`, `threshold`.
For object filters in your configuration, any single detection below `min_score` will be ignored as a false positive. `threshold` is based on the median of the history of scores (padded to 3 values) for a tracked object. Consider the following frames when `min_score` is set to 0.6 and threshold is set to 0.85:
| Frame | Current Score | Score History | Computed Score | Detected Object |
| ----- | ------------- | --------------------------------- | -------------- | --------------- |
| 1 | 0.7 | 0.0, 0, 0.7 | 0.0 | No |
| 2 | 0.55 | 0.0, 0.7, 0.0 | 0.0 | No |
| 3 | 0.85 | 0.7, 0.0, 0.85 | 0.7 | No |
| 4 | 0.90 | 0.7, 0.85, 0.95, 0.90 | 0.875 | Yes |
| 5 | 0.88 | 0.7, 0.85, 0.95, 0.90, 0.88 | 0.88 | Yes |
| 6 | 0.95 | 0.7, 0.85, 0.95, 0.90, 0.88, 0.95 | 0.89 | Yes |
In frame 2, the score is below the `min_score` value, so frigate ignores it and it becomes a 0.0. The computed score is the median of the score history (padding to at least 3 values), and only when that computed score crosses the `threshold` is the object marked as a true positive. That happens in frame 4 in the example.
+137
View File
@@ -0,0 +1,137 @@
---
id: index
title: Configuration
---
HassOS users can manage their configuration directly in the addon Configuration tab. For other installations, the default location for the config file is `/config/config.yml`. This can be overridden with the `CONFIG_FILE` environment variable. Camera specific ffmpeg parameters are documented [here](/configuration/cameras.md).
It is recommended to start with a minimal configuration and add to it:
```yaml
mqtt:
host: mqtt.server.com
cameras:
back:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
width: 1280
height: 720
fps: 5
```
## Required
## `mqtt`
```yaml
mqtt:
# Required: host name
host: mqtt.server.com
# Optional: port (default: shown below)
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user: mqtt_user
# Optional: password
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password: password
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60
```
## `cameras`
Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the [camera configuration page](cameras) for a complete list of options.
```yaml
cameras:
# Name of your camera
front_door:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
width: 1280
height: 720
fps: 5
```
## Optional
### `clips`
```yaml
clips:
# Optional: Maximum length of time to retain video during long events. (default: shown below)
# NOTE: If an object is being tracked for longer than this amount of time, the cache
# will begin to expire and the resulting clip will be the last x seconds of the event.
max_seconds: 300
# Optional: size of tmpfs mount to create for cache files (default: not set)
# mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache
# Notice: If you have mounted a tmpfs volume through docker, this value should not be set in your config
tmpfs_cache_size: 256m
# Optional: Retention settings for clips (default: shown below)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
```
### `ffmpeg`
```yaml
ffmpeg:
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel fatal
# Optional: global hwaccel args (default: shown below)
# NOTE: See hardware acceleration docs for your specific device
hwaccel_args: []
# Optional: global input args (default: shown below)
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect: -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for clips streams (default: shown below)
clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for rtmp streams (default: shown below)
rtmp: -c copy -f flv
```
### `objects`
Can be overridden at the camera level
```yaml
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Optional: filters to reduce false positives for specific object types
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
min_area: 5000
# Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
max_area: 100000
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
```
+110
View File
@@ -0,0 +1,110 @@
---
id: nvdec
title: nVidia hardware decoder
---
Certain nvidia cards include a hardware decoder, which can greatly improve the
performance of video decoding. In order to use NVDEC, a special build of
ffmpeg with NVDEC support is required. The special docker architecture 'amd64nvidia'
includes this support for amd64 platforms. An aarch64 for the Jetson, which
also includes NVDEC may be added in the future.
## Docker setup
### Requirements
[nVidia closed source driver](https://www.nvidia.com/en-us/drivers/unix/) required to access NVDEC.
[nvidia-docker](https://github.com/NVIDIA/nvidia-docker) required to pass NVDEC to docker.
### Setting up docker-compose
In order to pass NVDEC, the docker engine must be set to `nvidia` and the environment variables
`NVIDIA_VISIBLE_DEVICES=all` and `NVIDIA_DRIVER_CAPABILITIES=compute,utility,video` must be set.
In a docker compose file, these lines need to be set:
```
services:
frigate:
...
image: blakeblackshear/frigate:stable-amd64nvidia
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
```
### Setting up the configuration file
In your frigate config.yml, you'll need to set ffmpeg to use the hardware decoder.
The decoder you choose will depend on the input video.
A list of supported codecs (you can use `ffmpeg -decoders | grep cuvid` in the container to get a list)
```
V..... h263_cuvid Nvidia CUVID H263 decoder (codec h263)
V..... h264_cuvid Nvidia CUVID H264 decoder (codec h264)
V..... hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc)
V..... mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg)
V..... mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
V..... mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
V..... mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4)
V..... vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1)
V..... vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8)
V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)
```
For example, for H265 video (hevc), you'll select `hevc_cuvid`. Add
`-c:v hevc_covid` to your ffmpeg input arguments:
```
ffmpeg:
input_args:
...
- -c:v
- hevc_cuvid
```
If everything is working correctly, you should see a significant improvement in performance.
Verify that hardware decoding is working by running `nvidia-smi`, which should show the ffmpeg
processes:
```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.38 Driver Version: 455.38 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 166... Off | 00000000:03:00.0 Off | N/A |
| 38% 41C P2 36W / 125W | 2082MiB / 5942MiB | 5% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 12737 C ffmpeg 249MiB |
| 0 N/A N/A 12751 C ffmpeg 249MiB |
| 0 N/A N/A 12772 C ffmpeg 249MiB |
| 0 N/A N/A 12775 C ffmpeg 249MiB |
| 0 N/A N/A 12800 C ffmpeg 249MiB |
| 0 N/A N/A 12811 C ffmpeg 417MiB |
| 0 N/A N/A 12827 C ffmpeg 417MiB |
+-----------------------------------------------------------------------------+
```
To further improve performance, you can set ffmpeg to skip frames in the output,
using the fps filter:
```
output_args:
- -filter:v
- fps=fps=5
```
This setting, for example, allows Frigate to consume my 10-15fps camera streams on
my relatively low powered Haswell machine with relatively low cpu usage.
+72
View File
@@ -0,0 +1,72 @@
---
id: optimizing
title: Optimizing performance
---
- **Google Coral**: It is strongly recommended to use a Google Coral, but Frigate will fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from https://coral.ai
- **Resolution**: For the `detect` input, choose a camera resolution where the smallest object you want to detect barely fits inside a 300x300px square. The model used by Frigate is trained on 300x300px images, so you will get worse performance and no improvement in accuracy by using a larger resolution since Frigate resizes the area where it is looking for objects to 300x300 anyway.
- **FPS**: 5 frames per second should be adequate. Higher frame rates will require more CPU usage without improving detections or accuracy. Reducing the frame rate on your camera will have the greatest improvement on system resources.
- **Hardware Acceleration**: Make sure you configure the `hwaccel_args` for your hardware. They provide a significant reduction in CPU usage if they are available.
- **Masks**: Masks can be used to ignore motion and reduce your idle CPU load. If you have areas with regular motion such as timestamps or trees blowing in the wind, frigate will constantly try to determine if that motion is from a person or other object you are tracking. Those detections not only increase your average CPU usage, but also clog the pipeline for detecting objects elsewhere. If you are experiencing high values for `detection_fps` when no objects of interest are in the cameras, you should use masks to tell frigate to ignore movement from trees, bushes, timestamps, or any part of the image where detections should not be wasted looking for objects.
### FFmpeg Hardware Acceleration
Frigate works on Raspberry Pi 3b/4 and x86 machines. It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible.
Raspberry Pi 3/4 (32-bit OS)
**NOTICE**: If you are using the addon, ensure you turn off `Protection mode` for hardware acceleration.
```yaml
ffmpeg:
hwaccel_args:
- -c:v
- h264_mmal
```
Raspberry Pi 3/4 (64-bit OS)
**NOTICE**: If you are using the addon, ensure you turn off `Protection mode` for hardware acceleration.
```yaml
ffmpeg:
hwaccel_args:
- -c:v
- h264_v4l2m2m
```
Intel-based CPUs (<10th Generation) via Quicksync (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)
```yaml
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
```
Intel-based CPUs (>=10th Generation) via Quicksync (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)
```yaml
ffmpeg:
hwaccel_args:
- -hwaccel
- qsv
- -qsv_device
- /dev/dri/renderD128
```
AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)
**Note:** You also need to set `LIBVA_DRIVER_NAME=radeonsi` as an environment variable on the container.
```yaml
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
```
Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the [nvidia NVDEC documentation](/configuration/nvdec) for more details.
+20
View File
@@ -0,0 +1,20 @@
---
id: hardware
title: Recommended hardware
---
## Cameras
Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and HomeAssistant. It is also helpful if your camera supports multiple substreams to allow different resolutions to be used for detection, streaming, clips, and recordings without re-encoding.
## Computer
| Name | Inference Speed | Notes |
| ----------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Atomic Pi | 16ms | Good option for a dedicated low power board with a small number of cameras. Can leverage Intel QuickSync for stream decoding. |
| Intel NUC NUC7i3BNK | 8-10ms | Great performance. Can handle many cameras at 5fps depending on typical amounts of motion. |
| BMAX B2 Plus | 10-12ms | Good balance of performance and cost. Also capable of running many other services at the same time as frigate. |
| Minisforum GK41 | 9-10ms | Great alternative to a NUC with dual Gigabit NICs. Easily handles several 1080p cameras. |
| Raspberry Pi 3B (32bit) | 60ms | Can handle a small number of cameras, but the detection speeds are slow due to USB 2.0. |
| Raspberry Pi 4 (32bit) | 15-20ms | Can handle a small number of cameras. The 2GB version runs fine. |
| Raspberry Pi 4 (64bit) | 10-15ms | Can handle a small number of cameras. The 2GB version runs fine. |
+13
View File
@@ -0,0 +1,13 @@
---
id: how-it-works
title: How Frigate Works
sidebar_label: How it works
---
Frigate is designed to minimize resource and maximize performance by only looking for objects when and where it is necessary
![Diagram](/img/diagram.png)
1. Look for Motion
2. Calculate Detection Regions
3. Run Object Detection
+25
View File
@@ -0,0 +1,25 @@
---
id: index
title: Frigate
sidebar_label: Features
slug: /
---
A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.
Use of a [Google Coral Accelerator](https://coral.ai/products/) is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead.
- Tight integration with HomeAssistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration)
- Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary
- Leverages multiprocessing heavily with an emphasis on realtime over processing every frame
- Uses a very low overhead motion detection to determine where to run object detection
- Object detection with TensorFlow runs in separate processes for maximum FPS
- Communicates over MQTT for easy integration into other systems
- 24/7 recording
- Re-streaming via RTMP to reduce the number of connections to your camera
## Screenshots
![Media Browser](/img/media_browser.png)
![Notification](/img/notification.png)
+114
View File
@@ -0,0 +1,114 @@
---
id: installation
title: Installation
---
Frigate is a Docker container that can be run on any Docker host including as a [HassOS Addon](https://www.home-assistant.io/addons/). See instructions below for installing the HassOS addon.
For HomeAssistant users, there is also a [custom component (aka integration)](https://github.com/blakeblackshear/frigate-hass-integration). This custom component adds tighter integration with HomeAssistant by automatically setting up camera entities, sensors, media browser for clips and recordings, and a public API to simplify notifications.
Note that HassOS Addons and custom components are different things. If you are already running Frigate with Docker directly, you do not need the Addon since the Addon would run another instance of Frigate.
## HassOS Addon
HassOS users can install via the addon repository. Frigate requires an MQTT server.
1. Navigate to Supervisor > Add-on Store > Repositories
1. Add https://github.com/blakeblackshear/frigate-hass-addons
1. Setup your configuration in the `Configuration` tab
1. Start the addon container
## Docker
Make sure you choose the right image for your architecture:
|Arch|Image Name|
|-|-|
|amd64|blakeblackshear/frigate:stable-amd64|
|amd64nvidia|blakeblackshear/frigate:stable-amd64nvidia|
|armv7|blakeblackshear/frigate:stable-armv7|
|aarch64|blakeblackshear/frigate:stable-aarch64|
It is recommended to run with docker-compose:
```yaml
version: '3.6'
services:
frigate:
container_name: frigate
restart: unless-stopped
privileged: true
image: blakeblackshear/frigate:0.8.0-beta2-amd64
volumes:
- /dev/bus/usb:/dev/bus/usb
- /etc/localtime:/etc/localtime:ro
- <path_to_config>:/config
- <path_to_directory_for_clips>:/media/frigate/clips
- <path_to_directory_for_recordings>:/media/frigate/recordings
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- '5000:5000'
- '1935:1935' # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: 'password'
```
If you can't use docker compose, you can run the container with something similar to this:
```bash
docker run --rm \
--name frigate \
--privileged \
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
-v /dev/bus/usb:/dev/bus/usb \
-v <path_to_directory_for_clips>:/media/frigate/clips \
-v <path_to_directory_for_recordings>:/media/frigate/recordings \
-v <path_to_config>:/config:ro \
-v /etc/localtime:/etc/localtime:ro \
-e FRIGATE_RTSP_PASSWORD='password' \
-p 5000:5000 \
-p 1935:1935 \
blakeblackshear/frigate:0.8.0-beta2-amd64
```
## Kubernetes
Use the [helm chart](https://github.com/k8s-at-home/charts/tree/master/charts/frigate).
## Virtualization
For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices.
## Proxmox
Some people have had success running Frigate in LXC directly with the following config:
```
arch: amd64
cores: 2
features: nesting=1
hostname: FrigateLXC
memory: 4096
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth
ostype: debian
rootfs: local-lvm:vm-115-disk-0,size=12G
swap: 512
lxc.cgroup.devices.allow: c 189:385 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:
```
### Calculating shm-size
The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.
You can calculate the necessary shm-size for each camera with the following formula:
```
(width * height * 1.5 * 7 + 270480)/1048576 = <shm size in mb>
```
+17
View File
@@ -0,0 +1,17 @@
---
id: mdx
title: Powered by MDX
---
You can write JSX and use React components within your Markdown thanks to [MDX](https://mdxjs.com/).
export const Highlight = ({children, color}) => ( <span style={{
backgroundColor: color,
borderRadius: '2px',
color: '#fff',
padding: '0.2rem',
}}>{children}</span> );
<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">Facebook blue</Highlight> are my favorite colors.
I can write **Markdown** alongside my _JSX_!
+27
View File
@@ -0,0 +1,27 @@
---
id: troubleshooting
title: Troubleshooting
---
### My mjpeg stream or snapshots look green and crazy
This almost always means that the width/height defined for your camera are not correct. Double check the resolution with vlc or another player. Also make sure you don't have the width and height values backwards.
Example:
![mismatched-resolution](/img/mismatched-resolution.jpg)
## "[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5639eeb6e140] moov atom not found"
These messages in the logs are expected in certain situations. Frigate checks the integrity of the video cache before assembling clips. Occasionally these cached files will be invalid and cleaned up automatically.
## "ffmpeg didnt return a frame. something is wrong"
Turn on logging for the ffmpeg process by overriding the global_args and setting the log level to `info` (the default is `fatal`). Note that all ffmpeg logs show up in the Frigate logs as `ERROR` level. This does not mean they are actually errors.
```yaml
ffmpeg:
global_args: -hide_banner -loglevel info
```
## "On connect called"
If you see repeated "On connect called" messages in your config, check for another instance of frigate. This happens when multiple frigate containers are trying to connect to mqtt with the same client_id.
+179
View File
@@ -0,0 +1,179 @@
---
id: api
title: HTTP API
---
A web server is available on port 5000 with the following endpoints.
### `/api/<camera_name>`
An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use.
Accepts the following query string parameters:
| param | Type | Description |
| ----------- | ---- | ------------------------------------------------------------------ |
| `fps` | int | Frame rate |
| `h` | int | Height in pixels |
| `bbox` | int | Show bounding boxes for detected objects (0 or 1) |
| `timestamp` | int | Print the timestamp in the upper left (0 or 1) |
| `zones` | int | Draw the zones on the image (0 or 1) |
| `mask` | int | Overlay the mask on the image (0 or 1) |
| `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) |
| `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) |
You can access a higher resolution mjpeg stream by appending `h=height-in-pixels` to the endpoint. For example `http://localhost:5000/back?h=1080`. You can also increase the FPS by appending `fps=frame-rate` to the URL such as `http://localhost:5000/back?fps=10` or both with `?fps=10&h=1000`.
### `/api/<camera_name>/<object_name>/best.jpg[?h=300&crop=1]`
The best snapshot for any object type. It is a full resolution image by default.
Example parameters:
- `h=300`: resizes the image to 300 pixes tall
- `crop=1`: crops the image to the region of the detection rather than returning the entire image
### `/api/<camera_name>/latest.jpg[?h=300]`
The most recent frame that frigate has finished processing. It is a full resolution image by default.
Accepts the following query string parameters:
| param | Type | Description |
| ----------- | ---- | ------------------------------------------------------------------ |
| `h` | int | Height in pixels |
| `bbox` | int | Show bounding boxes for detected objects (0 or 1) |
| `timestamp` | int | Print the timestamp in the upper left (0 or 1) |
| `zones` | int | Draw the zones on the image (0 or 1) |
| `mask` | int | Overlay the mask on the image (0 or 1) |
| `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) |
| `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) |
Example parameters:
- `h=300`: resizes the image to 300 pixes tall
### `/api/stats`
Contains some granular debug info that can be used for sensors in HomeAssistant.
Sample response:
```json
{
/* Per Camera Stats */
"back": {
/***************
* Frames per second being consumed from your camera. If this is higher
* than it is supposed to be, you should set -r FPS in your input_args.
* camera_fps = process_fps + skipped_fps
***************/
"camera_fps": 5.0,
/***************
* Number of times detection is run per second. This can be higher than
* your camera FPS because frigate often looks at the same frame multiple times
* or in multiple locations
***************/
"detection_fps": 1.5,
/***************
* PID for the ffmpeg process that consumes this camera
***************/
"capture_pid": 27,
/***************
* PID for the process that runs detection for this camera
***************/
"pid": 34,
/***************
* Frames per second being processed by frigate.
***************/
"process_fps": 5.1,
/***************
* Frames per second skip for processing by frigate.
***************/
"skipped_fps": 0.0
},
/***************
* Sum of detection_fps across all cameras and detectors.
* This should be the sum of all detection_fps values from cameras.
***************/
"detection_fps": 5.0,
/* Detectors Stats */
"detectors": {
"coral": {
/***************
* Timestamp when object detection started. If this value stays non-zero and constant
* for a long time, that means the detection process is stuck.
***************/
"detection_start": 0.0,
/***************
* Time spent running object detection in milliseconds.
***************/
"inference_speed": 10.48,
/***************
* PID for the shared process that runs object detection on the Coral.
***************/
"pid": 25321
}
},
"service": {
/* Uptime in seconds */
"uptime": 10,
"version": "0.8.0-8883709"
}
}
```
### `/api/config`
A json representation of your configuration
### `/api/version`
Version info
### `/api/events`
Events from the database. Accepts the following query string parameters:
| param | Type | Description |
| -------------- | ---- | --------------------------------------------- |
| `before` | int | Epoch time |
| `after` | int | Epoch time |
| `camera` | str | Camera name |
| `label` | str | Label name |
| `zone` | str | Zone name |
| `limit` | int | Limit the number of events returned |
| `has_snapshot` | int | Filter to events that have snapshots (0 or 1) |
| `has_clip` | int | Filter to events that have clips (0 or 1) |
### `/api/events/summary`
Returns summary data for events in the database. Used by the HomeAssistant integration.
### `/api/events/<id>`
Returns data for a single event.
### `/api/events/<id>/thumbnail.jpg`
Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing `?format=android` will convert the thumbnail to 2:1 aspect ratio.
### `/api/events/<id>/snapshot.jpg`
Returns the snapshot image for the event id. Works while the event is in progress and after completion.
Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification:
|param|Type|Description|
|----|-----|--|
|`h`|int|Height in pixels|
|`bbox`|int|Show bounding boxes for detected objects (0 or 1)|
|`timestamp`|int|Print the timestamp in the upper left (0 or 1)|
|`crop`|int|Crop the snapshot to the (0 or 1)|
### `/clips/<camera>-<id>.mp4`
Video clip for the given camera and event id.
### `/clips/<camera>-<id>.jpg`
JPG snapshot for the given camera and event id.
+120
View File
@@ -0,0 +1,120 @@
---
id: home-assistant
title: Integration with Home Assistant
sidebar_label: Home Assistant
---
The best way to integrate with HomeAssistant is to use the [official integration](https://github.com/blakeblackshear/frigate-hass-integration). When configuring the integration, you will be asked for the `Host` of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like `http://<host>:5000/`. If you are using HassOS with the addon, the host should be `http://ccab4aaf-frigate:5000` (or `http://ccab4aaf-frigate-beta:5000` if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant:
## Sensors:
- Stats to monitor frigate performance
- Object counts for all zones and cameras
## Cameras:
- Cameras for image of the last detected object for each camera
- Camera entities with stream support (requires RTMP)
## Media Browser:
- Rich UI with thumbnails for browsing event clips
- Rich UI for browsing 24/7 recordings by month, day, camera, time
## API:
- Notification API with public facing endpoints for images in notifications
### Notifications
Frigate publishes event information in the form of a change feed via MQTT. This allows lots of customization for notifications to meet your needs. Event changes are published with `before` and `after` information as shown [here](#frigateevents).
Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as frigate finds a "better" image.
```yaml
automation:
- alias: Notify of events
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.mobile_app_pixel_3
data_template:
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
data:
image: 'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
```
```yaml
automation:
- alias: When a person enters a zone named yard
trigger:
platform: mqtt
topic: frigate/events
conditions:
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
- "{{ 'yard' in trigger.payload_json['after']['entered_zones'] }}"
action:
- service: notify.mobile_app_pixel_3
data_template:
message: "A {{trigger.payload_json['after']['label']}} has entered the yard."
data:
image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
tag: "{{trigger.payload_json['after']['id']}}"
```
```yaml
- alias: When a person leaves a zone named yard
trigger:
platform: mqtt
topic: frigate/events
conditions:
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
- "{{ 'yard' in trigger.payload_json['before']['current_zones'] }}"
- "{{ not 'yard' in trigger.payload_json['after']['current_zones'] }}"
action:
- service: notify.mobile_app_pixel_3
data_template:
message: "A {{trigger.payload_json['after']['label']}} has left the yard."
data:
image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
tag: "{{trigger.payload_json['after']['id']}}"
```
```yaml
- alias: Notify for dogs in the front with a high top score
trigger:
platform: mqtt
topic: frigate/events
conditions:
- "{{ trigger.payload_json['after']['label'] == 'dog' }}"
- "{{ trigger.payload_json['after']['camera'] == 'front' }}"
- "{{ trigger.payload_json['after']['top_score'] > 0.98 }}"
action:
- service: notify.mobile_app_pixel_3
data_template:
message: 'High confidence dog detection.'
data:
image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg"
tag: "{{trigger.payload_json['after']['id']}}"
```
If you are using telegram, you can fetch the image directly from Frigate:
```yaml
automation:
- alias: Notify of events
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.telegram_full
data_template:
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
data:
photo:
# this url should work for addon users
- url: 'http://ccab4aaf-frigate:5000/api/events/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg'
caption: 'A {{trigger.payload_json["after"]["label"]}} was detected on {{ trigger.payload_json["after"]["camera"] }} camera'
```
+99
View File
@@ -0,0 +1,99 @@
---
id: mqtt
title: MQTT
---
These are the MQTT messages generated by Frigate. The default topic_prefix is `frigate`, but can be changed in the config file.
### `frigate/available`
Designed to be used as an availability topic with HomeAssistant. Possible message are:
"online": published when frigate is running (on startup)
"offline": published right before frigate stops
### `frigate/<camera_name>/<object_name>`
Publishes the count of objects for the camera for use as a sensor in HomeAssistant.
### `frigate/<zone_name>/<object_name>`
Publishes the count of objects for the zone for use as a sensor in HomeAssistant.
### `frigate/<camera_name>/<object_name>/snapshot`
Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image
is published again.
The height and crop of snapshots can be configured in the config.
### `frigate/events`
Message published for each changed event. The first message is published when the tracked object is no longer marked as a false_positive. When frigate finds a better snapshot of the tracked object or when a zone change occurs, it will publish a message with the same id. When the event ends, a final message is published with `end_time` set.
```json
{
"type": "update", // new, update, or end
"before": {
"id": "1607123955.475377-mxklsc",
"camera": "front_door",
"frame_time": 1607123961.837752,
"label": "person",
"top_score": 0.958984375,
"false_positive": false,
"start_time": 1607123955.475377,
"end_time": null,
"score": 0.7890625,
"box": [424, 500, 536, 712],
"area": 23744,
"region": [264, 450, 667, 853],
"current_zones": ["driveway"],
"entered_zones": ["yard", "driveway"],
"thumbnail": null
},
"after": {
"id": "1607123955.475377-mxklsc",
"camera": "front_door",
"frame_time": 1607123962.082975,
"label": "person",
"top_score": 0.958984375,
"false_positive": false,
"start_time": 1607123955.475377,
"end_time": null,
"score": 0.87890625,
"box": [432, 496, 544, 854],
"area": 40096,
"region": [218, 440, 693, 915],
"current_zones": ["yard", "driveway"],
"entered_zones": ["yard", "driveway"],
"thumbnail": null
}
}
```
### `frigate/stats`
Same data available at `/api/stats` published at a configurable interval.
### `frigate/<camera_name>/detect/set`
Topic to turn detection for a camera on and off. Expected values are `ON` and `OFF`.
### `frigate/<camera_name>/detect/state`
Topic with current state of detection for a camera. Published values are `ON` and `OFF`.
### `frigate/<camera_name>/clips/set`
Topic to turn clips for a camera on and off. Expected values are `ON` and `OFF`.
### `frigate/<camera_name>/clips/state`
Topic with current state of clips for a camera. Published values are `ON` and `OFF`.
### `frigate/<camera_name>/snapshots/set`
Topic to turn snapshots for a camera on and off. Expected values are `ON` and `OFF`.
### `frigate/<camera_name>/snapshots/state`
Topic with current state of snapshots for a camera. Published values are `ON` and `OFF`.
+10
View File
@@ -0,0 +1,10 @@
---
id: web
title: Web Interface
---
Frigate comes bundled with a simple web ui that supports the following:
- Show cameras
- Browse events
- Mask helper
+72
View File
@@ -0,0 +1,72 @@
module.exports = {
title: 'Frigate',
tagline: 'NVR With Realtime Object Detection for IP Cameras',
url: 'https://blakeblackshear.github.io',
baseUrl: '/frigate/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'blakeblackshear',
projectName: 'frigate',
themeConfig: {
navbar: {
title: 'Frigate',
logo: {
alt: 'Frigate',
src: 'img/logo.svg',
srcDark: 'img/logo-dark.svg',
},
items: [
{
to: '/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
{
href: 'https://github.com/blakeblackshear/frigate',
label: 'GitHub',
position: 'right',
},
],
},
sidebarCollapsible: false,
hideableSidebar: true,
footer: {
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/blakeblackshear/frigate',
},
{
label: 'Discussions',
href: 'https://github.com/blakeblackshear/frigate/discussions',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Blake Blackshear`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/blakeblackshear/frigate/edit/master/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
+14035
View File
File diff suppressed because it is too large Load Diff
+34
View File
@@ -0,0 +1,34 @@
{
"name": "docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"clear": "docusaurus clear"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.70",
"@docusaurus/preset-classic": "2.0.0-alpha.70",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"react": "^16.8.4",
"react-dom": "^16.8.4"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
+14
View File
@@ -0,0 +1,14 @@
module.exports = {
docs: {
Frigate: ['index', 'how-it-works', 'hardware', 'installation', 'troubleshooting'],
Configuration: [
'configuration/index',
'configuration/cameras',
'configuration/optimizing',
'configuration/detectors',
'configuration/false_positives',
'configuration/advanced',
],
Usage: ['usage/home-assistant', 'usage/web', 'usage/api', 'usage/mqtt'],
},
};
+25
View File
@@ -0,0 +1,25 @@
/* stylelint-disable docusaurus/copyright-header */
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #3b82f7;
--ifm-color-primary-dark: #1d4ed8;
--ifm-color-primary-darker: #1e40af;
--ifm-color-primary-darkest: #1e3a8a;
--ifm-color-primary-light: #60a5fa;
--ifm-color-primary-lighter: #93c5fd;
--ifm-color-primary-lightest: #dbeafe;
--ifm-code-font-size: 95%;
}
.docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
View File
View File

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 936 B

View File

Before

Width:  |  Height:  |  Size: 933 B

After

Width:  |  Height:  |  Size: 933 B

Some files were not shown because too many files have changed in this diff Show More