Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <signal.h>
static void exec_command(char *command)
{
if (!fork()) {
$ git clone https://github.com/Motion-Project/motion.git
Cloning into 'motion'...
remote: Enumerating objects: 8059, done.
remote: Counting objects: 100% (631/631), done.
remote: Compressing objects: 100% (238/238), done.
remote: Total 8059 (delta 434), reused 558 (delta 386), pack-reused 7428
Receiving objects: 100% (8059/8059), 7.51 MiB | 10.93 MiB/s, done.
Resolving deltas: 100% (6023/6023), done.
$ cd motion
$ git checkout 4.5
dave@ubuntu:~/source/motion$ ./src/motion
[0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /home/dave/source/build/etc/motion/motion.conf
[0:motion] [NTC] [ALL] config_camera: Processing camera config file /home/dave/source/build/etc/motion/camera1.conf
[0:motion] [NTC] [ALL] config_camera: Processing camera config file /home/dave/source/build/etc/motion/camera2.conf
[0:motion] [NTC] [ALL] config_camera: Processing camera config file /home/dave/source/build/etc/motion/camera3.conf
[0:motion] [NTC] [ALL] config_camera: Processing camera config file /home/dave/source/build/etc/motion/camera4.conf
[0:motion] [NTC] [ALL] motion_startup: Logging to syslog
[0:motion] [NTC] [ALL] motion_startup: Motion 4.4.0+git20220619-5a6ba08 Started
[0:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (ALL)
[0:motion] [INF] [ALL] conf_output_parms: Writing configuration parameters from all files (5):
dave@PI3:~/build/etc/motion $ libcamerify gdb /home/dave/build/bin/motion
GNU gdb (Raspbian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>MotionPlus</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
* {
margin: 0;
padding: 0;
@Mr-Dave
Mr-Dave / gist:876aa74d62c7b054dd2602d90403bd2a
Created January 31, 2022 05:06
Quit and end triggers action
diff --git a/src/webu.c b/src/webu.c
index d52bfee..1de53dc 100644
--- a/src/webu.c
+++ b/src/webu.c
@@ -620,7 +620,6 @@ void webu_process_action(struct webui_ctx *webui)
_("Quitting thread %d"),webui->thread_nbr);
webui->cntlst[indx]->restart = FALSE;
webui->cntlst[indx]->event_stop = TRUE;
- webui->cntlst[indx]->event_user = TRUE;
webui->cntlst[indx]->finish = TRUE;
@Mr-Dave
Mr-Dave / gist:753eb265ae4ffc0fa3479c4202db414b
Created January 31, 2022 04:41
Preferred Codec Patch 2
diff --git a/src/ffmpeg.c b/src/ffmpeg.c
index 10e8366..a03aeb7 100644
--- a/src/ffmpeg.c
+++ b/src/ffmpeg.c
@@ -220,7 +220,7 @@ static int ffmpeg_get_oformat(struct ffmpeg *ffmpeg)
if (ffmpeg->tlapse == TIMELAPSE_APPEND) {
ffmpeg->oc->oformat = av_guess_format ("mpeg2video", NULL, NULL);
if (ffmpeg->oc->oformat) {
- ffmpeg->oc->video_codec_id = MY_CODEC_ID_MPEG2VIDEO;
+ ffmpeg->oc->oformat->video_codec = MY_CODEC_ID_MPEG2VIDEO;
diff --git a/src/ffmpeg.c b/src/ffmpeg.c
index 10e8366..cf2b9dd 100644
--- a/src/ffmpeg.c
+++ b/src/ffmpeg.c
@@ -175,6 +175,73 @@ static void ffmpeg_free_context(struct ffmpeg *ffmpeg)
}
+struct blacklist_t
+{
@Mr-Dave
Mr-Dave / sk.po
Created February 21, 2019 05:43
Slovak Translations For Motion from Dusan Mikulas
# Motion Application
# Copyright (2018)
# This file is distributed under the same license as the Motion package.
#
msgid ""
msgstr ""
"Project-Id-Version: 4.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-16 11:57-0600\n"
"PO-Revision-Date: 2018-12-17 06:35+0100\n"
@Mr-Dave
Mr-Dave / gist:d6e8ad1f4b9cf62016684db77e8fcac0
Created January 6, 2018 02:21
Controls of Pi Cam using v4l2 module
`[1:ml1] [INF] [VID] v4l2_list_controls: --------------------------`
`[1:ml1] [INF] [VID] v4l2_list_controls: V4L2 ID Name and Range`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID00980900 Brightness, Range 0 to 100`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID00980901 Contrast, Range -100 to 100`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID00980902 Saturation, Range -100 to 100`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID0098090e Red Balance, Range 1 to 7999`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID0098090f Blue Balance, Range 1 to 7999`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID00980914 Horizontal Flip, Range 0 to 1`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID00980915 Vertical Flip, Range 0 to 1`
`[1:ml1] [INF] [VID] v4l2_list_controls: ID00980918 Power Line Frequency, Range 0 to 3`