well I'm ignoring the non-320x240 issues for now and falling into the fold :) But I'm wondering how to make proper use of recorded events and mpeg generation with ffmpeg. I had set a Max FPS of 16 but then going to generate an mpeg from an event I got an error:
Creating video file Event-15.mpg for event 15
/usr/local/bin/ffmpeg -y -hq -intra -r 15 -s 320x240 -i %03d-capture.jpg Event-1
5.mpg > mpeg.log
[mjpeg @ 0x8263444]mjpeg: JFIF header found (version: 1.1)
[mjpeg @ 0x8263444]get_buffer() failed
Input #0, image, from '%03d-capture.jpg':
Duration: 00:00:06.8, bitrate: N/A
Stream #0.0: Video: rawvideo, yuvj420p, 320x240, 15.00 fps
Output #0, mpeg, to 'Event-15.mpg':
Stream #0.0: Video: mpeg1video (hq), 320x240, 15.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 0x8263444]removing common factors from framerate
[mpeg1video @ 0x8263444]MPEG1/2 doesnt support 15/1 fps
Error while opening codec for stream #0.0 - maybe incorrect parameters such as b
it_rate, rate, width or height
Error: 1 at /usr/local/bin/zmvideo.pl line 263.
So is this sort of a "don't do that, then" situation? I generated an mpeg successfully by asking for 2x framerate and got a 30fps mpeg. of course, the motion was 2x normal speed :) Is setting a max FPS and then using those events to generate mpegs an incompatible pair of options? just wondering. thanks!
ffmpeg and fps issues
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: ffmpeg and fps issues
Hi Matt,
In my experience ffmpeg is usually pretty flexible about allowing you to use just about any frame rate. You can see the command line it uses
/usr/local/bin/ffmpeg -y -hq -intra -r 15 -s 320x240 -i %03d-capture.jpg Event-15.mpg > mpeg.log
it might be worth experimenting to se if you can vary this to see what works and what doesn't. Also check your version of ffmpeg in case it's old. Finally you could try creating the movie in a different format such as a .mov and see if that works.
Phil,
In my experience ffmpeg is usually pretty flexible about allowing you to use just about any frame rate. You can see the command line it uses
/usr/local/bin/ffmpeg -y -hq -intra -r 15 -s 320x240 -i %03d-capture.jpg Event-15.mpg > mpeg.log
it might be worth experimenting to se if you can vary this to see what works and what doesn't. Also check your version of ffmpeg in case it's old. Finally you could try creating the movie in a different format such as a .mov and see if that works.
Phil,
Re: ffmpeg and fps issues
yeah I'm just wondering, since it got its frame rate from ZM data/configurations, is there a way to know if ZM is going to feed it a valid framerate argument? Or is there a way in ZM to hard-set a framerate for "Modect" mode, so that it doesn't vary? thanks!