[SOLVED] zoneminder "video generation failed" due to strange sh error

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
thoraxe
Posts: 14
Joined: Sun Jun 17, 2018 2:25 pm

[SOLVED] zoneminder "video generation failed" due to strange sh error

Post by thoraxe » Mon Jul 16, 2018 5:13 pm

Dug around in the logs and found the following in the apache and video logs when trying to generate the video:

Code: Select all

==> zoneminder/zmvideo.log <==
07/16/18 13:10:14.787423 zmvideo[1182].INF [Creating video file Event-3937-r1-s1.avi for event 3937]

==> httpd/error_log <==
sh: -y: invalid option
Usage:  sh [GNU long option] [option] ...
        sh [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --protected
        --rcfile
        --rpm-requires
        --restricted
        --verbose
        --version
Shell options:
        -irsD or -c command or -O shopt_option          (invocation only)
        -abefhkmnptuvxBCHP or -o option
        
....

07/16/18 13:18:36.410832 zmvideo[588].INF [Creating video file Event-3937-r1-s1.avi for event 3937]
07/16/18 13:18:36.558057 zmvideo[588].ERR [Unable to generate video, check /usr/share/zoneminder/www/events/1/18/07/15/02/50/00/ffmpeg.log for details]

So, whatever is trying to launch sh appears to have a bad option, or zmvideo is sending something bad, or I have a bad config option. That ffmpeg.log file does not exist.

Any thoughts?
Last edited by thoraxe on Tue Jul 17, 2018 1:24 am, edited 1 time in total.

thoraxe
Posts: 14
Joined: Sun Jun 17, 2018 2:25 pm

Re: zoneminder "video generation failed" due to strange sh error

Post by thoraxe » Tue Jul 17, 2018 12:48 am

It appears to be an error in zmvideo.pl itself:

Code: Select all

[root@416b25c0d2d4 /]# /usr/bin/zmvideo.pl -e 3937
sh: -y: invalid option
Usage:  sh [GNU long option] [option] ...
        sh [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --protected
        --rcfile
        --rpm-requires
        --restricted
        --verbose
        --version
Shell options:
        -irsD or -c command or -O shopt_option          (invocation only)
        -abefhkmnptuvxBCHP or -o option
Will investigate.

thoraxe
Posts: 14
Joined: Sun Jun 17, 2018 2:25 pm

Re: zoneminder "video generation failed" due to strange sh error

Post by thoraxe » Tue Jul 17, 2018 12:56 am

OK, ran perl with the debugger and here's where the error is:

Code: Select all

main::(/usr/bin/zmvideo.pl:222):                my $video_file = $Event->GenerateVideo( $rate, $fps, $scale,  $size, $overwrite, $format );
Here's the line in GH:
https://github.com/ZoneMinder/zoneminde ... pl.in#L222

So it has to do with whatever GenerateVideo is doing.


thoraxe
Posts: 14
Joined: Sun Jun 17, 2018 2:25 pm

Re: zoneminder "video generation failed" due to strange sh error

Post by thoraxe » Tue Jul 17, 2018 1:24 am

Needed ffmpeg path defined in config -- thanks to 'asker' on IRC:
https://github.com/ZoneMinder/zoneminde ... -405429365

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests