Zoneminder 1.24.3 deluxe on Ubuntu 11.04 Natty
Posted: Fri May 13, 2011 1:39 am
Just to let you know, today I installed a new Ubuntu Desktop 11.04 and used this install guide on this page:
http://www.zoneminder.com/wiki/index.ph ... _Cambozola
And it worked like a charm!
One step uses nano to manually edit several src files:
#Edit files below, or ZoneMinder will not compile
nano src/zm_ffmpeg_camera.cpp # change “CODEC_TYPE_VIDEO” to “AVMEDIA_TYPE_VIDEO”
nano src/zm_mpeg.cpp # change “PKT_FLAG_KEY” to “AV_PKT_FLAG_KEY”
nano src/zm_mpeg.cpp # change “CODEC_TYPE_VIDEO” to “AVMEDIA_TYPE_VIDEO”
nano src/zm_remote_camera_rtsp.cpp # change as before
nano src/zm_rtsp.cpp # change as before
nano src/zm_sdp.cpp # change all CODEC_TYPE_ to AVMEDIA_TYPE_
nano src/zm_sdp.h # change “enum CodecType” to “enum AVMediaType”
I found the above instructions hard to follow, so I wrote a script to do them all below, the lines below replace above nano lines:
### script to edit cpp files using sed so they compile on Ubuntu 11.04
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_ffmpeg_camera.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_ffmpeg_camera.cpp
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_mpeg.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_mpeg.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_mpeg.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_mpeg.cpp
# zm_remote_camera_rtsp.cpp # change as before
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_remote_camera_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_remote_camera_rtsp.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_remote_camera_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_remote_camera_rtsp.cpp
# zm_rtsp.cpp # change as before
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_rtsp.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_rtsp.cpp
sed 's/CODEC_TYPE_/AVMEDIA_TYPE_/g' zm_sdp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_sdp.cpp
sed 's/enum CodecType/enum AVMediaType/g' zm_sdp.h > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_sdp.h
# -------------- end of script -----------------
It saves time vs doing the manual edits.
http://www.zoneminder.com/wiki/index.ph ... _Cambozola
And it worked like a charm!
One step uses nano to manually edit several src files:
#Edit files below, or ZoneMinder will not compile
nano src/zm_ffmpeg_camera.cpp # change “CODEC_TYPE_VIDEO” to “AVMEDIA_TYPE_VIDEO”
nano src/zm_mpeg.cpp # change “PKT_FLAG_KEY” to “AV_PKT_FLAG_KEY”
nano src/zm_mpeg.cpp # change “CODEC_TYPE_VIDEO” to “AVMEDIA_TYPE_VIDEO”
nano src/zm_remote_camera_rtsp.cpp # change as before
nano src/zm_rtsp.cpp # change as before
nano src/zm_sdp.cpp # change all CODEC_TYPE_ to AVMEDIA_TYPE_
nano src/zm_sdp.h # change “enum CodecType” to “enum AVMediaType”
I found the above instructions hard to follow, so I wrote a script to do them all below, the lines below replace above nano lines:
### script to edit cpp files using sed so they compile on Ubuntu 11.04
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_ffmpeg_camera.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_ffmpeg_camera.cpp
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_mpeg.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_mpeg.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_mpeg.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_mpeg.cpp
# zm_remote_camera_rtsp.cpp # change as before
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_remote_camera_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_remote_camera_rtsp.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_remote_camera_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_remote_camera_rtsp.cpp
# zm_rtsp.cpp # change as before
sed 's/PKT_FLAG_KEY/AV_PKT_FLAG_KEY/g' zm_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_rtsp.cpp
sed 's/CODEC_TYPE_VIDEO/AVMEDIA_TYPE_VIDEO/g' zm_rtsp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_rtsp.cpp
sed 's/CODEC_TYPE_/AVMEDIA_TYPE_/g' zm_sdp.cpp > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_sdp.cpp
sed 's/enum CodecType/enum AVMediaType/g' zm_sdp.h > /tmp/ptmp.cpp ; mv /tmp/ptmp.cpp zm_sdp.h
# -------------- end of script -----------------
It saves time vs doing the manual edits.