I've stumbled across the "Create Video" function in ZM 1.18.1. However, it doesn't appear to be working - and I can't quite figure out why... I click "Video" from a recorded event, then keep the defaults of "Real" frame rate and "Actual" video size, check the "Overwrite Existing" box - and get "Video Generation Failed"
In the /tmp/zmvideo.log file I get this:
Creating video file New_Event.mpg for event 1076
Use of uninitialized value in division (/) at /usr/local/bin/zmvideo.pl line 234.
/usr/bin/ffmpeg -y -hq -intra -r 0 -s 320x240 -i %03d-capture.jpg New_Event.mpg > mpeg.log
Incorrect frame rate
Error: 1 at /usr/local/bin/zmvideo.pl line 263.
As near as I can tell - "-r 0" it trying to set the frame rate to 0 FPS - however, I have no idea where the 0 is coming from. Obviously ZM is sending it - however I don't know where to set that option - or how the FPS is calculated on the fly so I don't know what to set...
Any ideas?
Video Creation Issue
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Video Creation Issue
Hi Benjamin,
This is a little odd. The rate comes originally from the value passed in via the Rate selector in the popup. It has a base of 100, so real-time is 100. This is passed into the zmvideo.pl script and thence ffmpeg as you have discovered. The line that the first error is coming from implies that the event length is zero, can you go into mysql and type the following
select max(F.Delta)-min(F.Delta) as FullLength, E.*, M.Name as MonitorName, M.Width as MonitorWidth, M.Height as MonitorHeight, M.Palette from Frames as F inner join Events as E on F.EventId = E.Id inner join Monitors as M on E.MonitorId = M.Id where EventId = '1076' group by F.EventId;
and post what you see.
Cheers,
Phil,
This is a little odd. The rate comes originally from the value passed in via the Rate selector in the popup. It has a base of 100, so real-time is 100. This is passed into the zmvideo.pl script and thence ffmpeg as you have discovered. The line that the first error is coming from implies that the event length is zero, can you go into mysql and type the following
select max(F.Delta)-min(F.Delta) as FullLength, E.*, M.Name as MonitorName, M.Width as MonitorWidth, M.Height as MonitorHeight, M.Palette from Frames as F inner join Events as E on F.EventId = E.Id inner join Monitors as M on E.MonitorId = M.Id where EventId = '1076' group by F.EventId;
and post what you see.
Cheers,
Phil,
-
- Posts: 7
- Joined: Mon Mar 08, 2004 4:10 pm
Re: Video Creation Issue
Thanks Phil - this is what I get....
mysql> select max(F.Delta)-min(F.Delta) as FullLength, E.*, M.Name as MonitorName, M.Width as MonitorWidth, M.Height as MonitorHeight, M.Palette from Frames as F inner join Events as E on F.EventId = E.Id inner join Monitors as M on E.MonitorId = M.Id where EventId = '1076' group by F.EventId;
Empty set (0.00 sec)
--Logically Rogue
mysql> select max(F.Delta)-min(F.Delta) as FullLength, E.*, M.Name as MonitorName, M.Width as MonitorWidth, M.Height as MonitorHeight, M.Palette from Frames as F inner join Events as E on F.EventId = E.Id inner join Monitors as M on E.MonitorId = M.Id where EventId = '1076' group by F.EventId;
Empty set (0.00 sec)
--Logically Rogue
-
- Posts: 7
- Joined: Mon Mar 08, 2004 4:10 pm
Re: Video Creation Issue
Let's try that again - I have been deleting events all day as I play with ZM.... Event 1076 no longer exists ;) However, 1134 does.....
mysql> select max(F.Delta)-min(F.Delta) as FullLength, E.*, M.Name as MonitorName, M.Width as MonitorWidth, M.Height as MonitorHeight, M.Palette from Frames as F inner join Events as E on F.EventId = E.Id inner join Monitors as M on E.MonitorId = M.Id where EventId = '1134' group by F.EventId;
+------------+------+-----------+------------+---------------------+---------------------+--------+--------+-------------+----------+----------+----------+----------+----------+---------+----------+------------+-------------+--------------+---------------+---------+
| FullLength | Id | MonitorId | Name | StartTime | EndTime | Length | Frames | AlarmFrames | TotScore | AvgScore | MaxScore | Archived | Uploaded | Emailed | Messaged | LearnState | MonitorName | MonitorWidth | MonitorHeight | Palette |
+------------+------+-----------+------------+---------------------+---------------------+--------+--------+-------------+----------+----------+----------+----------+----------+---------+----------+------------+-------------+--------------+---------------+---------+
| 608.50 | 1134 | 2 | Event-1134 | 2004-03-08 16:23:58 | 2004-03-08 16:33:58 | 599.63 | 731 | 197 | 1001 | 5 | 19 | 0 | 0 | 0 | 0 | | HL235 | 320 | 240 | 4 |
+------------+------+-----------+------------+---------------------+---------------------+--------+--------+-------------+----------+----------+----------+----------+----------+---------+----------+------------+-------------+--------------+---------------+---------+
1 row in set (0.01 sec)
mysql> select max(F.Delta)-min(F.Delta) as FullLength, E.*, M.Name as MonitorName, M.Width as MonitorWidth, M.Height as MonitorHeight, M.Palette from Frames as F inner join Events as E on F.EventId = E.Id inner join Monitors as M on E.MonitorId = M.Id where EventId = '1134' group by F.EventId;
+------------+------+-----------+------------+---------------------+---------------------+--------+--------+-------------+----------+----------+----------+----------+----------+---------+----------+------------+-------------+--------------+---------------+---------+
| FullLength | Id | MonitorId | Name | StartTime | EndTime | Length | Frames | AlarmFrames | TotScore | AvgScore | MaxScore | Archived | Uploaded | Emailed | Messaged | LearnState | MonitorName | MonitorWidth | MonitorHeight | Palette |
+------------+------+-----------+------------+---------------------+---------------------+--------+--------+-------------+----------+----------+----------+----------+----------+---------+----------+------------+-------------+--------------+---------------+---------+
| 608.50 | 1134 | 2 | Event-1134 | 2004-03-08 16:23:58 | 2004-03-08 16:33:58 | 599.63 | 731 | 197 | 1001 | 5 | 19 | 0 | 0 | 0 | 0 | | HL235 | 320 | 240 | 4 |
+------------+------+-----------+------------+---------------------+---------------------+--------+--------+-------------+----------+----------+----------+----------+----------+---------+----------+------------+-------------+--------------+---------------+---------+
1 row in set (0.01 sec)
-
- Posts: 7
- Joined: Mon Mar 08, 2004 4:10 pm
Re: Video Creation Issue
*sigh*
I should be smacked around.... Video works for event 1134... I must have messed something up in trying to get my low FPS/high FPS stuff to work (see previous post).
Thanks Phil!!
--Logically Rogue
I should be smacked around.... Video works for event 1134... I must have messed something up in trying to get my low FPS/high FPS stuff to work (see previous post).
Thanks Phil!!
--Logically Rogue
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Video Creation Issue
Ok, good. Self help is my favourite resolution!
Cheers,
Phil,
Cheers,
Phil,