Hi
I've seen a couple of previous posts about this problem, but no solutions.
I've got SuSE 9.1, ZM 1.19.5 and ffmpeg-0.4.9-pre1.
ZM works, but when I try to make mpeg videos, it only works for 4x realtime or greater. I get errors for anything less. This seems to be because ffmpeg only works for 25fps, and since the ZM capture at normal speed is less than this (USB cam), it doesn't work.
Any ideas?
Ben
ffmpeg doesn't work for <4x
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Hi Ben,
I can happily generate videos of events at less than 25fps.
This is the output from zmvideo.log for one of those events
What do you get in zmvideo.log that might be different I wonder.
Phil,
I can happily generate videos of events at less than 25fps.
This is the output from zmvideo.log for one of those events
Code: Select all
Creating video file F-127712.mpg for event 127712
/usr/local/bin/ffmpeg -y -hq -r 10.66 -s 352x288 -i %03d-capture.jpg F-127712.mpg > mpeg.log
Input #0, image, from '%03d-capture.jpg':
Duration: 00:00:07.6, bitrate: N/A
Stream #0.0: Video: rawvideo, yuvj420p, 352x288, 10.66 fps
Output #0, mpeg, to 'F-127712.mpg':
Stream #0.0: Video: mpeg1video (hq), 352x288, 10.66 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 14 q=7.0 size= 112kB time=1.3 bitrate= 698.6kbits/s ^Mframe= 32 q=14.0 size= 170kB time=3.0 bitrate= 463.9kbits/s ^Mframe= 48 q=16.0 size= 214kB time=4.5 bitrate= 389.3kbits/s ^Mframe= 67 q=12.0 size= 264kB time=6.3 bitrate= 344.1kbits/s ^Mframe= 82 q=12.0 size= 296kB time=7.7 bitrate= 315.2kbits/s ^M
Finished F-127712.mpg
Phil,
Hi Phil.
Thanks for the quick respose.
Here's the output of zmvideo.log. There's two results, one for 2x and the second for 4x. 4x worked, 2x didn't.
2x============
Creating video file Event-1498.mpg for event 1498
/usr/local/bin/ffmpeg -y -hq -intra -r 12.92 -s 320x240 -i %03d-capture.jpg Event-1498.mpg > mpeg.log
[mjpeg @ 0x827f3b8]get_buffer() failed
Input #0, image, from '%03d-capture.jpg':
Duration: 00:00:05.2, bitrate: N/A
Stream #0.0: Video: rawvideo, yuvj420p, 320x240, 12.92 fps
Output #0, mpeg, to 'Event-1498.mpg':
Stream #0.0: Video: mpeg1video (hq), 320x240, 12.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 0x827f3b8]MPEG1/2 doesnt support 12/1 fps
Error while opening codec for stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Error: 1 at /usr/local/bin/zmvideo.pl line 259.
Creating video file Event-1498.mpg for event 1498
4x======
/usr/local/bin/ffmpeg -y -hq -intra -r 25.84 -s 320x240 -i %03d-capture.jpg Event-1498.mpg > mpeg.log
[mjpeg @ 0x827f3b8]get_buffer() failed
Input #0, image, from '%03d-capture.jpg':
Duration: 00:00:02.6, bitrate: N/A
Stream #0.0: Video: rawvideo, yuvj420p, 320x240, 25.84 fps
Output #0, mpeg, to 'Event-1498.mpg':
Stream #0.0: Video: mpeg1video (hq), 320x240, 25.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 66 q=24.8 Lsize= 284kB time=2.6 bitrate= 894.8kbits/s
video:282kB audio:0kB global headers:0kB muxing overhead 0.802773%
Finished Event-1498.mpg
============
See the note in 2x regarding the 12/1 fps. I get a similar one about 5/1 fps when I ty to run realtime. I note you aren't using the -intra swtich. I don't know what this does.
Ben
Thanks for the quick respose.
Here's the output of zmvideo.log. There's two results, one for 2x and the second for 4x. 4x worked, 2x didn't.
2x============
Creating video file Event-1498.mpg for event 1498
/usr/local/bin/ffmpeg -y -hq -intra -r 12.92 -s 320x240 -i %03d-capture.jpg Event-1498.mpg > mpeg.log
[mjpeg @ 0x827f3b8]get_buffer() failed
Input #0, image, from '%03d-capture.jpg':
Duration: 00:00:05.2, bitrate: N/A
Stream #0.0: Video: rawvideo, yuvj420p, 320x240, 12.92 fps
Output #0, mpeg, to 'Event-1498.mpg':
Stream #0.0: Video: mpeg1video (hq), 320x240, 12.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 0x827f3b8]MPEG1/2 doesnt support 12/1 fps
Error while opening codec for stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Error: 1 at /usr/local/bin/zmvideo.pl line 259.
Creating video file Event-1498.mpg for event 1498
4x======
/usr/local/bin/ffmpeg -y -hq -intra -r 25.84 -s 320x240 -i %03d-capture.jpg Event-1498.mpg > mpeg.log
[mjpeg @ 0x827f3b8]get_buffer() failed
Input #0, image, from '%03d-capture.jpg':
Duration: 00:00:02.6, bitrate: N/A
Stream #0.0: Video: rawvideo, yuvj420p, 320x240, 25.84 fps
Output #0, mpeg, to 'Event-1498.mpg':
Stream #0.0: Video: mpeg1video (hq), 320x240, 25.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 66 q=24.8 Lsize= 284kB time=2.6 bitrate= 894.8kbits/s
video:282kB audio:0kB global headers:0kB muxing overhead 0.802773%
Finished Event-1498.mpg
============
See the note in 2x regarding the 12/1 fps. I get a similar one about 5/1 fps when I ty to run realtime. I note you aren't using the -intra swtich. I don't know what this does.
Ben
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
- victor_diago
- Posts: 245
- Joined: Wed Jan 21, 2004 2:44 pm
- Location: Brazil, sao paulo
- Contact: