Page 1 of 1
mpeg streaming
Posted: Wed Oct 24, 2007 7:40 am
by Laevi
Hello again
i'm trying to get a stream without using cambozola because it's not too fast, but i can't get it to work.
I have ffmpeg installed and generating any video files works perfectly i only have problems when it comes to streaming.
I can't see anything noticable in the logs and i rebuilded ZM --with-ffmpeg=... but still no luck.
Anyone can clearify if this is a configuration problem or a browser/plugin problem?
Thanks.
Posted: Wed Oct 24, 2007 8:35 am
by jameswilson
getting ffmpeg and zm to function fully together needs zm to be compliled against the right version of ffmpeg. If you have installed from source then it should be ok, if you have used a package manager then if the version that zm was built to use if different from the one you installed you will have problems
Posted: Thu Oct 25, 2007 6:49 am
by sergiut2002
can you post how did u copiled zm with ffmpeg support? i tried to compile on ubuntu without success
thanks
________
Honda VT250F history
Posted: Thu Oct 25, 2007 11:38 am
by Laevi
Thx for your reply james..
I tried to rebuild ZM again with ffmpeg but now i noticed i was missing the libavutil where the libavcodec and libavformat are normally installed.
Anybody knows if this library can be installed seperately or has a ffmpeg version where this one is included also?
Thx.
- Edit: Found it and installed it and reinstalled ZM with ffmpeg but still get the same error in log:
Code: Select all
Oct 25 14:40:45 localhost zms[10052]: ERR [MPEG streaming of 'mode=mpeg&monitor=1&scale=100&bitrate=25000&maxfps=5&format=asf&user=admin&rand=1193316040' attempted while disabled]
Posted: Thu Oct 25, 2007 6:03 pm
by jameswilson
thge 'attempted while disabled' is something i would look at. Like i said i have never been successful mysle fin getting zm to work with ffmpeg on anything than the live cd.... so i dont bother anymore lol
Posted: Mon Oct 29, 2007 7:56 am
by Laevi
So can anybody (developer from the live cd or something) tell me how they configured ZM and ffmpeg to work together on the mpeg streaming?
Would be appreciated greatly
I found where the error is generated (zms process):
Code: Select all
#if HAVE_LIBAVCODEC
monitor->StreamMpeg( format, scale, maxfps, bitrate );
#else // HAVE_LIBAVCODEC
Error(( "MPEG streaming of '%s' attempted while disabled", query ));
fprintf( stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n" );
return( -1 );
#endif // HAVE_LIBAVCODEC
So if i'm right ZM doesn't recognizes 'libavcodec'?
Though:
Code: Select all
FC-NVR:/# ffmpeg -version
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
built on Oct 25 2007 16:16:49, gcc: 3.3.5 (Debian 1:3.3.5-13)
ffmpeg 0.4.9-pre1
ibavcodec 4718
libavformat 4616
libavcodec is obviously installed. Any thoughts?
Posted: Mon Oct 29, 2007 3:00 pm
by Laevi
I found out there was an error in the ZM zms.cpp that gets executed when calling './configure'. After a bit of tweaking and editing the files of both ZM and ffmpeg i got it to work.
So this can be closed
Posted: Mon Oct 29, 2007 11:21 pm
by jameswilson
its over my head but what was the error, ie did you find a bug?
Posted: Thu Nov 01, 2007 7:47 am
by Laevi
when executing the ./configure (with the --with-ffmpeg statement and the right directory pointed)it succesfully found the binaries (libavcodec and libavformat) but when using mpeg streaming afterwards it gave an error in the logs:
Code: Select all
MPEG streaming of 'Cam1' attempted while disabled. MPEG streaming is disabled. You should configure with the --with-ffmpeg option and rebuild to use this functionality.
I looked up the error i got which was found in the zms part of the configure (in the src map - zms.cpp):
Code: Select all
#if HAVE_LIBAVCODEC
monitor->StreamMpeg( format, scale, maxfps, bitrate );
#else // HAVE_LIBAVCODEC
Error(( "MPEG streaming of '%s' attempted while disabled", query ));
fprintf( stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n" );
return( -1 );
#endif // HAVE_LIBAVCODEC
although the variable 'HAVE_LIBAVCODEC' was stated as '1' in the config.h file it still gave the error.
So i rewrote the if-statement to always execute the part which would normally be executed if the HAVE_LIBAVCODEC was 1:
Code: Select all
monitor->StreamMpeg( format, scale, maxfps, bitrate );
Then i got another error in the make process but that was not really related to this one i think, there was an empty '#include' statement in the one of the other building files.
After deleting this sentence all configured and maked well, and the streaming works great.
Hope this is of some use but i'm not sure it's a bug or something that went wrong on my side.
Posted: Wed Oct 15, 2008 3:50 pm
by liviab
Hii Laevi,
so, what did you do?? You executed the ./configure with --with-ffmpeg and change the zms.ccp file??
Here it isn't working mpeg well. The ZM captures motion, saves images and videos, although nothing is shown in the browser.
Please, help me!!