Page 2 of 5

Posted: Fri Mar 13, 2009 12:27 pm
by punk_ecas
Please, post your feedback of trying to install zm with this ffmpeg version, because i'm not getting ffmpeg working, after install it i type ffmpeg on command and get:

Code: Select all

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
And compiling zm i get

Code: Select all

zm_local_camera.cpp: In function ‘PixelFormat getFfPixFormatFromV4lPalette(int, int)’:
zm_local_camera.cpp:161: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:162: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:163: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
zm_local_camera.cpp:228: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:229: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:230: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
make2: *** [zm_local_camera.o] Error 1
[/code]

Posted: Fri Mar 13, 2009 12:42 pm
by newvisionantenna
I'm not sure about the first part of your error but the second part is covered here. If you used a newer ffmpeg you wouldn't see the errors while building zoneminder but then you lose features.

Please see this post,

http://www.zoneminder.com/forums/viewto ... sc&start=0

About 10 posts down you will see your error and then I show a solution. After you edit the file and build zoneminder again you'll probably see another error which again is covered at that post. Just edit the next file if it failes to build according to what I wrote and then build it again. You'll get it working eventually, just not sure what that error at the command line is.

Posted: Fri Mar 13, 2009 1:02 pm
by punk_ecas
Thanks for the solution.

But commenting those lines which funcionalities i'm loosing??
And what about changing zm_rtsp.cpp to av_alloc_format_context() function?

That work, but i affraid to missing some important issues.

About ffmpeg, i don't really know what to do.

Posted: Fri Mar 13, 2009 1:06 pm
by newvisionantenna
Honestly I don't think you'll lose any functions. It's just the numberous differences in Zoneminder builds and ffmpeg. You should be ok, it's the same setup I have on that online demo.

Posted: Fri Mar 13, 2009 1:23 pm
by jsylvia007
ffmpeg is back!! Just came back!!

Posted: Fri Mar 13, 2009 3:33 pm
by jsylvia007
Ok. I have almost everything working, using a guide i have hacked together. I'm trying to put the finishing touches on it, and I have ONE issue left. Hopefully someone can help.

The last issue that I am coming across is that I cant generate videos from events. Everything configs and compiles fine without any issues (i did however change like 183 of zm_rtsp.cpp from avformat_alloc_context to av_alloc_format_context)

When I try to generate an video from an Event, this is in the ffmpeg.log file:

Code: Select all

/usr/local/bin/ffmpeg: symbol lookup error: /usr/local/bin/ffmpeg: undefined symbol: avformat_alloc_context
Whats weird is that if I run ffmpeg as both root and www-data users, this is the output:

Code: Select all

FFmpeg version SVN-r17945, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-shared --enable-pthreads
  libavutil     50. 0. 0 / 50. 0. 0
  libavcodec    52.21. 0 / 52.21. 0
  libavformat   52.31. 1 / 52.31. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libswscale     0. 7. 1 /  0. 7. 1
  built on Mar 13 2009 09:35:17, gcc: 4.3.2
At least one output file must be specified
Does anyone know where this might be coming from? I have a pull from ffmpeg svn this morning around 9:30a. I cant attach a file, but if you want a working copy of the guide i am using, let me know and I will post it somewhere.

Posted: Fri Mar 13, 2009 4:05 pm
by jsylvia007
Even more interesting...

zmvideo.pl runs from the command line just fine as root and www-data and generates a video.

Posted: Fri Mar 13, 2009 4:07 pm
by punk_ecas
Can you stream in mpeg instead of jpeg?

Posted: Fri Mar 13, 2009 4:13 pm
by jsylvia007
Damn. That would be a no. :(

Posted: Fri Mar 13, 2009 4:15 pm
by punk_ecas
Did you try the version of ffmpeg that newvisionantenna posted above?

Posted: Fri Mar 13, 2009 4:19 pm
by jsylvia007
I'd rather stick to the SVN version, but I suppose I could try that version out.

~Jake

Posted: Fri Mar 13, 2009 4:23 pm
by punk_ecas
I try that version but i get:

Code: Select all

ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init
And i can't fix this yet.

Posted: Fri Mar 13, 2009 4:58 pm
by jsylvia007
Is there a developer around who can explain the difference between me executing zmvideo.pl from the command line and how zoneminder executes it?

ffmpeg works from the command line. Why cant I view mjpeg streams or create videos?

Posted: Fri Mar 13, 2009 5:03 pm
by newvisionantenna
The version I put up is from the SVN tree. It's alittle older but works. What browser are you trying to generate video's with? If it's IE7 or Google Chrome it won't work and will give you some error. Try Firefox and click the generate video button, have a feeling it will work just fine.

Posted: Fri Mar 13, 2009 5:09 pm
by jsylvia007
All i use is Firefox. I'm still getting the same issue.

I can use zmvideo.pl just fine, but mjpeg streaming and video generation of events fails.

This is the error in the ffmpeg output now:

Code: Select all

/usr/local/bin/ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init
My hunch is something is getting screwed up in the pathing when zoneminder calls the functions, because ffmpeg works completely fine from the command line.