
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (58)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (3223)
-
How to initiate ffmpeg sendcmd at first frame of input
22 janvier 2019, par WestonCI’m trying to scale an input overlayed on an alpha background image over time using sendcmd. Everything is working as expected except the first frame of the output file isn’t receiving the command marked with time 0.00, resulting in a single frame of the overlay in the top left corner before jumping to the first command-specified position at frame 2.
I’ve tried specifying the initial position as part of the overlay filter in the main command :
[0:v][a]overlay=x=main_w-overlay_w-28:y=main_h-overlay_h-25[b]
which works until the scaling hits a certain threshold and then some sort of bug occurs :
My code that works except for first frame :
ffmpeg -i AlphaLayer.png -i Test.mp4 -c:v prores_ks -profile:v 4444 -filter_complex "[1:v]scale=1360:-1:eval=init:force_original_aspect_ratio=increase[a];[0:v][a]overlay[b],[b]sendcmd=f=scale4.txt" ScaleTest.mov
The scale4.txt file looks like this :
0.00 scale w 1360, h -1;
0.00 overlay x main_w-overlay_w-28;
0.00 overlay y main_h-overlay_h-25;
30 scale w 1560, h -1;
31 scale w 1660, h -1;
32 scale w 1760, h -1;
33 scale w 1860, h -1;
34 overlay x (main_w-overlay_w)/2;
34 overlay y (main_h-overlay_h)/2;
34 scale w 1920, h -1;
35 scale w 1360, h -1;I expect the overlay to be in the specified position at frame 1 of the video, but it is in the default position until frame 2.
Output log :
$ ffmpeg -i AlphaLayer.png -i Test.mp4 -c:v prores_ks -profile:v 4444 -filter_complex "[1:v]scale=1360:-1:eval=init:force_original_aspect_ratio=increase[a];[0:v][a]overlay[b],[b]sendcmd=f=scale4.txt" Output.mov
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, png_pipe, from 'AlphaLayer.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 1920x1080 [SAR 2835:2835 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Test.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
creation_time : 2019-01-17T20:28:30.000000Z
Duration: 00:02:00.09, start: 0.000000, bitrate: 700 kb/s
Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 377 kb/s, 25 fps, 25 tbr, 25k tbn, 50k tbc (default)
Metadata:
creation_time : 2019-01-17T20:28:31.000000Z
handler_name : ?Mainconcept Video Media Handler
encoder : AVC Coding
Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2019-01-17T20:28:31.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
Stream mapping:
Stream #0:0 (png) -> overlay:main (graph 0)
Stream #1:0 (h264) -> scale (graph 0)
sendcmd (graph 0) -> Stream #0:0 (prores_ks)
Stream #1:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'Output.mov':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: prores (prores_ks) (ap4h / 0x68347061), yuva444p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
Metadata:
encoder : Lavc58.35.100 prores_ks
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2019-01-17T20:28:31.000000Z
handler_name : #Mainconcept MP4 Sound Media Handler
encoder : Lavc58.35.100 aac
frame= 15 fps=0.0 q=-0.0 size= 0kB time=00:00:00.76 bitrate= 0.4kbits/frame= 30 fps= 29 q=-0.0 size= 1024kB time=00:00:01.57 bitrate=5313.9kbits/frame= 45 fps= 29 q=-0.0 size= 2304kB time=00:00:01.96 bitrate=9616.8kbits/frame= 61 fps= 29 q=-0.0 size= 3328kB time=00:00:02.77 bitrate=9830.5kbits/frame= 74 fps= 27 q=-0.0 size= 4352kB time=00:00:03.17 bitrate=11216.0kbitsframe= 89 fps= 28 q=-0.0 size= 5376kB time=00:00:03.96 bitrate=11098.9kbitsframe= 103 fps= 27 q=-0.0 size= 6400kB time=00:00:04.37 bitrate=11988.4kbitsframe= 117 fps= 27 q=-0.0 size= 7168kB time=00:00:04.77 bitrate=12288.1kbitsframe= 131 fps= 27 q=-0.0 size= 8192kB time=00:00:05.56 bitrate=12052.6kbitsframe= 145 fps= 27 q=-0.0 size= 9216kB time=00:00:05.97 bitrate=12639.1kbitsframe= 157 fps= 26 q=-0.0 size= 9984kB time=00:00:06.40 bitrate=12779.6kbitsframe= 172 fps= 27 q=-0.0 size= 11264kB time=00:00:07.16 bitrate=12873.2kbitsframe= 185 fps= 26 q=-0.0 size= 12032kB time=00:00:07.57 bitrate=13014.9kbitsframe= 196 fps= 26 q=-0.0 size= 12800kB time=00:00:07.97 bitrate=13142.3kbitsframe= 206 fps= 26 q=-0.0 size= 13568kB time=00:00:08.36 bitrate=13291.1kbitsframe= 217 fps= 25 q=-0.0 size= 14336kB time=00:00:08.78 bitrate=13361.7kbitsframe= 230 fps= 25 q=-0.0 size= 15360kB time=00:00:09.57 bitrate=13136.4kbitsframe= 242 fps= 25 q=-0.0 size= 16128kB time=00:00:09.96 bitrate=13261.6kbitsframe= 255 fps= 25 q=-0.0 size= 16896kB time=00:00:10.36 bitrate=13350.0kbitsframe= 267 fps= 25 q=-0.0 size= 17920kB time=00:00:10.77 bitrate=13626.3kbitsframe= 279 fps= 25 q=-0.0 size= 18688kB time=00:00:11.56 bitrate=13240.2kbitsframe= 291 fps= 25 q=-0.0 size= 19456kB time=00:00:11.96 bitrate=13317.5kbitsframe= 303 fps= 25 q=-0.0 size= 20480kB time=00:00:12.37 bitrate=13559.2kbitsframe= 315 fps= 25 q=-0.0 size= 21248kB time=00:00:12.77 bitrate=13621.4kbitsframe= 327 fps= 25 q=-0.0 size= 22016kB time=00:00:13.16 bitrate=13702.0kbitsframe= 339 fps= 25 q=-0.0 size= 23040kB time=00:00:13.97 bitrate=13507.4kbitsframe= 351 fps= 25 q=-0.0 size= 23808kB time=00:00:14.35 bitrate=13584.4kbitsframe= 363 fps= 25 q=-0.0 size= 24576kB time=00:00:14.76 bitrate=13637.6kbitsframe= 375 fps= 25 q=-0.0 size= 25344kB time=00:00:15.16 bitrate=13687.9kbitsframe= 387 fps= 24 q=-0.0 size= 26368kB time=00:00:15.57 bitrate=13870.3kbitsframe= 399 fps= 24 q=-0.0 size= 27136kB time=00:00:16.36 bitrate=13585.7kbitsframe= 411 fps= 24 q=-0.0 size= 27904kB time=00:00:16.76 bitrate=13632.5kbitsframe= 423 fps= 24 q=-0.0 size= 28928kB time=00:00:17.17 bitrate=13799.2kbitsframe= 435 fps= 24 q=-0.0 size= 29696kB time=00:00:17.55 bitrate=13855.7kbitsframe= 447 fps= 24 q=-0.0 size= 30464kB time=00:00:17.96 bitrate=13893.3kbitsframe= 459 fps= 24 q=-0.0 size= 31488kB time=00:00:18.77 bitrate=13740.2kbitsframe= 471 fps= 24 q=-0.0 size= 32256kB time=00:00:19.15 bitrate=13793.2kbitsframe= 483 fps= 24 q=-0.0 size= 33024kB time=00:00:19.56 bitrate=13829.0kbitsframe= 495 fps= 24 q=-0.0 size= 34048kB time=00:00:19.96 bitrate=13968.4kbitsframe= 507 fps= 24 q=-0.0 size= 34816kB time=00:00:20.37 bitrate=13999.3kbitsframe= 519 fps= 24 q=-0.0 size= 35584kB time=00:00:21.16 bitrate=13774.5kbitsframe= 531 fps= 24 q=-0.0 size= 36352kB time=00:00:21.56 bitrate=13807.3kbitsframe= 543 fps= 24 q=-0.0 size= 37376kB time=00:00:21.97 bitrate=13934.4kbitsframe= 555 fps= 24 q=-0.0 size= 38144kB time=00:00:22.35 bitrate=13976.4kbitsframe= 567 fps= 24 q=-0.0 size= 38912kB time=00:00:22.76 bitrate=14004.0kbitsframe= 579 fps= 24 q=-0.0 size= 39936kB time=00:00:23.57 bitrate=13878.2kbitsframe= 590 fps= 24 q=-0.0 size= 40704kB time=00:00:23.97 bitrate=13906.0kbitsframe= 602 fps= 24 q=-0.0 size= 41472kB time=00:00:24.36 bitrate=13945.1kbitsframe= 614 fps= 24 q=-0.0 size= 42240kB time=00:00:24.76 bitrate=13970.9kbitsframe= 626 fps= 24 q=-0.0 size= 43264kB time=00:00:25.17 bitrate=14079.1kbitsframe= 637 fps= 24 q=-0.0 size= 44032kB time=00:00:25.60 bitrate=14090.3kbitsframe= 650 fps= 24 q=-0.0 size= 44800kB time=00:00:26.36 bitrate=13918.5kbitsframe= 662 fps= 24 q=-0.0 size= 45824kB time=00:00:26.77 bitrate=14021.1kbitsframe= 674 fps= 24 q=-0.0 size= 46592kB time=00:00:27.17 bitrate=14043.4kbitsframe= 685 fps= 24 q=-0.0 size= 47360kB time=00:00:27.56 bitrate=14076.0kbitsframe= 696 fps= 24 q=-0.0 size= 48128kB time=00:00:27.96 bitrate=14097.0kbitsframe= 707 fps= 23 q=-0.0 size= 48896kB time=00:00:28.39 bitrate=14106.7kbitsframe= 720 fps= 23 q=-0.0 size= 49920kB time=00:00:29.16 bitrate=14022.9kbitsframe= 732 fps= 23 q=-0.0 size= 50688kB time=00:00:29.56 bitrate=14043.4kbitsframe= 744 fps= 23 q=-0.0 size= 51456kB time=00:00:29.97 bitrate=14063.4kbitsframe= 756 fps= 23 q=-0.0 size= 52480kB time=00:00:30.37 bitrate=14151.9kbitsframe= 767 fps= 23 q=-0.0 size= 53248kB time=00:00:30.78 bitrate=14170.0kbitsframe= 780 fps= 23 q=-0.0 size= 54016kB time=00:00:31.57 bitrate=14015.0kbitsframe= 792 fps= 23 q=-0.0 size= 55040kB time=00:00:31.97 bitrate=14099.6kbitsframe= 804 fps= 23 q=-0.0 size= 56064kB time=00:00:32.36 bitrate=14191.6kbitsframe= 816 fps= 23 q=-0.0 size= 56832kB time=00:00:32.76 bitrate=14208.0kbitsframe= 827 fps= 23 q=-0.0 size= 57856kB time=00:00:33.19 bitrate=14278.1kbitsframe= 840 fps= 23 q=-0.0 size= 58880kB time=00:00:33.96 bitrate=14202.2kbitsframe= 852 fps= 23 q=-0.0 size= 59648kB time=00:00:34.36 bitrate=14217.8kbitsframe= 864 fps= 23 q=-0.0 size= 60672kB time=00:00:34.77 bitrate=14293.3kbitsframe= 876 fps= 23 q=-0.0 size= 61184kB time=00:00:35.17 bitrate=14247.8kbitsframe= 887 fps= 23 q=-0.0 size= 61440kB time=00:00:35.58 bitrate=14144.5kbitsframe= 900 fps= 23 q=-0.0 size= 62208kB time=00:00:36.37 bitrate=14010.5kbitsframe= 912 fps= 23 q=-0.0 size= 63232kB time=00:00:36.77 bitrate=14084.2kbitsframe= 924 fps= 23 q=-0.0 size= 64000kB time=00:00:37.16 bitrate=14107.9kbitsframe= 936 fps= 23 q=-0.0 size= 64768kB time=00:00:37.56 bitrate=14123.2kbitsframe= 947 fps= 23 q=-0.0 size= 65536kB time=00:00:37.99 bitrate=14130.2kbitsframe= 960 fps= 23 q=-0.0 size= 66304kB time=00:00:38.76 bitrate=14012.5kbitsframe= 972 fps= 23 q=-0.0 size= 67328kB time=00:00:39.16 bitrate=14081.7kbitsframe= 984 fps= 23 q=-0.0 size= 68096kB time=00:00:39.57 bitrate=14096.4kbitsframe= 996 fps= 23 q=-0.0 size= 68864kB time=00:00:39.95 bitrate=14118.4kbitsframe= 1007 fps= 23 q=-0.0 size= 69632kB time=00:00:40.38 bitrate=14125.0kbitsframe= 1020 fps= 23 q=-0.0 size= 70400kB time=00:00:41.17 bitrate=14007.1kbitsframe= 1032 fps= 23 q=-0.0 size= 71424kB time=00:00:41.55 bitrate=14079.5kbitsframe= 1044 fps= 23 q=-0.0 size= 72192kB time=00:00:41.96 bitrate=14093.4kbitsframe= 1056 fps= 23 q=-0.0 size= 72960kB time=00:00:42.36 bitrate=14107.1kbitsframe= 1067 fps= 23 q=-0.0 size= 73728kB time=00:00:42.79 bitrate=14113.4kbitsframe= 1080 fps= 23 q=-0.0 size= 74496kB time=00:00:43.56 bitrate=14009.0kbitsframe= 1092 fps= 23 q=-0.0 size= 75520kB time=00:00:43.96 bitrate=14070.7kbitsframe= 1104 fps= 23 q=-0.0 size= 76288kB time=00:00:44.37 bitrate=14083.9kbitsframe= 1116 fps= 23 q=-0.0 size= 77056kB time=00:00:44.75 bitrate=14103.7kbitsframe= 1127 fps= 23 q=-0.0 size= 77824kB time=00:00:45.18 bitrate=14109.7kbitsframe= 1140 fps= 23 q=-0.0 size= 78592kB time=00:00:45.97 bitrate=14004.3kbitsframe= 1152 fps= 23 q=-0.0 size= 79616kB time=00:00:46.35 bitrate=14069.3kbitsframe= 1164 fps= 23 q=-0.0 size= 80384kB time=00:00:46.76 bitrate=14081.9kbitsframe= 1176 fps= 23 q=-0.0 size= 81152kB time=00:00:47.16 bitrate=14094.2kbitsframe= 1187 fps= 23 q=-0.0 size= 81920kB time=00:00:47.59 bitrate=14100.1kbitsframe= 1200 fps= 23 q=-0.0 size= 82688kB time=00:00:48.36 bitrate=14006.3kbitsframe= 1212 fps= 23 q=-0.0 size= 83712kB time=00:00:48.76 bitrate=14061.9kbitsframe= 1224 fps= 23 q=-0.0 size= 84480kB time=00:00:49.17 bitrate=14073.9kbitsframe= 1236 fps= 23 q=-0.0 size= 85248kB time=00:00:49.57 bitrate=14085.7kbitsframe= 1247 fps= 22 q=-0.0 size= 86016kB time=00:00:49.98 bitrate=14097.4kbitsframe= 1260 fps= 22 q=-0.0 size= 86784kB time=00:00:50.77 bitrate=14002.1kbitsframe= 1272 fps= 22 q=-0.0 size= 87808kB time=00:00:51.17 bitrate=14055.1kbitsframe= 1284 fps= 22 q=-0.0 size= 88576kB time=00:00:51.56 bitrate=14072.5kbitsframe= 1296 fps= 22 q=-0.0 size= 89344kB time=00:00:51.96 bitrate=14083.8kbitsframe= 1307 fps= 22 q=-0.0 size= 90112kB time=00:00:52.39 bitrate=14089.2kbitsframe= 1320 fps= 22 q=-0.0 size= 90880kB time=00:00:53.16 bitrate=14004.0kbitsframe= 1332 fps= 22 q=-0.0 size= 91904kB time=00:00:53.56 bitrate=14054.6kbitsframe= 1344 fps= 22 q=-0.0 size= 92672kB time=00:00:53.97 bitrate=14065.6kbitsframe= 1356 fps= 22 q=-0.0 size= 93440kB time=00:00:54.37 bitrate=14076.5kbitsframe= 1367 fps= 22 q=-0.0 size= 94208kB time=00:00:54.78 bitrate=14087.2kbitsframe= 1379 fps= 22 q=-0.0 size= 94976kB time=00:00:55.57 bitrate=14000.3kbitsframe= 1387 fps= 22 q=-0.0 size= 95488kB time=00:00:55.59 bitrate=14070.4kbitsframe= 1399 fps= 22 q=-0.0 size= 96256kB time=00:00:56.36 bitrate=13990.3kbitsframe= 1411 fps= 22 q=-0.0 size= 97280kB time=00:00:56.76 bitrate=14038.2kbitsframe= 1423 fps= 22 q=-0.0 size= 98048kB time=00:00:57.17 bitrate=14048.7kbitsframe= 1434 fps= 22 q=-0.0 size= 98816kB time=00:00:57.57 bitrate=14059.0kbitsframe= 1446 fps= 22 q=-0.0 size= 99584kB time=00:00:57.96 bitrate=14074.4kbitsframe= 1457 fps= 22 q=-0.0 size= 100352kB time=00:00:58.38 bitrate=14079.4kbitsframe= 1470 fps= 22 q=-0.0 size= 101120kB time=00:00:59.17 bitrate=13997.9kbitsframe= 1482 fps= 22 q=-0.0 size= 102144kB time=00:00:59.56 bitrate=14048.5kbitsframe= 1494 fps= 22 q=-0.0 size= 102912kB time=00:00:59.96 bitrate=14058.4kbitsframe= 1506 fps= 22 q=-0.0 size= 103680kB time=00:01:00.37 bitrate=14068.2kbitsframe= 1517 fps= 22 q=-0.0 size= 104704kB time=00:01:00.77 bitrate=14112.4kbitsframe= 1527 fps= 22 q=-0.0 size= 108032kB time=00:01:01.16 bitrate=14469.6kbitsframe= 1537 fps= 22 q=-0.0 size= 111616kB time=00:01:01.56 bitrate=14851.2kbitsframe= 1549 fps= 22 q=-0.0 size= 114688kB time=00:01:02.35 bitrate=15066.8kbitsframe= 1561 fps= 22 q=-0.0 size= 117504kB time=00:01:02.76 bitrate=15337.0kbitsframe= 1573 fps= 22 q=-0.0 size= 120576kB time=00:01:03.16 bitrate=15637.0kbitsframe= 1585 fps= 22 q=-0.0 size= 123904kB time=00:01:03.57 bitrate=15966.2kbitsframe= 1597 fps= 22 q=-0.0 size= 127488kB time=00:01:03.95 bitrate=16329.4kbitsframe= 1609 fps= 22 q=-0.0 size= 131072kB time=00:01:04.76 bitrate=16578.3kbitsframe= 1621 fps= 22 q=-0.0 size= 134912kB time=00:01:05.17 bitrate=16957.8kbitsframe= 1633 fps= 22 q=-0.0 size= 139264kB time=00:01:05.55 bitrate=17402.3kbitsframe= 1645 fps= 22 q=-0.0 size= 141056kB time=00:01:05.96 bitrate=17518.0kbitsframe= 1657 fps= 22 q=-0.0 size= 141824kB time=00:01:06.36 bitrate=17505.8kbitsframe= 1669 fps= 22 q=-0.0 size= 142592kB time=00:01:07.15 bitrate=17393.7kbitsframe= 1681 fps= 22 q=-0.0 size= 143360kB time=00:01:07.56 bitrate=17382.5kbitsframe= 1693 fps= 22 q=-0.0 size= 144384kB time=00:01:07.96 bitrate=17402.2kbitsframe= 1705 fps= 22 q=-0.0 size= 145152kB time=00:01:08.37 bitrate=17391.1kbitsframe= 1717 fps= 22 q=-0.0 size= 145920kB time=00:01:08.75 bitrate=17385.4kbitsframe= 1729 fps= 22 q=-0.0 size= 146688kB time=00:01:09.56 bitrate=17273.3kbitsframe= 1741 fps= 22 q=-0.0 size= 147456kB time=00:01:09.97 bitrate=17263.1kbitsframe= 1753 fps= 22 q=-0.0 size= 148480kB time=00:01:10.35 bitrate=17288.2kbitsframe= 1765 fps= 22 q=-0.0 size= 149248kB time=00:01:10.76 bitrate=17278.0kbitsframe= 1777 fps= 22 q=-0.0 size= 150016kB time=00:01:11.16 bitrate=17268.0kbitsframe= 1789 fps= 22 q=-0.0 size= 150784kB time=00:01:11.97 bitrate=17161.0kbitsframe= 1801 fps= 22 q=-0.0 size= 151552kB time=00:01:12.36 bitrate=17156.8kbitsframe= 1813 fps= 22 q=-0.0 size= 152576kB time=00:01:12.76 bitrate=17176.5kbitsframe= 1825 fps= 22 q=-0.0 size= 153344kB time=00:01:13.17 bitrate=17167.4kbitsframe= 1837 fps= 22 q=-0.0 size= 154112kB time=00:01:13.57 bitrate=17158.3kbitsframe= 1849 fps= 22 q=-0.0 size= 154880kB time=00:01:14.36 bitrate=17060.8kbitsframe= 1861 fps= 22 q=-0.0 size= 155648kB time=00:01:14.77 bitrate=17052.5kbitsframe= 1873 fps= 22 q=-0.0 size= 156672kB time=00:01:15.17 bitrate=17072.1kbitsframe= 1885 fps= 22 q=-0.0 size= 157440kB time=00:01:15.56 bitrate=17068.6kbitsframe= 1897 fps= 22 q=-0.0 size= 158208kB time=00:01:15.96 bitrate=17060.3kbitsframe= 1909 fps= 22 q=-0.0 size= 158976kB time=00:01:16.77 bitrate=16962.2kbitsframe= 1921 fps= 22 q=-0.0 size= 159744kB time=00:01:17.16 bitrate=16959.3kbitsframe= 1933 fps= 22 q=-0.0 size= 160768kB time=00:01:17.56 bitrate=16978.8kbitsframe= 1945 fps= 22 q=-0.0 size= 161536kB time=00:01:17.97 bitrate=16971.2kbitsframe= 1953 fps= 22 q=-0.0 size= 162048kB time=00:01:18.37 bitrate=16937.0kbitsframe= 1966 fps= 22 q=-0.0 size= 163072kB time=00:01:18.76 bitrate=16960.9kbitsframe= 1977 fps= 22 q=-0.0 size= 163584kB time=00:01:19.18 bitrate=16922.5kbitsframe= 1989 fps= 22 q=-0.0 size= 164608kB time=00:01:19.97 bitrate=16860.4kbitsframe= 2000 fps= 22 q=-0.0 size= 165376kB time=00:01:20.36 bitrate=16858.1kbitsframe= 2009 fps= 22 q=-0.0 size= 165888kB time=00:01:20.76 bitrate=16825.4kbitsframe= 2021 fps= 22 q=-0.0 size= 166656kB time=00:01:21.17 bitrate=16818.9kbitsframe= 2033 fps= 22 q=-0.0 size= 167424kB time=00:01:21.57 bitrate=16812.5kbitsframe= 2044 fps= 22 q=-0.0 size= 168192kB time=00:01:21.96 bitrate=16810.4kbitsframe= 2056 fps= 22 q=-0.0 size= 169216kB time=00:01:22.36 bitrate=16829.6kbitsframe= 2067 fps= 22 q=-0.0 size= 169728kB time=00:01:22.79 bitrate=16793.5kbitsframe= 2080 fps= 22 q=-0.0 size= 170752kB time=00:01:23.56 bitrate=16739.5kbitsframe= 2092 fps= 22 q=-0.0 size= 171520kB time=00:01:23.96 bitrate=16733.7kbitsframe= 2104 fps= 22 q=-0.0 size= 172288kB time=00:01:24.37 bitrate=16727.8kbitsframe= 2116 fps= 22 q=-0.0 size= 173312kB time=00:01:24.77 bitrate=16746.8kbitsframe= 2127 fps= 22 q=-0.0 size= 173824kB time=00:01:25.16 bitrate=16720.5kbitsframe= 2137 fps= 22 q=-0.0 size= 174592kB time=00:01:25.58 bitrate=16710.7kbitsframe= 2147 fps= 22 q=-0.0 size= 175360kB time=00:01:25.97 bitrate=16709.2kbitsframe= 2157 fps= 22 q=-0.0 size= 175872kB time=00:01:26.37 bitrate=16679.4kbitsframe= 2170 fps= 22 q=-0.0 size= 176896kB time=00:01:27.16 bitrate=16624.6kbitsframe= 2182 fps= 22 q=-0.0 size= 177664kB time=00:01:27.57 bitrate=16619.5kbitsframe= 2194 fps= 22 q=-0.0 size= 178432kB time=00:01:27.95 bitrate=16618.5kbitsframe= 2206 fps= 22 q=-0.0 size= 179456kB time=00:01:28.36 bitrate=16637.2kbitsframe= 2217 fps= 22 q=-0.0 size= 179968kB time=00:01:28.78 bitrate=16604.5kbitsframe= 2230 fps= 22 q=-0.0 size= 180992kB time=00:01:29.55 bitrate=16555.7kbitsframe= 2242 fps= 22 q=-0.0 size= 181760kB time=00:01:29.96 bitrate=16551.1kbitsframe= 2254 fps= 22 q=-0.0 size= 182528kB time=00:01:30.36 bitrate=16546.5kbitsframe= 2266 fps= 22 q=-0.0 size= 183552kB time=00:01:30.77 bitrate=16565.0kbitsframe= 2277 fps= 22 q=-0.0 size= 184064kB time=00:01:31.17 bitrate=16537.3kbitsframe= 2290 fps= 22 q=-0.0 size= 185088kB time=00:01:31.96 bitrate=16486.6kbitsframe= 2302 fps= 22 q=-0.0 size= 185856kB time=00:01:32.37 bitrate=16482.4kbitsframe= 2314 fps= 22 q=-0.0 size= 186624kB time=00:01:32.75 bitrate=16482.0kbitsframe= 2326 fps= 22 q=-0.0 size= 187648kB time=00:01:33.16 bitrate=16500.3kbitsframe= 2337 fps= 22 q=-0.0 size= 188160kB time=00:01:33.56 bitrate=16473.7kbitsframe= 2347 fps= 22 q=-0.0 size= 188928kB time=00:01:33.97 bitrate=16469.5kbitsframe= 2357 fps= 22 q=-0.0 size= 189696kB time=00:01:34.35 bitrate=16469.2kbitsframe= 2367 fps= 22 q=-0.0 size= 190208kB time=00:01:34.78 bitrate=16439.3kbitsframe= 2377 fps= 22 q=-0.0 size= 190976kB time=00:01:35.18 bitrate=16435.4kbitsframe= 2390 fps= 22 q=-0.0 size= 192000kB time=00:01:35.97 bitrate=16387.6kbitsframe= 2401 fps= 22 q=-0.0 size= 192768kB time=00:01:36.36 bitrate=16387.6kbitsframe= 2410 fps= 22 q=-0.0 size= 193280kB time=00:01:36.76 bitrate=16362.3kbitsframe= 2422 fps= 22 q=-0.0 size= 194048kB time=00:01:37.17 bitrate=16358.8kbitsframe= 2434 fps= 22 q=-0.0 size= 194816kB time=00:01:37.57 bitrate=16355.3kbitsframe= 2446 fps= 22 q=-0.0 size= 195840kB time=00:01:37.96 bitrate=16376.9kbitsframe= 2457 fps= 22 q=-0.0 size= 196352kB time=00:01:38.38 bitrate=16348.5kbitsframe= 2470 fps= 22 q=-0.0 size= 197376kB time=00:01:39.17 bitrate=16302.9kbitsframe= 2482 fps= 22 q=-0.0 size= 198144kB time=00:01:39.56 bitrate=16303.3kbitsframe= 2494 fps= 21 q=-0.0 size= 198912kB time=00:01:39.96 bitrate=16300.1kbitsframe= 2506 fps= 21 q=-0.0 size= 199936kB time=00:01:40.37 bitrate=16317.8kbitsframe= 2517 fps= 21 q=-0.0 size= 200448kB time=00:01:40.80 bitrate=16290.4kbitsframe= 2530 fps= 21 q=-0.0 size= 201472kB time=00:01:41.56 bitrate=16249.8kbitsframe= 2542 fps= 21 q=-0.0 size= 202240kB time=00:01:41.97 bitrate=16246.9kbitsframe= 2554 fps= 21 q=-0.0 size= 203008kB time=00:01:42.37 bitrate=16244.0kbitsframe= 2566 fps= 21 q=-0.0 size= 204032kB time=00:01:42.76 bitrate=16265.0kbitsframe= 2577 fps= 21 q=-0.0 size= 204544kB time=00:01:43.18 bitrate=16238.4kbitsframe= 2590 fps= 21 q=-0.0 size= 205568kB time=00:01:43.97 bitrate=16195.8kbitsframe= 2602 fps= 21 q=-0.0 size= 206336kB time=00:01:44.36 bitrate=16196.5kbitsframe= 2614 fps= 21 q=-0.0 size= 207104kB time=00:01:44.76 bitrate=16193.8kbitsframe= 2626 fps= 21 q=-0.0 size= 208128kB time=00:01:45.17 bitrate=16211.2kbitsframe= 2636 fps= 21 q=-0.0 size= 208640kB time=00:01:45.57 bitrate=16188.7kbitsframe= 2645 fps= 21 q=-0.0 size= 209408kB time=00:01:45.96 bitrate=16189.4kbitsframe= 2657 fps= 21 q=-0.0 size= 210176kB time=00:01:46.36 bitrate=16186.8kbitsframe= 2667 fps= 21 q=-0.0 size= 210688kB time=00:01:46.79 bitrate=16161.4kbitsframe= 2677 fps= 21 q=-0.0 size= 211456kB time=00:01:47.20 bitrate=16159.0kbitsframe= 2689 fps= 21 q=-0.0 size= 212224kB time=00:01:47.96 bitrate=16102.4kbitsframe= 2701 fps= 21 q=-0.0 size= 213248kB time=00:01:48.37 bitrate=16119.5kbitsframe= 2713 fps= 21 q=-0.0 size= 214016kB time=00:01:48.77 bitrate=16117.3kbitsframe= 2725 fps= 21 q=-0.0 size= 214784kB time=00:01:49.16 bitrate=16118.2kbitsframe= 2737 fps= 21 q=-0.0 size= 215552kB time=00:01:49.56 bitrate=16116.0kbitsframe= 2749 fps= 21 q=-0.0 size= 216320kB time=00:01:50.35 bitrate=16057.8kbitsframe= 2760 fps= 21 q=-0.0 size= 217088kB time=00:01:50.76 bitrate=16055.8kbitsframe= 2770 fps= 21 q=-0.0 size= 217856kB time=00:01:51.16 bitrate=16053.9kbitsframe= 2780 fps= 21 q=-0.0 size= 218624kB time=00:01:51.57 bitrate=16051.9kbitsframe= 2790 fps= 21 q=-0.0 size= 219136kB time=00:01:51.95 bitrate=16034.3kbitsframe= 2801 fps= 21 q=-0.0 size= 219904kB time=00:01:52.36 bitrate=16032.5kbitsframe= 2813 fps= 21 q=-0.0 size= 220672kB time=00:01:52.76 bitrate=16030.7kbitsframe= 2825 fps= 21 q=-0.0 size= 221696kB time=00:01:53.17 bitrate=16047.4kbitsframe= 2837 fps= 21 q=-0.0 size= 222464kB time=00:01:53.55 bitrate=16048.5kbitsframe= 2849 fps= 21 q=-0.0 size= 223232kB time=00:01:54.36 bitrate=15989.8kbitsframe= 2861 fps= 21 q=-0.0 size= 224000kB time=00:01:54.77 bitrate=15988.1kbitsframe= 2873 fps= 21 q=-0.0 size= 224768kB time=00:01:55.15 bitrate=15989.4kbitsframe= 2885 fps= 21 q=-0.0 size= 225792kB time=00:01:55.56 bitrate=16005.9kbitsframe= 2897 fps= 21 q=-0.0 size= 226560kB time=00:01:55.96 bitrate=16004.2kbitsframe= 2909 fps= 21 q=-0.0 size= 227328kB time=00:01:56.75 bitrate=15949.9kbitsframe= 2921 fps= 21 q=-0.0 size= 228096kB time=00:01:57.16 bitrate=15948.4kbitsframe= 2933 fps= 21 q=-0.0 size= 228864kB time=00:01:57.56 bitrate=15947.0kbitsframe= 2943 fps= 21 q=-0.0 size= 229632kB time=00:01:57.97 bitrate=15945.5kbitsframe= 2954 fps= 21 q=-0.0 size= 230400kB time=00:01:58.35 bitrate=15946.9kbitsframe= 2965 fps= 21 q=-0.0 size= 231168kB time=00:01:58.76 bitrate=15945.5kbitsframe= 2976 fps= 21 q=-0.0 size= 231936kB time=00:01:59.16 bitrate=15944.0kbitsframe= 2987 fps= 21 q=-0.0 size= 232704kB time=00:01:59.57 bitrate=15942.6kbitsframe= 2997 fps= 21 q=-0.0 size= 233216kB time=00:02:00.00 bitrate=15920.9kbitsframe= 3001 fps= 21 q=-0.0 Lsize= 234612kB time=00:02:00.04 bitrate=16010.5kbits/s speed=0.849x
video:234441kB audio:104kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.028714%
[aac @ 0x7fb1a4812a00] Qavg: 63503.863 -
How to get .mp4 videos from motion on a Raspberry Pi ?
3 novembre 2017, par MaartiI use motion on my laptop and it works perfectly in any format. But when I use it on my Raspberry Pi 3 (Raspbian Jessie) with the Raspberry Camera V2, the only formats that work are :
.avi
and.swf
.When I choose any other format, the output video is a "0 sec video" that is played and closed instantly.
I would like to have
.mp4
or.ogg
output so I can read it easily with HTML5.Here is the motion codec documentation.
Here is my config file :
############################################################
# Daemon
############################################################
# Start in daemon (background) mode and release terminal (default: off)
daemon on
# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid
############################################################
# Basic Setup Mode
############################################################
# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off
# Use a file to save logs messages, if not defined stderr and syslog is used. (default: not defined)
#logfile /mnt/camshare/Cam1/motion.log
logfile /tmp/motion.log
# Level of log messages [1..9] (EMR, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL). (default: 6 / NTC)
log_level 2
# Filter to log messages by type (COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)
log_type all
###########################################################
# Capture device options
############################################################
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
#videodevice /dev/video0
# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 17)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
# V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
# V4L2_PIX_FMT_SPCA561 : 3 'S561'
# V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
# V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
# V4L2_PIX_FMT_PAC207 : 6 'P207'
# V4L2_PIX_FMT_PJPG : 7 'PJPG'
# V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
# V4L2_PIX_FMT_JPEG : 9 'JPEG'
# V4L2_PIX_FMT_RGB24 : 10 'RGB3'
# V4L2_PIX_FMT_SPCA501 : 11 'S501'
# V4L2_PIX_FMT_SPCA505 : 12 'S505'
# V4L2_PIX_FMT_SPCA508 : 13 'S508'
# V4L2_PIX_FMT_UYVY : 14 'UYVY'
# V4L2_PIX_FMT_YUYV : 15 'YUYV'
# V4L2_PIX_FMT_YUV422P : 16 '422P'
# V4L2_PIX_FMT_YUV420 : 17 'YU12'
#
v4l2_palette 7
# Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
# This is ONLY used for FreeBSD. Leave it commented out for Linux
; tunerdevice /dev/tuner0
# The video input to be used (default: -1)
# Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
input -1
# The video norm to use (only for video capture and TV tuner cards)
# Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
norm 0
# The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
frequency 0
# Rotate image this number of degrees. The rotation affects all saved images as
# well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0
# Image width (pixels). Valid range: Camera dependent, default: 352
#width 1024
width 640
# Image height (pixels). Valid range: Camera dependent, default: 288
#height 576
height 480
# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 15
# Minimum time in seconds between capturing picture frames from the camera.
# Default: 0 = disabled - the capture rate is given by the camera framerate.
# This option is used when you want to capture images at a rate lower than 2 per second.
minimum_frame_time 0
# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// mjpg:// or file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
;netcam_url http://127.0.0.1/cgi-bin/raspicam.sh
# Username and password for network camera (only if required). Default: not defined
# Syntax is user:password
; netcam_userpass value
# The setting for keep-alive of network socket, should improve performance on compatible net cameras.
# off: The historical implementation using HTTP/1.0, closing the socket after each http request.
# force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
# on: Use HTTP/1.1 requests that support keep alive as default.
# Default: off
netcam_keepalive off
# URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
# If a port number other than 80 is needed, use "http://myproxy:1234".
# Default: not defined
; netcam_proxy value
# Set less strict jpeg checks for network cameras with a poor/buggy firmware.
# Default: off
netcam_tolerant_check off
# Let motion regulate the brightness of a video device (default: off).
# The auto_brightness feature uses the brightness option as its target value.
# If brightness is zero auto_brightness will adjust to average brightness value 128.
# Only recommended for cameras without auto brightness
auto_brightness off
# Set the initial brightness of a video device.
# If auto_brightness is enabled, this value defines the average brightness level
# which Motion will try and adjust to.
# Valid range 0-255, default 0 = disabled
brightness 0
# Set the contrast of a video device.
# Valid range 0-255, default 0 = disabled
contrast 0
# Set the saturation of a video device.
# Valid range 0-255, default 0 = disabled
saturation 0
# Set the hue of a video device (NTSC feature).
# Valid range 0-255, default 0 = disabled
hue 0
############################################################
# File "camera" support - read raw YUV data from a file
############################################################
#filecam_path /home/pi/test-cap/motion-mmal.capture
############################################################
# OpenMax/MMAL camera support for Raspberry Pi
############################################################
mmalcam_name vc.ril.camera
#mmalcam_control_params
#mmalcam_raw_capture_file /home/pi/motion-mmal.capture
# Switch this setting to "on" to use the still image mode of the Pi's camera
# instead of video. This gives a wider field of view, but requires
# a much slower frame-rate to achieve exposure stability
# (e.g. 0.25 fps or slower). You can use the minimum_frame_time
# parameter above to achieve this
mmalcam_use_still off
############################################################
# Round Robin (multiple inputs on same video device name)
############################################################
# Number of frames to capture in each roundrobin step (default: 1)
roundrobin_frames 1
# Number of frames to skip before each roundrobin step (default: 1)
roundrobin_skip 1
# Try to filter out noise generated by roundrobin (default: off)
switchfilter off
############################################################
# Motion Detection Settings:
############################################################
# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 1500
# Automatically tune the threshold down if possible (default: off)
threshold_tune off
# Noise threshold for the motion detection (default: 32)
noise_level 32
# Automatically tune the noise threshold (default: on)
noise_tune on
# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
despeckle_filter EedDl
# Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
# A script (on_area_detected) is started immediately when motion is 4 5 6
# detected in one of the given areas, but only once during an event. 7 8 9
# One or more areas can be specified with this option. Take care: This option
# does NOT restrict detection to these areas! (Default: not defined)
; area_detect value
# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
; mask_file value
# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 0
# Ignore sudden massive light intensity changes given as a percentage of the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 0
# Picture frames must contain motion at least the specified number of frames
# in a row before they are detected as true motion. At the default of 1, all
# motion is detected. Valid range: 1 to thousands, recommended 1-5
minimum_motion_frames 1
# Specifies the number of pre-captured (buffered) pictures from before motion
# was detected that will be output at motion detection.
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video frames and
# cause unsmooth movies. To smooth movies use larger values of post_capture instead.
pre_capture 2
# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 2
# Event Gap is the seconds of no motion detection that triggers the end of an event.
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value -1 is allowed and disables
# events causing all Motion to be written to one single movie file and no pre_capture.
# If set to 0, motion is running in gapless mode. Movies don't have gaps anymore. An
# event ends right after no more motion is detected and post_capture is over.
event_gap 60
# Maximum length in seconds of an mpeg movie
# When value is exceeded a new movie file is created. (Default: 0 = infinite)
# ATTENTION: when you're not using the motion build from the tutorial, it might fail with error 'Unknown config option "max_mpeg_time"'
# the use this line instead:
# max_movie_time 60
max_movie_time 60
# Always save images even if there was no motion (default: off)
emulate_motion off
############################################################
# Image File Output
############################################################
# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
# Can be used as preview shot for the corresponding movie.
output_pictures best
# Output pictures with only the pixels moving object (ghost images) (default: off)
output_debug_pictures off
# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 75
# Type of output images
# Valid values: jpeg, ppm (default: jpeg)
picture_type jpeg
############################################################
# FFMPEG related options
# Film (movies) file output, and deinterlacing of the video input
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
############################################################
# Use ffmpeg to encode movies in realtime (default: off)
ffmpeg_output_movies on
# Use ffmpeg to make movies with only the pixels moving
# object (ghost images) (default: off)
ffmpeg_output_debug_movies off
# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 0
# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
ffmpeg_timelapse_mode daily
# Bitrate to be used by the ffmpeg encoder (default: 400000)
# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
ffmpeg_bps 500000
# Enables and defines variable bitrate for the ffmpeg encoder.
# ffmpeg_bps is ignored if variable bitrate is enabled.
# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
# or the range 2 - 31 where 2 means best quality and 31 is worst.
ffmpeg_variable_bitrate 5
# Codec to used by ffmpeg for the video compression.
# Timelapse mpegs are always made in mpeg1 format independent from this option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
# ogg - Ogg/Theora ( testing )
#ffmpeg_video_codec msmpeg4
ffmpeg_video_codec mp4
# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
# (default: off)
ffmpeg_deinterlace off
############################################################
# SDL Window
############################################################
# Number of motion thread to show in SDL Window (default: 0 = disabled)
#sdl_threadnr 0
############################################################
# External pipe to video encoder
# Replacement for FFMPEG builtin encoder for ffmpeg_output_movies only.
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
#############################################################
# Bool to enable or disable extpipe (default: off)
use_extpipe off
# External program (full path and opts) to pipe raw video to
# Generally, use '-' for STDIN...
;extpipe mencoder -demuxer rawvideo -rawvideo w=320:h=240:i420 -ovc x264 -x264encopts bframes=4:frameref=1:subq=1:scenecut=-1:nob_adapt:threads=1:keyint=1000:8x8dct:vbv_bufsize=4000:crf=24:partitions=i8x8,i4x4:vbv_maxrate=800:no-chroma-me -vf denoise3d=16:12:48:4,pp=lb -of avi -o %f.avi - -fps %fps
############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################
# Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 0
############################################################
# Text Display
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level, \n = new line,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event - do not use with text_event!
# You can put quotation marks around the text to allow
# leading spaces
############################################################
# Locate and draw a box around the moving object.
# Valid values: on, off, preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate_motion_mode off
# Set the look and style of the locate box if enabled.
# Valid values: box, redbox, cross, redcross (default: box)
# Set to 'box' will draw the traditional box.
# Set to 'redbox' will draw a red box.
# Set to 'cross' will draw a little cross to mark center.
# Set to 'redcross' will draw a little red cross to mark center.
locate_motion_style box
# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
# Text is placed in lower right corner
text_right %d.%m.%Y\n%T
# Draw a user defined text on the images using same options as C function strftime(3)
# Default: Not defined = no text
# Text is placed in lower left corner
; text_left CAMERA %t
text_left HofCam
# Draw the number of changed pixed on the images (default: off)
# Will normally be set to off except when you setup and adjust the motion settings
# Text is placed in upper right corner
text_changes off
# This option defines the value of the special event conversion specifier %C
# You can use any conversion specifier in this option except %C. Date and time
# values are from the timestamp of the first image in the current event.
# Default: %Y%m%d%H%M%S
# The idea is that %C can be used filenames and text_left/right for creating
# a unique identifier for each event.
text_event %Y%m%d%H%M%S
# Draw characters at twice normal size on images. (default: off)
text_double on
# Text to include in a JPEG EXIF comment
# May be any text, including conversion specifiers.
# The EXIF timestamp is included independent of this text.
;exif_text %i%J/%K%L
############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, movie_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################
# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
target_dir /home/pi
# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
# File extension .jpg or .ppm is automatically added so do not include this.
# Note: A symbolic link called lastsnap.jpg created in the target_dir will always
# point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
snapshot_filename %v-%Y%m%d%H%M%S-snapshot
# File path for motion triggered images (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg or .ppm is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename %v-%Y%m%d%H%M%S-%q
# File path for motion triggered ffmpeg films (movies) relative to target_dir
# Default: %v-%Y%m%d%H%M%S
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
# File extension .mpg or .avi is automatically added so do not include this
# This option was previously called ffmpeg_filename
movie_filename %v-%Y%m%d%H%M%S
# File path for timelapse movies relative to target_dir
# Default: %Y%m%d-timelapse
# Default value is near equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
# File extension .mpg is automatically added so do not include this
timelapse_filename %Y%m%d-timelapse
############################################################
# Global Network Options
############################################################
# Enable or disable IPV6 for http control and stream (default: off )
ipv6_enabled off
############################################################
# Live Stream Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8080
# Quality of the jpeg (in percent) images produced (default: 50)
stream_quality 50
# Output frames at 1 fps when no motion is detected and increase to the
# rate given by stream_maxrate when motion is detected (default: off)
stream_motion on
# Maximum framerate for stream streams (default: 1)
stream_maxrate 4
# Restrict stream connections to localhost only (default: on)
stream_localhost off
# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual stream rate by desired number of seconds
# Actual stream rate is the smallest of the numbers framerate and stream_maxrate
stream_limit 0
# Set the authentication method (default: 0)
# 0 = disabled
# 1 = Basic authentication
# 2 = MD5 digest (the safer authentication)
stream_auth_method 0
# Authentication for the stream. Syntax username:password
# Default: not defined (Disabled)
; stream_authentication username:password
############################################################
# HTTP Based Control
############################################################
# TCP/IP port for the http server to listen on (default: 0 = disabled)
webcontrol_port 8081
# Restrict control connections to localhost only (default: on)
webcontrol_localhost off
# Output for http server, select off to choose raw text plain (default: on)
webcontrol_html_output on
# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; webcontrol_authentication username:password
############################################################
# Tracking (Pan/Tilt)
#############################################################
# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo, 6=servo)
# The generic type enables the definition of motion center and motion size to
# be used with the conversion specifiers for options like on_motion_detected
track_type 0
# Enable auto tracking (default: off)
track_auto off
# Serial port of motor (default: none)
;track_port /dev/ttyS0
# Motor number for x-axis (default: 0)
;track_motorx 0
# Set motorx reverse (default: 0)
;track_motorx_reverse 0
# Motor number for y-axis (default: 0)
;track_motory 1
# Set motory reverse (default: 0)
;track_motory_reverse 0
# Maximum value on x-axis (default: 0)
;track_maxx 200
# Minimum value on x-axis (default: 0)
;track_minx 50
# Maximum value on y-axis (default: 0)
;track_maxy 200
# Minimum value on y-axis (default: 0)
;track_miny 50
# Center value on x-axis (default: 0)
;track_homex 128
# Center value on y-axis (default: 0)
;track_homey 128
# ID of an iomojo camera if used (default: 0)
track_iomojo_id 0
# Angle in degrees the camera moves per step on the X-axis
# with auto-track (default: 10)
# Currently only used with pwc type cameras
track_step_angle_x 10
[...] -
How to get .mp4 videos from motion on a Raspberry Pi ?
9 octobre 2016, par MaartiI use motion on my laptop and it works perfectly in any format. But when I use it on my Raspberry Pi 3 (Raspbian Jessie) with the Raspberry Camera V2, the only formats that work are :
.avi
and.swf
.When I choose any other format, the output video is a "0 sec video" that is played and closed instantly.
I would like to have
.mp4
or.ogg
output so I can read it easily with HTML5.Here is the motion codec documentation.
Here is my config file :
############################################################
# Daemon
############################################################
# Start in daemon (background) mode and release terminal (default: off)
daemon on
# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid
############################################################
# Basic Setup Mode
############################################################
# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off
# Use a file to save logs messages, if not defined stderr and syslog is used. (default: not defined)
#logfile /mnt/camshare/Cam1/motion.log
logfile /tmp/motion.log
# Level of log messages [1..9] (EMR, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL). (default: 6 / NTC)
log_level 2
# Filter to log messages by type (COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)
log_type all
###########################################################
# Capture device options
############################################################
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
#videodevice /dev/video0
# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 17)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
# V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
# V4L2_PIX_FMT_SPCA561 : 3 'S561'
# V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
# V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
# V4L2_PIX_FMT_PAC207 : 6 'P207'
# V4L2_PIX_FMT_PJPG : 7 'PJPG'
# V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
# V4L2_PIX_FMT_JPEG : 9 'JPEG'
# V4L2_PIX_FMT_RGB24 : 10 'RGB3'
# V4L2_PIX_FMT_SPCA501 : 11 'S501'
# V4L2_PIX_FMT_SPCA505 : 12 'S505'
# V4L2_PIX_FMT_SPCA508 : 13 'S508'
# V4L2_PIX_FMT_UYVY : 14 'UYVY'
# V4L2_PIX_FMT_YUYV : 15 'YUYV'
# V4L2_PIX_FMT_YUV422P : 16 '422P'
# V4L2_PIX_FMT_YUV420 : 17 'YU12'
#
v4l2_palette 7
# Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
# This is ONLY used for FreeBSD. Leave it commented out for Linux
; tunerdevice /dev/tuner0
# The video input to be used (default: -1)
# Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
input -1
# The video norm to use (only for video capture and TV tuner cards)
# Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
norm 0
# The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
frequency 0
# Rotate image this number of degrees. The rotation affects all saved images as
# well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0
# Image width (pixels). Valid range: Camera dependent, default: 352
#width 1024
width 640
# Image height (pixels). Valid range: Camera dependent, default: 288
#height 576
height 480
# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 15
# Minimum time in seconds between capturing picture frames from the camera.
# Default: 0 = disabled - the capture rate is given by the camera framerate.
# This option is used when you want to capture images at a rate lower than 2 per second.
minimum_frame_time 0
# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// mjpg:// or file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
;netcam_url http://127.0.0.1/cgi-bin/raspicam.sh
# Username and password for network camera (only if required). Default: not defined
# Syntax is user:password
; netcam_userpass value
# The setting for keep-alive of network socket, should improve performance on compatible net cameras.
# off: The historical implementation using HTTP/1.0, closing the socket after each http request.
# force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
# on: Use HTTP/1.1 requests that support keep alive as default.
# Default: off
netcam_keepalive off
# URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
# If a port number other than 80 is needed, use "http://myproxy:1234".
# Default: not defined
; netcam_proxy value
# Set less strict jpeg checks for network cameras with a poor/buggy firmware.
# Default: off
netcam_tolerant_check off
# Let motion regulate the brightness of a video device (default: off).
# The auto_brightness feature uses the brightness option as its target value.
# If brightness is zero auto_brightness will adjust to average brightness value 128.
# Only recommended for cameras without auto brightness
auto_brightness off
# Set the initial brightness of a video device.
# If auto_brightness is enabled, this value defines the average brightness level
# which Motion will try and adjust to.
# Valid range 0-255, default 0 = disabled
brightness 0
# Set the contrast of a video device.
# Valid range 0-255, default 0 = disabled
contrast 0
# Set the saturation of a video device.
# Valid range 0-255, default 0 = disabled
saturation 0
# Set the hue of a video device (NTSC feature).
# Valid range 0-255, default 0 = disabled
hue 0
############################################################
# File "camera" support - read raw YUV data from a file
############################################################
#filecam_path /home/pi/test-cap/motion-mmal.capture
############################################################
# OpenMax/MMAL camera support for Raspberry Pi
############################################################
mmalcam_name vc.ril.camera
#mmalcam_control_params
#mmalcam_raw_capture_file /home/pi/motion-mmal.capture
# Switch this setting to "on" to use the still image mode of the Pi's camera
# instead of video. This gives a wider field of view, but requires
# a much slower frame-rate to achieve exposure stability
# (e.g. 0.25 fps or slower). You can use the minimum_frame_time
# parameter above to achieve this
mmalcam_use_still off
############################################################
# Round Robin (multiple inputs on same video device name)
############################################################
# Number of frames to capture in each roundrobin step (default: 1)
roundrobin_frames 1
# Number of frames to skip before each roundrobin step (default: 1)
roundrobin_skip 1
# Try to filter out noise generated by roundrobin (default: off)
switchfilter off
############################################################
# Motion Detection Settings:
############################################################
# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 1500
# Automatically tune the threshold down if possible (default: off)
threshold_tune off
# Noise threshold for the motion detection (default: 32)
noise_level 32
# Automatically tune the noise threshold (default: on)
noise_tune on
# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
despeckle_filter EedDl
# Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
# A script (on_area_detected) is started immediately when motion is 4 5 6
# detected in one of the given areas, but only once during an event. 7 8 9
# One or more areas can be specified with this option. Take care: This option
# does NOT restrict detection to these areas! (Default: not defined)
; area_detect value
# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
; mask_file value
# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 0
# Ignore sudden massive light intensity changes given as a percentage of the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 0
# Picture frames must contain motion at least the specified number of frames
# in a row before they are detected as true motion. At the default of 1, all
# motion is detected. Valid range: 1 to thousands, recommended 1-5
minimum_motion_frames 1
# Specifies the number of pre-captured (buffered) pictures from before motion
# was detected that will be output at motion detection.
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video frames and
# cause unsmooth movies. To smooth movies use larger values of post_capture instead.
pre_capture 2
# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 2
# Event Gap is the seconds of no motion detection that triggers the end of an event.
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value -1 is allowed and disables
# events causing all Motion to be written to one single movie file and no pre_capture.
# If set to 0, motion is running in gapless mode. Movies don't have gaps anymore. An
# event ends right after no more motion is detected and post_capture is over.
event_gap 60
# Maximum length in seconds of an mpeg movie
# When value is exceeded a new movie file is created. (Default: 0 = infinite)
# ATTENTION: when you're not using the motion build from the tutorial, it might fail with error 'Unknown config option "max_mpeg_time"'
# the use this line instead:
# max_movie_time 60
max_movie_time 60
# Always save images even if there was no motion (default: off)
emulate_motion off
############################################################
# Image File Output
############################################################
# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
# Can be used as preview shot for the corresponding movie.
output_pictures best
# Output pictures with only the pixels moving object (ghost images) (default: off)
output_debug_pictures off
# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 75
# Type of output images
# Valid values: jpeg, ppm (default: jpeg)
picture_type jpeg
############################################################
# FFMPEG related options
# Film (movies) file output, and deinterlacing of the video input
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
############################################################
# Use ffmpeg to encode movies in realtime (default: off)
ffmpeg_output_movies on
# Use ffmpeg to make movies with only the pixels moving
# object (ghost images) (default: off)
ffmpeg_output_debug_movies off
# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 0
# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
ffmpeg_timelapse_mode daily
# Bitrate to be used by the ffmpeg encoder (default: 400000)
# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
ffmpeg_bps 500000
# Enables and defines variable bitrate for the ffmpeg encoder.
# ffmpeg_bps is ignored if variable bitrate is enabled.
# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
# or the range 2 - 31 where 2 means best quality and 31 is worst.
ffmpeg_variable_bitrate 5
# Codec to used by ffmpeg for the video compression.
# Timelapse mpegs are always made in mpeg1 format independent from this option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
# ogg - Ogg/Theora ( testing )
#ffmpeg_video_codec msmpeg4
ffmpeg_video_codec mp4
# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
# (default: off)
ffmpeg_deinterlace off
############################################################
# SDL Window
############################################################
# Number of motion thread to show in SDL Window (default: 0 = disabled)
#sdl_threadnr 0
############################################################
# External pipe to video encoder
# Replacement for FFMPEG builtin encoder for ffmpeg_output_movies only.
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
#############################################################
# Bool to enable or disable extpipe (default: off)
use_extpipe off
# External program (full path and opts) to pipe raw video to
# Generally, use '-' for STDIN...
;extpipe mencoder -demuxer rawvideo -rawvideo w=320:h=240:i420 -ovc x264 -x264encopts bframes=4:frameref=1:subq=1:scenecut=-1:nob_adapt:threads=1:keyint=1000:8x8dct:vbv_bufsize=4000:crf=24:partitions=i8x8,i4x4:vbv_maxrate=800:no-chroma-me -vf denoise3d=16:12:48:4,pp=lb -of avi -o %f.avi - -fps %fps
############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################
# Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 0
############################################################
# Text Display
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level, \n = new line,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event - do not use with text_event!
# You can put quotation marks around the text to allow
# leading spaces
############################################################
# Locate and draw a box around the moving object.
# Valid values: on, off, preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate_motion_mode off
# Set the look and style of the locate box if enabled.
# Valid values: box, redbox, cross, redcross (default: box)
# Set to 'box' will draw the traditional box.
# Set to 'redbox' will draw a red box.
# Set to 'cross' will draw a little cross to mark center.
# Set to 'redcross' will draw a little red cross to mark center.
locate_motion_style box
# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
# Text is placed in lower right corner
text_right %d.%m.%Y\n%T
# Draw a user defined text on the images using same options as C function strftime(3)
# Default: Not defined = no text
# Text is placed in lower left corner
; text_left CAMERA %t
text_left HofCam
# Draw the number of changed pixed on the images (default: off)
# Will normally be set to off except when you setup and adjust the motion settings
# Text is placed in upper right corner
text_changes off
# This option defines the value of the special event conversion specifier %C
# You can use any conversion specifier in this option except %C. Date and time
# values are from the timestamp of the first image in the current event.
# Default: %Y%m%d%H%M%S
# The idea is that %C can be used filenames and text_left/right for creating
# a unique identifier for each event.
text_event %Y%m%d%H%M%S
# Draw characters at twice normal size on images. (default: off)
text_double on
# Text to include in a JPEG EXIF comment
# May be any text, including conversion specifiers.
# The EXIF timestamp is included independent of this text.
;exif_text %i%J/%K%L
############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, movie_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################
# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
target_dir /home/pi
# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
# File extension .jpg or .ppm is automatically added so do not include this.
# Note: A symbolic link called lastsnap.jpg created in the target_dir will always
# point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
snapshot_filename %v-%Y%m%d%H%M%S-snapshot
# File path for motion triggered images (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg or .ppm is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename %v-%Y%m%d%H%M%S-%q
# File path for motion triggered ffmpeg films (movies) relative to target_dir
# Default: %v-%Y%m%d%H%M%S
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
# File extension .mpg or .avi is automatically added so do not include this
# This option was previously called ffmpeg_filename
movie_filename %v-%Y%m%d%H%M%S
# File path for timelapse movies relative to target_dir
# Default: %Y%m%d-timelapse
# Default value is near equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
# File extension .mpg is automatically added so do not include this
timelapse_filename %Y%m%d-timelapse
############################################################
# Global Network Options
############################################################
# Enable or disable IPV6 for http control and stream (default: off )
ipv6_enabled off
############################################################
# Live Stream Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8080
# Quality of the jpeg (in percent) images produced (default: 50)
stream_quality 50
# Output frames at 1 fps when no motion is detected and increase to the
# rate given by stream_maxrate when motion is detected (default: off)
stream_motion on
# Maximum framerate for stream streams (default: 1)
stream_maxrate 4
# Restrict stream connections to localhost only (default: on)
stream_localhost off
# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual stream rate by desired number of seconds
# Actual stream rate is the smallest of the numbers framerate and stream_maxrate
stream_limit 0
# Set the authentication method (default: 0)
# 0 = disabled
# 1 = Basic authentication
# 2 = MD5 digest (the safer authentication)
stream_auth_method 0
# Authentication for the stream. Syntax username:password
# Default: not defined (Disabled)
; stream_authentication username:password
############################################################
# HTTP Based Control
############################################################
# TCP/IP port for the http server to listen on (default: 0 = disabled)
webcontrol_port 8081
# Restrict control connections to localhost only (default: on)
webcontrol_localhost off
# Output for http server, select off to choose raw text plain (default: on)
webcontrol_html_output on
# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; webcontrol_authentication username:password
############################################################
# Tracking (Pan/Tilt)
#############################################################
# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo, 6=servo)
# The generic type enables the definition of motion center and motion size to
# be used with the conversion specifiers for options like on_motion_detected
track_type 0
# Enable auto tracking (default: off)
track_auto off
# Serial port of motor (default: none)
;track_port /dev/ttyS0
# Motor number for x-axis (default: 0)
;track_motorx 0
# Set motorx reverse (default: 0)
;track_motorx_reverse 0
# Motor number for y-axis (default: 0)
;track_motory 1
# Set motory reverse (default: 0)
;track_motory_reverse 0
# Maximum value on x-axis (default: 0)
;track_maxx 200
# Minimum value on x-axis (default: 0)
;track_minx 50
# Maximum value on y-axis (default: 0)
;track_maxy 200
# Minimum value on y-axis (default: 0)
;track_miny 50
# Center value on x-axis (default: 0)
;track_homex 128
# Center value on y-axis (default: 0)
;track_homey 128
# ID of an iomojo camera if used (default: 0)
track_iomojo_id 0
# Angle in degrees the camera moves per step on the X-axis
# with auto-track (default: 10)
# Currently only used with pwc type cameras
track_step_angle_x 10
[...]