[Solved] motion application terminates and does not capture

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[Solved] motion application terminates and does not capture

Postby JJF » Mar 24th, '20, 15:56

I am trying to get motion to run (as before I freshly installed Mageia 7 on ssd)
I am running Mageia 7 Dual screen
Hardware reports USB camera:
Identification
Vendor: ‎OmniVision Technologies, Inc.
Description: ‎USB Camera
Media class: ‎
Connection
Bus: ‎USB
Bus PCI #: ‎3
PCI device #: ‎4
Vendor ID: ‎0x05a9
Device ID: ‎0x8519
Misc
Module: ‎ov519


Running XawTV Identyfies and display objects captured by the ov519 camera

Code: Select all
cat /etc/motion/motion.conf
 Rename this distribution example file to motion.conf
#
# This config file was generated by motion 4.2.2
# Documentation:  /usr/share/doc/motion/motion_guide.html
#
# This file contains only the basic configuration options to get a
# system working.  There are many more options available.  Please
# consult the documentation for the complete list of all options.
#

############################################################
# System control configuration parameters
############################################################

# Start in daemon (background) mode and release terminal.
daemon off

# Start in Setup-Mode, daemon disabled.
setup_mode off

# File to store the process ID.
; pid_file value

# File to write logs messages into.  If not defined stderr and syslog is used.
/home/jacob/motion/motion.log

# Level of log messages [1..9] (EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL).
log_level 6

# Target directory for pictures, snapshots and movies
/home/jacob/motion/out

# Video device (e.g. /dev/video0) to be used for capturing.
videodevice /dev/video0

# Parameters to control video device.  See motion_guide.html
; vid_control_params value

# The full URL of the network camera stream.
; netcam_url value

# Name of mmal camera (e.g. vc.ril.camera for pi camera).
; mmalcam_name value

# Camera control parameters (see raspivid/raspistill tool documentation)
; mmalcam_control_params value

############################################################
# Image Processing configuration parameters
############################################################

# Image width in pixels.
width 640

# Image height in pixels.
height 480

# Maximum number of frames to be captured per second.
framerate 15

# Text to be overlayed in the lower left corner of images
;  text_left CAMERA1

# Text to be overlayed in the lower right corner of images.
;  text_right %Y-%m-%d\n%T-%q


Code: Select all
motion
[0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
[0:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "/home/jacob/motion/motion.log"
[0:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "/home/jacob/motion/out"
[0:motion] [NTC] [ALL] motion_startup: Logging to syslog
[0:motion] [NTC] [ALL] motion_startup: Motion 4.2.2 Started
[0:motion] [NTC] [ALL] motion_startup: Using default log type (ALL)
[0:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
[0:motion] [NTC] [STR] webu_start_strm: Starting all camera streams on port 8081
[0:motion] [NTC] [STR] webu_strm_ntc: Started camera 0 stream on port 8081
[0:motion] [NTC] [STR] webu_start_ctrl: Starting webcontrol on port 8080
[0:motion] [NTC] [STR] webu_start_ctrl: Started webcontrol on port 8080
[0:motion] [NTC] [ENC] ffmpeg_global_init: ffmpeg libavcodec version 58.35.100 libavformat version 58.20.100
[0:motion] [NTC] [ALL] translate_init: Language: English
[0:motion] [NTC] [ALL] motion_start_thread: Camera ID: 0 is from /etc/motion/motion.conf
[0:motion] [NTC] [ALL] motion_start_thread: Camera ID: 0 Camera Name: (null) Device: /dev/video0
[0:motion] [NTC] [ALL] main: Waiting for threads to finish, pid: 4363
[1:ml1] [NTC] [ALL] motion_init: Camera 0 started: motion detection Enabled
[1:ml1] [NTC] [VID] vid_start: Opening V4L2 device
[1:ml1] [NTC] [VID] v4l2_device_open: Using videodevice /dev/video0 and input -1
[1:ml1] [NTC] [VID] v4l2_device_capability: - VIDEO_CAPTURE
[1:ml1] [NTC] [VID] v4l2_device_capability: - READWRITE
[1:ml1] [NTC] [VID] v4l2_device_capability: - STREAMING
[1:ml1] [NTC] [VID] v4l2_input_select: Name = "ov519"- CAMERA
[1:ml1] [NTC] [VID] v4l2_norm_select: Device does not support specifying PAL/NTSC norm
[1:ml1] [NTC] [VID] v4l2_pixfmt_select: Configuration palette index 17 (YU12) for 640x480 doesn't work.
[1:ml1] [NTC] [VID] v4l2_pixfmt_select: Supported palettes:
[1:ml1] [NTC] [VID] v4l2_pixfmt_select: (0) JPEG (JFIF JPEG)
[1:ml1] [NTC] [VID] v4l2_pixfmt_set: Testing palette JPEG (640x480)
[1:ml1] [NTC] [VID] v4l2_pixfmt_set: Using palette JPEG (640x480)
[1:ml1] [NTC] [VID] v4l2_pixfmt_select: Selected palette JPEG
[1:ml1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
[1:ml1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 4 items
[1:ml1] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Invalid argument
[1:ml1] [ERR] [ENC] ffmpeg_open: Failed to allocate codec!
[1:ml1] [ERR] [EVT] event_ffmpeg_newfile: Error opening context for movie output.
[1:ml1] [NTC] [ALL] motion_detected: Motion detected - starting event 1
^C[1:ml1] [NTC] [ALL] mlp_actions: End of event 1
[1:ml1] [NTC] [ALL] motion_loop: Thread exiting
[1:ml1] [NTC] [VID] vid_close: Cleaning up V4L2 device
[1:ml1] [NTC] [VID] v4l2_cleanup: Closing video device /dev/video0
[0:motion] [NTC] [ALL] main: Threads finished
[0:motion] [NTC] [ALL] main: Motion terminating


Terminate without capturing

Please advice
JJF
Last edited by doktor5000 on Mar 26th, '20, 00:49, edited 2 times in total.
Reason: adjusted subject
JJF
 
Posts: 201
Joined: Feb 13th, '14, 11:42

Re: motiom application terminates and does not capture

Postby doktor5000 » Mar 24th, '20, 19:50

Code: Select all
[1:ml1] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Invalid argument
[1:ml1] [ERR] [ENC] ffmpeg_open: Failed to allocate codec!
[1:ml1] [ERR] [EVT] event_ffmpeg_newfile: Error opening context for movie output.


I'd say try a different codec. What ffmpeg packages do you currently installed, the regular ones or those from tainted repositories?
Please post the output from
Code: Select all
rpm -qa | grep -iE "ffmpeg|avcodec|avformat"|sort

Also check https://motion-project.github.io/motion ... ovie_codec
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 15474
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: motiom application terminates and does not capture

Postby JJF » Mar 25th, '20, 03:49

I changed output from mkv to mpeg4
It is now OK
Tks
JJF
JJF
 
Posts: 201
Joined: Feb 13th, '14, 11:42


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron