Wow, I just can't seem to figure this out.
So I added the two commands, and restarted ZM, and here's what I know so far. When I created an alarm situation that tripped my filter containing %EV%, I looked at /var/log/messages:
Code: Select all
Jan 13 21:52:59 dvr zma_m8[5339]: INF [IN_Living_Room: 027 - Gone into alarm state]
Jan 13 21:53:06 dvr zma_m8[5339]: INF [IN_Living_Room: 078 - Gone into alert state]
Jan 13 21:53:12 dvr zma_m8[5339]: INF [IN_Living_Room: 102 - Left alarm state (5905) - 85(51) images]
Jan 13 21:53:18 dvr zmfilter[5290]: INF [/usr/bin/zmvideo.pl -e 5905 -r 1 -s 1 -f wmv]
Jan 13 21:53:19 dvr zmvideo[5419]: INF [Creating video file Event-5905-r1-s1.wmv for event 5905]
Jan 13 21:53:19 dvr zmvideo[5419]: INF [Finished Event-5905-r1-s1.wmv]
Jan 13 21:53:19 dvr zmfilter[5290]: INF [Creating notification email]
Jan 13 21:53:19 dvr zmfilter[5290]: INF [/usr/bin/zmvideo.pl -e 5905 -r 1 -s 1 -f wmv]
Jan 13 21:53:20 dvr zmvideo[5422]: INF [Video file Event-5905-r1-s1.wmv already exists for event 5905]
Jan 13 21:53:20 dvr zmfilter[5290]: INF [Sending notification email 'IN_Living_Room Alarm']
Jan 13 21:53:20 dvr zmfilter[5290]: INF [Attaching '8/5905/011-capture.jpg]
Jan 13 21:53:20 dvr zmfilter[5290]: INF [Attaching '8/5905/Event-5905-r1-s1.wmv]
Jan 13 21:53:26 dvr zmfilter[5290]: INF [Notification email sent]
I received the email, and the video was not playable:
Code: Select all
"Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file."
Video parameters for the "bad" video in the video detail screen for that event:
Format: wmv
Size: 525584
Rate: Real
Scale: Actual
Then I delete the "bad" video in that window, reset the video format, frame rate, and size to wmv, Real, and Actual, and press "Generate Video".
The resulting file size/info is:
Format: wmv
Size: 525377
Rate: Real
Scale: Actual
This time the video plays perfectly.
zmfilter.log shows:
Code: Select all
01/13/08 21:53:18.948620 zmfilter[5290].INF [/usr/bin/zmvideo.pl -e 5905 -r 1 -s 1 -f wmv]
In the web error log is this:
Code: Select all
/usr/bin/zmvideo.pl -e 5905 -f wmv -r 1.00 -s 1.00, referer: http://192.168.0.80/index.php?view=video
&eid=5905&delete=0
This time, I re-ran that exact command doing a linux cut/paste, and I got:
Code: Select all
root@dvr:/var/log/apache2# Value "1.00," invalid for option s (real number expected)
When I remove the comma from that line, it works fine and I get a working video.
The differences in what is passed to zmvideo.pl seem to be the decimal and two zeroes for the rate and scale parameters and the command and referer line for the manual video generation. When I run either zmvideo.pl cmomand from the shell, assuming I remove the comma, I get a playable video in both cases. It only breaks when zmfilter runs it in the background. Still a mystery.
Quick edit:
I also tried removing the %EIM% from the email message, and finally I unchecked "generate video" in the filter itself (because the %EV% directive tries to generate it also, hence the message about the video file already existing in the first code block above), and I still get an unplayable video from the filter.
I wonder if I could pass one of the unplayable videos through some sort of video file software that could tell what the problem is. Obviously since the file sizes are very close, it's a trivial thing. Most of the data is there, but something is off just enough that it can't play.