Errors in ffmpeg command line when creating videos

Support and queries relating to all previous versions of ZoneMinder
Locked
gduprey
Posts: 5
Joined: Thu May 18, 2006 3:58 am

Errors in ffmpeg command line when creating videos

Post by gduprey »

Howdy,

Running zm 1.22.1 -- just built it tonight and for the most part, it seems to be working.

However, when trying to create a video from an event, the ffmpeg command line that is being used has an error and that results in the attempt failing.

In particular, the command line generated by zm is:

Code: Select all

/usr/local/bin/ffmpeg -y -r 0.00  -i %03d-capture.jpg -s  640x480 -r 30 'New_Event-r1-s1.mpg'
But the first "-r 0.00" is erroneous. If I remove that (and leave the later -r 30 that comes from my ffmpeg config options), I can run it manually fine. Any idea where the "-r 0.00" is coming from? When using the dialog, I pick a Frame rate of "Real" and a size of "Actual". In the Options->Images config, ZM_FFMPEG_INPUT_OPTIONS is blank and ZM_FFMPEG_OUTPUT_OPTIONS is "-r 30".

Any suggestion why zm is adding that leading -r 0.00 to the command line and/or how to stop it?

Also, is there a way to have zm automatically produce or update the mpeg file? I guess ideally after each frame capture, but periodically would be fine too.

Thanks!!

Gerry
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

The first -r should be determined from the actual frame rate of the event. Is there anything unusual about the event you are using?

You can auto generate mpegs by creating and saving a filter and then checking the 'auto create video' option.
Phil
gduprey
Posts: 5
Joined: Thu May 18, 2006 3:58 am

Post by gduprey »

I think it's a pretty stock event -- it's a simple record at FPS 0.50 (a simple timelapse) with a duration of 86400 (one a day). Do any of those items change the -r parameter? Is there a way to just omit it (things work fine if I type the exact same command in manually, less the first -r)?

Gerry
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I'm surprised it it coming out as zero as it should just be a product of the number of frames over the duration. So if your fps is around 0.5 then that is what I would expect to be generated.

Actually, just checking, I think there is a problem the frame count for long events as bulk frames only get counted as one and not a bunch. Can you tell me how many frames your events says it has?
Phil
gduprey
Posts: 5
Joined: Thu May 18, 2006 3:58 am

Post by gduprey »

The event is running as I was doing this, so the number is always increasing. The one for last night had 37,557

Actually, three interesting things:

1) Yesterday, during the first event (probably <15,000 frames in), whenever I would view the event, the picture in the event viewer had a "broken image" icon in it (all the JPG's were good). I also got that error generating the video.

2) Today, when looking at yesterdays event, the image in the event display are good (no broken image) and I just kicked over the video generator and it seems to be running (before it failed immediatly).

3) If I try to look at "todays" event, the event view screen has nothing on it now (no broken image, no links, no nothing -- absolutely blank white page), though I've confirmed there is nearly 26,000 frames stored in the event so far.

So it looks like there are only problems with the current "event" and that once it switches to the next event (once a day), the previous day is actually OK.

Gerry
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

That may well be the case. The 'current' event does not have the totals for number of frames etc stored as they are only accumulated at the end. So this may be a duplicate of another issue which is essentially that ongoing events cannot easily be inspected.
Phil
Locked