Page 1 of 2
Live video streaming problem (but works with replays)
Posted: Tue Feb 22, 2005 6:08 pm
by SyRenity
Hello.
I tried to use the ASF streaming instead of cambozola, and have encountered a strange effect - when using the live view, I get a black screen, and the Media Player says that there no information transferred. On the other hand, when I try to replay recorded events, I get them streamed perfectly. I'm testing it on Windows XP PRO SP2 with the latest ZM (1.20.1) installed via Cordel's excellent RPM set (also the latest one).
Also, any other format, selected instead of ASF. locks the IE. Any ideas on this one?
Posted: Thu Feb 24, 2005 12:24 pm
by cordel
I'll look into these this weekend. I have to put in allot of hours this week to make up for my truck breaking down this weekend. I just now finaly finnished working on it and got home but will have a look at it ASAP.
Cordel
Posted: Tue Mar 01, 2005 7:41 pm
by SyRenity
Hi Cordel.
I foung some interesting info, that might clear out this matter a little. Here is the location of the video, which can be seen from the windows media properties screen:
http://cgi-bin/zm/zms?mode=mpeg&monitor ... 1109706155
As you can see, it omits the address of the server. I'm trying to resolve it issue my self in the code, but any help will be apreciated as well.
Posted: Tue Mar 01, 2005 8:08 pm
by cordel
Thats an interesting note that I hadn't noticed. I also found that ffmpeg has some compilation issues in FC3 that affect mjpeg and am studing the workaround. I compiled the latstest CVS as well for ffmpeg and compiled ZM against it and can stream cameras but when I try to replay video I get interesting results. I will post more on it when I get home this evening.
Cheers,
Cordel
Posted: Tue Mar 01, 2005 10:07 pm
by zoneminder
I don't understand what you mean when you say
it omits the address of the server
can you elaborate?
Phil
Posted: Wed Mar 02, 2005 3:42 am
by cordel
SyRenity,
Sorry but I can not repeat what you're showing.
The only issues I've run into is with ffmpeg-0.4.8-3 am unable to steam live cameras (it starts with a couple frames and freezes and does the same in montage on only one camera and the rest wil not start) everything else works (replaying video and creating video).
ffmpeg current cvs I can stream one live camera fine but if I try montage only the first camera streams but it switchs between the ports as you would see watching from xawe or tvtime. I also get an error "Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height " It seems that is being addressed in another thread that appears when you try to create video from past events.
I had not checked any of this since zm-1.19.5 and I use cambozola since I don't like the lag and use ffmpeg to create archives so I was unaware of any issues. I'll have to do some digging and learn abit about ffmpeg so this may take awhile for me too work out (just a heads up).
Cheers,
Cordel
Posted: Wed Mar 02, 2005 10:40 am
by cordel
Okay here is what I get using cvs files downloaded 3/1/2005 trying to create a video from stored jpgs.
Code: Select all
Creating video file Street-1777.mpg for event 1777
/usr/bin/ffmpeg -y -hq -b 200 -r 3.37 -s 320x240 -i %03d-capture.jpg Street-1777.mpg > mpeg.log
ffmpeg version 0.4.9-pre1, build 4744, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --extra-cflags=-O2 -g -pipe -m32 -march=i386 -mtune=pentium4 --enable-mp3lame --enable-vorbis --enable-faad --enable-faac --enable-xvid --enable-pp --enable-shared-pp --enable-shared --enable-gpl --disable-strip
built on Mar 2 2005 00:39:09, gcc: 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
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 'Street-1777.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
Error: 1 at /usr/lib/zm/bin/zmvideo.pl line 273.
I'm open to suggestions but it appears that the changes made from 0.4.8 to 0.4.9 are somewhat drastic and has almost been compleatly rewritten (per dev mailing) and we'll have to wait for them to clean it up. mean time I'll look into repackaging 0.4.8 and see if I can work it out there.
Posted: Thu Mar 03, 2005 5:06 pm
by SyRenity
Hello.
"I don't understand what you mean when you say
Quote:
it omits the address of the server
can you elaborate?
Phil"
For some reason, I couldn't reproduce this issue as well. Now the server IP address is always included in the "Location", in video clip properties.
Anyway, as far as I understand, the latest CVS 0.4.9 version is able to stream one camera only, when using montage. It also can't generate video from the stored JPGs. The 0.4.8, distributed with the RPM, on the other hand, can't stream live video at all, but can do the rest. Is that correct?
Cordel, perhaps this thread will assist you regarding the latest CVS release:
http://www.zoneminder.com/forums/viewto ... ght=ffmpeg It seems that adding the "-strict -1" parameter to the ffmpeg options. Hopefully it will solve the video generation problem, leaving the montage issue to deal with. I will try to test the solution - althought it may take a while, as I didn't try to compile the ZM yet, using the LiveCD and your RPM.
Posted: Thu Mar 03, 2005 8:49 pm
by cordel
I already am working with the lastest, most current cvs thank you though. As far as it goes the current cvs can stream but has issues with more than one stream. It can convert jpeg into mpg but it requires it to be at a higher frame rate. I myself capture at 3 FPS and in order to get ffmpeg to even try to make a mpg I have to set the speed to tem times (30 FPS) which is usless for our perpose. So thats where it stands at the moment. Keep in mine all referances I'm making ARE based on Fedora Core 3.
Fedora Core 2 with ffmpeg 0.4.8 everything functions fine as I'm sure most other distros with a GCC <3.4.2 that I suspect what might be causing some of the issues in FC3 Build of ffmpeg 0.4.8.
Posted: Thu Mar 03, 2005 10:10 pm
by SyRenity
Hello Cordel.
So, perhaps downgrading the GCC in FC3 and recompiling the sources may solve the problem? Can 2 GCC versions be installed and coexist side by side?
Posted: Thu Mar 03, 2005 10:19 pm
by cordel
That I do not know and is why I have not tried it. I don't know that it is the issue for sure yet so until I am sure or get flusterated enough I will probably not persue that course. I'm asking questions in the ffmpeg dev mailing and will hopefully be able to get a solution for the current CVS so we can move forward with that project.
Posted: Fri Mar 04, 2005 1:02 am
by SyRenity
Thank you for your help, Cordel. Please feel free to ask me for any help that I can provide, in order to resolve the issue.
Posted: Mon Mar 07, 2005 10:23 pm
by SyRenity
Hello Cordel.
I started to fiddle with the FFMPEG, but have encountered some difficulty, regarding the integration of the CVS in your RPM.
The question is, after I fetch the latest CVS and make install it, the new files are placed in the /usr/local/bin directory. I tried then to go the easy way, and simply change the path in the options->tools, to the new bin files. Well, I still got no streaming afterwards (actually I do get a single frame - which is the same as with the 0.48 release)
Does it says that I need to fetch the latest ZM, and recompile it all the way? Or is there any shorter way which can use the RPM or the already installed and running ZM?
If I do will need to recompile the ZM, will it keep all the settings, or all these will have to be defined again? (Actualy I believe they do, as they are stored in DB, rather then in files, but I would like to be sure nevertheless.)
Thank you.
Posted: Mon Mar 07, 2005 10:56 pm
by zoneminder
A couple of things to be aware of.
1) If you download and build a new version of ZM, and you are going to use a new DB, then copy of the zmconfig.txt file from your old build before running zmconfig.pl. This will make sure you get all your old settings. It doesn't hurt to do this anyway and if you don't have a zmconfig.txt then running zmconfig.pl will create one.
2) ZM uses ffmpeg in two different ways. For creating videos of events it uses the actual ffmpeg binary. For streaming of live streams and replaying events it uses the the ffmpeg API as exposed in libavformat.a and libavcodec.a. So if you have a new version you should ensure you rebuild and reinstall ZM and that the correct libraries etc are on the link path.
Phil
Posted: Tue Mar 08, 2005 1:40 am
by cordel
I have packaged zm against the new cvs release. Streaming works like a charm but making mpegs from stored events complains with strict -1, 1 or none will not do any good in this case.
Code: Select all
Creating video file Street-4900.mpg for event 4900
/usr/bin/ffmpeg -y -b 600 -r 3.41 -s 320x240 -i %03d-capture.jpg Street-4900.mpg > mpeg.log
ffmpeg version 0.4.9-pre1, build 4744, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --extra-cflags=-O2 -g -pipe -m32 -march=i386 -mtune=pentium4 --enable-mp3lame --enable-vorbis --enable-faad --enable-faac --enable-xvid --enable-pp --enable-shared-pp --enable-shared --enable-gpl --disable-strip
built on Mar 2 2005 00:39:09, gcc: 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Input #0, image2, from '%03d-capture.jpg':
Duration: 00:00:12.9, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, 320x240, 3.41 fps
Output #0, mpeg, to 'Street-4900.mpg':
Stream #0.0: Video: mpeg1video, 320x240, 5.00 fps, q=2-31, 600 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 0x414b990]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
Error: 1 at /usr/lib/zm/bin/zmvideo.pl line 273.
I haven't sat down and played a whole lot with it either. If you want I can put the build against the cvs in my test dir on ftp.
It does manage to create something if you set to generate at 10x speed