ffmpeg has to be <= 0.4.8

Support and queries relating to all previous versions of ZoneMinder
Locked
rsd
Posts: 3
Joined: Tue Mar 29, 2005 8:03 pm

ffmpeg has to be <= 0.4.8

Post by rsd »

Hi,

For some reason ffmpeg > 0.4.8 has a lower fps limit of 25 to generate MPEG1 files.

So, as most events are record in a rate < 25 (usually 5) ftps (mostly due to cheap one bt878 chip cards), it is useless with zm.

ffmpeg == 0.4.8 OTOH, can generate mpeg 1 files at any rate.

My suggestion is to do a version checking of ffmpeg before using it in the future and/or add this to the README, TODO, Troubleshooting file.

I have seem some posts about this problem and most distributions are starting to ship ffmpeg-0.4.9pre1 as the 0.4.8 does not build with gcc > 3.3 without the configure option (--disable-mmx).

-RSD
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hey RSD

Iam running the following version of FFMpeg on my FC3 with ZM 1.21.0. :

[root@voronwe ~]# ffmpeg -version
ffmpeg version 0.4.9-pre1, build 4744, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-shared
built on Mar 2 2005 17:08:45, gcc: 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
ffmpeg 0.4.9-pre1
libavcodec 4744
libavformat 4621

My Configure options for ffmpeg is the following. :

./configure --enable-shared

And my options passed to FFMPEG is the following for generating video streams. (found in zm options tools) :

-hq -intra -strict -1

And it works fine for me, the only problem is that WMP only gets the 1st fram on the first try, then all i do is ask zm to generate it once more and then i cet the whole stream, and when i check the zmvideo.log it tells me that the video was generated the first time, and resends it to the browser, hopes this helps u.
Best Regards
Tom Stage
rsd
Posts: 3
Joined: Tue Mar 29, 2005 8:03 pm

Post by rsd »

Here is a command example and the output:
  • ffmpeg -y -hq -b 200 -r 3.37 -s 320x240 -i %03d-capture.jpg test.mpg
    Input #0, image2, from '%03d-capture.jpg':
    Duration: 00:00:23.4, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: mjpeg, 320x240, 3.37 fps
    Output #0, mpeg, to 'test.mpg':
    Stream #0.0: Video: mpeg1video (hq), 320x240, 5.00 fps, q=2-31, 200 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    [mpeg1video @ 0x67f5d0]MPEG1/2 doesnt support 5/1 fps
    Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
It says that MPEG1 does not support 5 fps.

OTOH, this works with 0.4.8.


-RSD
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hey RSD

Following is what zm puts into my zmvideo.log on my system. :

Code: Select all

Creating video file Event-710.mpg for event 710
/usr/local/bin/ffmpeg -y -hq -intra -strict -1 -r 5.80 -s 640x480 -i %03d-capture.jpg Event-710.mpg > mpeg.log
ffmpeg version 0.4.9-pre1, build 4744, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-shared 
  built on Mar  2 2005 17:08:45, gcc: 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Input #0, image2, from '%03d-capture.jpg':
  Duration: 00:00:26.5, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: mjpeg, 640x480, 5.80 fps
Output #0, mpeg, to 'Event-710.mpg':
  Stream #0.0: Video: mpeg1video (hq), 640x480, 5.00 fps, q=2-31, 200 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=    2 q=0.0 size=     116kB time=0.2 bitrate=4751.4kbits/s    
frame=    3 q=0.0 size=     208kB time=0.4 bitrate=4259.8kbits/s    
frame=    4 q=0.0 size=     300kB time=0.6 bitrate=4096.0kbits/s    
frame=   15 q=0.0 size=     552kB time=2.8 bitrate=1615.0kbits/s    
frame=   37 q=0.0 size=     848kB time=7.2 bitrate= 964.8kbits/s    
frame=   60 q=0.0 size=    1158kB time=11.8 bitrate= 803.9kbits/s    
frame=   73 q=0.0 size=    1330kB time=14.4 bitrate= 756.6kbits/s    
frame=   95 q=0.0 size=    1622kB time=18.8 bitrate= 706.8kbits/s    
frame=  118 q=0.0 size=    1928kB time=23.4 bitrate= 675.0kbits/s    
frame=  133 q=0.0 Lsize=    2128kB time=26.4 bitrate= 660.3kbits/s    
video:2117kB audio:0kB global headers:0kB muxing overhead 0.521643%

Finished Event-710.mpg
Video file Event-710.mpg already exists for event 710 
The big diff. i see between urs and mine is the ekstra option sendt to ffmpeg : -strict -1

Try using that as explained in my last post.
Best Regards
Tom Stage
Locked