Problem Installing PyAV in Ubuntu 14.04 LT 64-bit

2,019 views
Skip to first unread message

Jessica marsha

unread,
Oct 15, 2015, 1:51:16 AM10/15/15
to pupil-discuss

Dear all,

As I faced unsolvable installation error on Windows, I have now switched to Ubuntu 14.04 LTS 64 bit. I encountered problem when installing PyAV.

cd ~/
git clone https://github.com/pupil-labs/PyAV
cd PyAV
sudo python setup.py install

After following the abovementioned commands, I received the following in the terminal:

Could not find libavformat with pkg-config.
Could not find libavcodec with pkg-config.
Could not find libavdevice with pkg-config.
Could not find libavutil with pkg-config.
Could not find libswscale with pkg-config.
Could not find either of libswresample or libavresample with pkg-config.
Some required libraries are missing, and PyAV cannot be built; aborting!

I think I have successfully cloned PyAV as I received the notifications below after cloning PyAV:
Cloning into 'PyAV'...
remote: Counting objects: 2974, done.
remote: Total 2974 (delta 0), reused 0 (delta 0), pack-reused 2974
Receiving objects: 100% (2974/2974), 14.78 MiB | 45.00 KiB/s, done.
Resolving deltas: 100% (1765/1765), done.
Checking connectivity... done.

Therefore, the problem that I encounter now is not because of missing files or incomplete installation.

Has anyone encountered this problem before?

Regards,

Jessica

Pupil Labs Info

unread,
Oct 15, 2015, 4:39:11 AM10/15/15
to pupil-...@googlegroups.com
hi Jessica,

you are missing libav/ffmpeg this is the library pyav is wrapping. Please make sure to that this step completed successfully:

Best,

Moritz



--
You received this message because you are subscribed to the Google Groups "pupil-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pupil-discus...@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pupil-discuss/c4f54b8b-1266-4343-8962-be2ad623aeb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Pupil Labs
research + development + design

Jessica marsha

unread,
Oct 15, 2015, 5:30:28 AM10/15/15
to pupil-discuss
Dear all,

I have reinstalled FFMPEG as I found out that all these libav~ functions installed alongside FFMPEG.
I can now carry out the installation command, however, I get some error messages:
src/av/codec.c:283:36: fatal error: libavutil/audioconvert.h: No such file or directory
 #include "libavutil/audioconvert.h"
                                    ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I googled this problem and found this link: https://trac.videolan.org/vlc/ticket/6695
It seems that libavutil/audioconvert.h only exists since ffmpeg 0.7.x, the ffmpeg 0.6.x releases did not have it.

The latest copy of ffmpeg does not seem to have libavutil/audioconvert.h

It is also mentioned here that they have "Replaced rest of libavutil/audioconvert.h with libavutil/channel_layout.h" -> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=1acd2f6ba7bc85d4aab6f0ebdc56c8d21785640e

What should I do?

Regards,

Jessica

Jessica marsha

unread,
Oct 15, 2015, 6:58:03 AM10/15/15
to pupil-discuss
Thank you Moritz for getting back to me:)

I have reinstalled FFMPEG again and finally installed PyAV. Maybe libavutil/audioconvert.h did not get installed earlier. I don't reallly know why.

Now I am trying to run python main.py in ~/pupil_src/capture and I got these error messages:

File "main.py", line 82, in <module>
    from eye import eye
  File "/home/eg4301/pupil/pupil_src/capture/eye.py", line 38, in <module>
    from video_capture import autoCreateCapture, FileCaptureError, EndofVideoFileError, CameraCaptureError
  File "/home/eg4301/pupil/pupil_src/shared_modules/video_capture/__init__.py", line 47, in <module>
    from av_file_capture import File_Capture, FileCaptureError, EndofVideoFileError,FileSeekError
  File "/home/eg4301/pupil/pupil_src/shared_modules/video_capture/av_file_capture.py", line 12, in <module>
    import av
  File "/usr/local/lib/python2.7/dist-packages/av-0.2.5-py2.7-linux-x86_64.egg/av/__init__.py", line 15, in <module>
    from .audio.fifo import AudioFifo
  File "av/container.pxd", line 9, in init av.audio.fifo (src/av/audio/fifo.c:2931)
  File "av/packet.pxd", line 6, in init av.container (src/av/container.c:9567)
  File "av/frame.pxd", line 6, in init av.packet (src/av/packet.c:15682)
ImportError: /usr/local/lib/python2.7/dist-packages/av-0.2.5-py2.7-linux-x86_64.egg/av/frame.so: undefined symbol: avcodec_get_frame_defaults

Apologies for bombarding the community with so many questions...

Regards,

Jessica

Pupil Labs Info

unread,
Oct 15, 2015, 7:03:08 AM10/15/15
to pupil-...@googlegroups.com
Hi Jessica,

I m not sure what this error means. 

I ll gladly help, but before we dive into this. Have you tried running the bundles? No need  to install any dependencies.

best,

Moritz



--
You received this message because you are subscribed to the Google Groups "pupil-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pupil-discus...@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jessica marsha

unread,
Oct 16, 2015, 1:04:55 AM10/16/15
to pupil-discuss
Dear Moritz,

Thanks for the reply.

I need to inform you that I am planning to run the system without the world camera.
I think that aspect of the project may have contributed to the error messages that I am getting.

I have just installed pupil_capture and pupil_camera.

Still getting some errors.

when running pupil_capture:
Estimated / selected altsetting bandwith : 309 / 512.
WORLD Process [ERROR] video_capture : No accessible device found that matched ['Pupil Cam1 ID2', 'Logitech Camera', '(046d:081d)', 'C510', 'B525', 'C525', 'C615', 'C920', 'C930e']
WORLD Process [WARNING] video_capture : Starting with Fake_Capture.
WORLD Process [WARNING] video_capture.uvc_capture : 24fps capture mode not available at ((1280, 720)) on 'Fake Capture'. Selected 30fps.
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Process Process-1:
Traceback (most recent call last):
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/multiprocessing.process", line 258, in _bootstrap
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/multiprocessing.process", line 114, in run
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/eye", line 210, in eye
  File "pyglui/cygl/utils.pyx", line 45, in pyglui.cygl.utils.init (pyglui/cygl/utils.c:3027)
  File "pyglui/cygl/utils.pyx", line 56, in pyglui.cygl.utils.init (pyglui/cygl/utils.c:2973)
Exception: This OpenGL context is below 2.1.
Traceback (most recent call last):
  File "<string>", line 145, in <module>
  File "<string>", line 138, in main
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/world", line 186, in world
  File "pyglui/cygl/utils.pyx", line 45, in pyglui.cygl.utils.init (pyglui/cygl/utils.c:3027)
  File "pyglui/cygl/utils.pyx", line 56, in pyglui.cygl.utils.init (pyglui/cygl/utils.c:2973)
Exception: This OpenGL context is below 2.1.

I found some posts on the community with similar error messages:

Is it possible to run the software just using the eye camera? I am working on an pupil tracking project, hence I can do without the gaze tracking capability of the system for now.

Looking forward to hearing from you.

Regards,

Jessica

Pupil Labs Info

unread,
Oct 16, 2015, 8:22:51 AM10/16/15
to pupil-...@googlegroups.com
hi Jessica,

this error means that you dont have a opengl driver installed. A quick google should give you the info you need to install a 3rd party graphics driver.

Running with just one camera will work with the bundle as well.

Best,

Moritz




For more options, visit https://groups.google.com/d/optout.

Jessica marsha

unread,
Oct 19, 2015, 8:15:43 AM10/19/15
to pupil-discuss
Dear Mpritz,

I think I do have opengl driver installed.

Running glxinfo | grep version gives me:
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.5.9
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 10.5.9
OpenGL shading language version string: 1.30

Therefore, the installed opengl driver should allow me to run pupil_capture...

Regards,

Jessica

ethan.so...@gmail.com

unread,
Oct 25, 2015, 6:14:22 PM10/25/15
to pupil-discuss
I believe this has to do with the removal of deprecated features from ffmpeg. The latest few releases eliminate avcodec_get_frame_defaults(), the PIX_FMT_* declarations, and audioconvert.h among other things.

I think release n2.7.2 of ffmpeg will work.


Jessica marsha

unread,
Oct 29, 2015, 3:25:47 AM10/29/15
to pupil-discuss, ethan.so...@gmail.com
Hi Ethan,

Thank you for the suggestion. I have done a fresh reinstall of ubuntu and installed the 2.7.2 version of ffmpeg . I still cannot run the bundles but I could run the python code directly.

Regards,

Jessica

info

unread,
Nov 6, 2015, 10:33:00 AM11/6/15
to pupil-discuss
I think I already mentioned this, but a user has reported sucess with this method (I new bundle including this fix will be release soon.):


please try:

sudo rm /opt/pupil_capture/libstdc++.so.6

Best,

Moritz
Reply all
Reply to author
Forward
0 new messages