ffmpeg_set_codec: Could not open codec Invalid argument >> not recording video stream #2074

Closed
opened 2026-02-28 01:02:51 -05:00 by deekerman · 3 comments
Owner

Originally created by @githubsharezone on GitHub (Nov 17, 2021).

i install the software on debian 10 but whne the system trigger event not recording on folder.

motionEye Version | 0.42.1
Motion Version | 4.1.1
OS Version | Debian 10

i see log and show

-110135408:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motioneye/motion.conf
[-110135408:motion] [NTC] [ALL] config_camera: Processing camera config file camera-1.conf
[-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "threshold_maximum"
[-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "movie_passthrough"
[-110135408:motion] [NTC] [ALL] config_camera: Processing camera config file camera-2.conf
[-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "threshold_maximum"
[-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "movie_passthrough"
[-110135408:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started
[-110135408:motion] [NTC] [ALL] motion_startup: Logging to syslog
[-110135408:motion] [NTC] [ALL] motion_startup: Using default log type (ALL)
[-110135408:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN)
[2:ml2:Sala] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Invalid argument
[2:ml2:Sala] [ERR] [NET] ffmpeg_open: Failed to allocate codec!
[2:ml2:Sala] [ERR] [EVT] event_ffmpeg_newfile: ffopen_open error creating (new) file [/etc/motioneye/dvr/sala/2021-11-17/12-23-36.mp4]
[1:ml1:Stanzetta] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Invalid argument
[1:ml1:Stanzetta] [ERR] [NET] ffmpeg_open: Failed to allocate codec!
[1:ml1:Stanzetta] [ERR] [EVT] event_ffmpeg_newfile: ffopen_open error creating (new) file [/etc/motioneye/dvr/stanzetta/2021-11-17/12-23-36.mp4]

root@armhdvr:~# uname -a
Linux armhdvr 4.19.0-18-arm64 #1 SMP Debian 4.19.208-1 (2021-09-29) aarch64 GNU/Linux

root@armhdvr:# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@armhdvr:
#

on log debug mode i see

4:nc4:Stanzetta] [NTC] [NET] netcam_rtsp_connect: Normal resolution: Camera (Stanzetta) connected
[1:ml1:Stanzetta] [DBG] [EVT] exec_command: Executing external command '/usr/local/lib/python2.7/dist-packages/motioneye/scripts/relayevent.sh "/etc/motioneye/motioneye.conf" start 1'
[1:ml1:Stanzetta] [INF] [EVT] event_new_video: Source FPS 5
[1:ml1:Stanzetta] [NTC] [ENC] ffmpeg_set_codec: Using codec h264_v4l2m2m
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_set_quality: h264_v4l2m2m codec vbr/crf/bit_rate: 0
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device
[1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder

Originally created by @githubsharezone on GitHub (Nov 17, 2021). i install the software on debian 10 but whne the system trigger event not recording on folder. motionEye Version | 0.42.1 Motion Version | 4.1.1 OS Version | Debian 10 i see log and show -110135408:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motioneye/motion.conf [-110135408:motion] [NTC] [ALL] config_camera: Processing camera config file camera-1.conf [-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "threshold_maximum" [-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "movie_passthrough" [-110135408:motion] [NTC] [ALL] config_camera: Processing camera config file camera-2.conf [-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "threshold_maximum" [-110135408:motion] [ALR] [ALL] conf_cmdparse: Unknown config option "movie_passthrough" [-110135408:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started [-110135408:motion] [NTC] [ALL] motion_startup: Logging to syslog [-110135408:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) [-110135408:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (WRN) [2:ml2:Sala] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Invalid argument [2:ml2:Sala] [ERR] [NET] ffmpeg_open: Failed to allocate codec! [2:ml2:Sala] [ERR] [EVT] event_ffmpeg_newfile: ffopen_open error creating (new) file [/etc/motioneye/dvr/sala/2021-11-17/12-23-36.mp4] [1:ml1:Stanzetta] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Invalid argument [1:ml1:Stanzetta] [ERR] [NET] ffmpeg_open: Failed to allocate codec! [1:ml1:Stanzetta] [ERR] [EVT] event_ffmpeg_newfile: ffopen_open error creating (new) file [/etc/motioneye/dvr/stanzetta/2021-11-17/12-23-36.mp4] root@armhdvr:~# uname -a Linux armhdvr 4.19.0-18-arm64 #1 SMP Debian 4.19.208-1 (2021-09-29) aarch64 GNU/Linux root@armhdvr:~# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" root@armhdvr:~# on log debug mode i see 4:nc4:Stanzetta] [NTC] [NET] netcam_rtsp_connect: Normal resolution: Camera (Stanzetta) connected [1:ml1:Stanzetta] [DBG] [EVT] exec_command: Executing external command '/usr/local/lib/python2.7/dist-packages/motioneye/scripts/relayevent.sh "/etc/motioneye/motioneye.conf" start 1' [1:ml1:Stanzetta] [INF] [EVT] event_new_video: Source FPS 5 [1:ml1:Stanzetta] [NTC] [ENC] ffmpeg_set_codec: Using codec h264_v4l2m2m [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_set_quality: h264_v4l2m2m codec vbr/crf/bit_rate: 0 [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: Could not find a valid device [1:ml1:Stanzetta] [INF] [ENC] ffmpeg_avcodec_log: can't configure encoder
deekerman 2026-02-28 01:02:51 -05:00
Author
Owner

@githubsharezone commented on GitHub (Nov 19, 2021):

i resolved change the type codec from gui

@githubsharezone commented on GitHub (Nov 19, 2021): i resolved change the type codec from gui
Author
Owner

@common-guid commented on GitHub (Mar 6, 2022):

@githubsharezone - can you explain how you were able to change the codec from the gui? I am having the same issue, but do not see a codec option.

@common-guid commented on GitHub (Mar 6, 2022): @githubsharezone - can you explain how you were able to change the codec from the gui? I am having the same issue, but do not see a codec option.
Author
Owner

@starbasessd commented on GitHub (Mar 6, 2022):

Settings, select correct camera, Movies, Movie Pasthrough = OFF, Movie Format (Select)
I do not use any OMX formats on non-Pi hardware.

@starbasessd commented on GitHub (Mar 6, 2022): Settings, select correct camera, Movies, Movie Pasthrough = OFF, Movie Format (Select) I do not use any OMX formats on non-Pi hardware.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/motioneye#2074
No description provided.