libam7xxx-0.1.3 released

After almost one year of fixes and new functionalities here is libam7xxx-0.1.3.

libam7xxx is a library to communicate with USB pico-projectors like, for instance, the Philips/Sagemcom PicoPix devices; you can read more about it in the previous stories:

The devices supported in this release are:

  • Acer C110
  • Acer C112
  • Aiptek PocketCinema T25
  • Philips/SagemCom PicoPix 1020
  • Philips/SagemCom PicoPix 2055

With this release PicoPix 1020 and 2055 are finally fully working, thanks to the people who helped fixing and testing the code, here is the entry from the NEWS file:

News for v0.1.3:
================

  * Better documentation
  * Ported to Windows (compiles with MinGW)
  * Added a minimal replacement of usb-modeswitch to use on systems where the
    latter is not available
  * Added support for Acer C112 (Thanks to Richard Wisenoecker)
  * Added support for Aiptek PocketCinema T25 (Thanks to Matti Koskinen)
  * Added some contrib scripts
  * Added support for setting the projectors zoom mode
  * Added multi-device support, now more than one projector can be used at the
    same time on the same system (Tested by Konstantin Lohmann)
  * Added support for Philips/SagemCom PicoPix PPX 2055
  * Fixed some problems with the supported Philips/SagemCom PicoPix devices,
    now these devices are fully working (Thanks to the Certik family)

Debian packages for i386 and amd64 are available at ao2.it/debian.

If anyone knows people at Sagemcom, would you put me in contact with them? They didn't reply to my previous messages to their support service address. I'd like to ask if they may be interested in providing some test units or to sponsor some development-time to make the pico-projectors work on Android.

Here is the shortlog between v0.1.2 and v0.1.3 for those interested in the development details:

Antonio Ospite (60):
      picoproj: add a note about image dimensions and native resolution
      Merge remote-tracking branch 'origin/rettichschnidi' into mingw-port
      HACKING.asciidoc: fix cmake invocation examples
      picoproj: use MAP_PRIVATE in the mmap call
      am7xxx: use hex notation for USB endpoints
      am7xxx: fix setting the USB configuration
      am7xxx: MinGW does not have endian.h, provide fallbacks
      am7xxx: don't look for the math library when compiling for Windows
      picoproj: issue a warning when passing "-f" more than once
      picoproj: fix a typo
      picoproj: replace mmap() with more portable file stream operations
      Don't set -pedantic-errors in CMAKE_C_FLAGS, it breaks check_symbol_exists()
      Add a CMAKE_TOOLCHAIN_FILE to compile with MinGW
      HACKING.asciidoc: add a section to explain Windows cross compilation
      Merge branch 'mingw-port'
      TODO: mention the plan about GStreamer
      Add a simple usb_mode_switch clone for am7xxx devices
      README.asciidoc document how to get libam7xx running on MS Windows
      README.asciidoc: add Royaltek PJU-2100 to the AM7XXX based devices list
      HACKING.asciidoc: add info about getting and building libam7xxx
      mingw_cross_toolchain.cmake: set the MINGW variable to True
      am7xxx-play: get the framerate from the video stream
      am7xxx-play: add a fallback definition for ENOTSUP
      am7xxx-play: check if sigaction is available
      am7xxx-play: check if strtok_r is available
      HACKING.asciidoc: add info about compiling am7xxx-play for Windows
      README.asciidoc: add info about running am7xxx-play.exe on Windows
      README.asciidoc: add Aiptek PocketCinema T25 to the AM7XXX devices list
      am7xxx: rename am7xxx_header.unknown0 to am7xxx_header.direction
      doc: update the list of supported devices
      contrib: add other supported devices to 55-am7xxx.rules
      contrib: add an example of how to start displaying images automatically
      Merge remote-tracking branch 'origin/rettichschnidi'
      am7xxx: implement support for the AM7XXX_PACKET_TYPE_ZOOM
      picoproj: support setting the zoom mode
      am7xxx-play: support setting the zoom mode
      am7xxx: update signature and documentation of am7xxx_set_power_mode()
      picoproj: make the help about power mode more consistent
      am7xxx-play: make the help about power mode more consistent
      contrib: add a test image to show how zoom modes work
      Merge branch 'am7xxx_set_zoom_mode'
      doc: update Doxygen configuration
      examples: support multiple devices
      am7xxx: add support for Philips/SagemCom PicoPix PPX 2055
      picoproj: clarify that when AM7XXX_ZOOM_TEST is set no image gets sent
      am7xxx: print text description of the 'direction' field
      am7xxx: assign device_list next to its first use
      am7xxx: add a note on the symmetry of read_header() and send_header()
      am7xxx: don't mention AM7XXX_DIRECTION_OUT in read_header()
      Fix an error when compiling with both -O0 and -Wp,-D_FORTIFY_SOURCE=2
      am7xxx: detect unexpected responses to AM7XXX_PACKET_TYPE_DEVINFO requests
      am7xxx: cache device info in am7xxx_get_device_info()
      am7xxx: make libam7xxx work with Philips/Sagemcom PPX projectors
      Merge branch 'fix-devinfo-for-PicoPix'
      contrib: add the am7xxx-play-window.sh script
      am7xxx: fix coding style
      am7xxx-play: rename 'packet' to 'in_packet'
      am7xxx-play: remove an unreachable break
      am7xxx-play: switch to avcodec_encode_video2()
      Release version 0.1.3

Matti Koskinen (1):
      am7xxx: add support for Aiptek PocketCinema T25

Reto Schneider (5):
      Make example programs optional.
      Stop CMake if function avformat_open_input not available,     print an error message. Prevents compile errors later on.
      Fix usage of FIND_PATH, allow $FFMPEG_DIR to be used.
      Fix typo.
      Add missing break.

Richard Wisenoecker (1):
      am7xxx: add support for Acer C112

CommentsSyndicate content

Hello, I know its a bit

Stepan's picture

Hello, I know its a bit unsuitable, but can somebody helps me to install libam7xxx on my ubuntu 12.10? I am real linux begginer and it wolud make me happy to run Pico Pix projector on it.

thx

Hi Stepan, If it is one of

ao2's picture

Hi Stepan,

If it is one of the supported PicoPix projectors, have you tried the Debian packages at ao2.it/debian? They should work on Ubuntu 12.10; you need at least the libam7xxx0.1 and libam7xxx-bin packages.

If you need further instructions come find us on the #am7xxx IRC channel on Freenode.

Ciao, Antonio

Hi Antonio, Thank you for

Anon's picture

Hi Antonio,

Thank you for your hard work.

I'm thinking to purchase a pico projector for use on thinkpad.
Do you think these devices and your driver will work smoothly on a usb v2 port ?

Thanks a lot,

/m

I only have an Acer C110, but

ao2's picture

I only have an Acer C110, but other people are using the other projectors supported by libam7xxx with no problems, USB2 is OK; so just pick one from above.

The driver works well, the example program am7xxx-play can be slow for some use cases but I am improving it and I should be able to do a new release in a month.

The new release will also add support for the PicoPix 2330 (the code is already in the git repository).

Ciao, Antonio

Hi Thanks for all the hard

Armin Niknam's picture

Hi

Thanks for all the hard work but when I download the package for ubuntu 12.04 the Software Center tells me: "Internal Error" without any further info!! Isn't that weird!!?

Hi Armin, try installing the

ao2's picture

Hi Armin,

try installing the packages from the command line with dpkg and paste here the error.

This is what I receive after

Armin's picture

This is what I receive after I downloaded the necessary deb files on UBUNTU 12.04 32bit, and typed sudo dpkg -i *.deb

dpkg: error processing libam7xxx-bin (--install):
dependency problems - leaving unconfigured
Setting up libam7xxx-dev (0.1.3-1) ...
Setting up libam7xxx-doc (0.1.3-1) ...
dpkg: dependency problems prevent configuration of am7xxx:
am7xxx depends on libam7xxx-bin; however:
Package libam7xxx-bin is not configured yet.
dpkg: error processing am7xxx (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
libam7xxx-bin
am7xxx

Mmh, the output just said

ao2's picture

Mmh, the output just said dependency problems - leaving unconfigured, it's hard to guess what's going on exactly.

The package was compiled on Debian Wheezy so there may be some differences with Ubuntu, the dependencies of libam7xxx-bin are:

Depends: libam7xxx0.1 (>= 0.1.3), libavcodec53 (>= 6:0.8.3-1~) | libavcodec-extra-53 (>= 6:0.8.5), libavdevice53 (>= 6:0.8.3-1~), libavformat53 (>= 6:0.8.3-1~), libavutil51 (>= 6:0.8.3-1~), libc6 (>= 2.10), libswscale2 (>= 6:0.8.3-1~), libusb-1.0-0 (>= 2:1.0.8), libxcb1

Check that the packages are there, and what version you have installed.

Alternatively, you can always try to rebuild the package from source, do you know how to do that? I do not have an i386 installation of Ubuntu handy, and setting up Ubuntu pbuilder images from Debian is not immediate.

Ciao, Antonio

Quindi secondo te sarebbe

Armin's picture

Quindi secondo te sarebbe meglio fare tutta questa procedura su Debian?! Forse provo anche rimuovere ubuntu e installare Debian a vedere come si sistema. Dici che il problema di dipendenza non esistera piu?

I know I'm driving you mad!

Armin's picture

I know I'm driving you mad! But well now I'm on Debian, all files are installed (though I installed them through the Deb package installer) and they were all installed without any dependency. Now how should I start this goddamn projector?

Short version: am7xxx-play -f

ao2's picture

Short version: am7xxx-play -f x11grab -i :0.0

For a full list of options see am7xxx-play --help or man am7xxx-play.

If you need further assistance join the #am7xxx IRC channel on Freenode, in a live conversation it's easier to follow what you are doing.

Io dicevo solo di installare

ao2's picture

Io dicevo solo di installare le dipendenze su Ubuntu, controllando che ci fossero le versioni compatibili. Comunque su Debian sarà più facile dato che creo i pacchetti lì.

Torno a scrivere in inglese così anche altri potranno seguire.

Hey, I installed all the

jaja's picture

Hey, I installed all the required deb packages and I get this error:

%~ am7xxx-play -f xllgrab -i :0.0
scan_devices: am7xxx device found, index: 0, name: Acer C110
cannot find input format
cannot initialize input
am7xxx_play failed

But if I type "am7xxx-play -i http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v" Everything works correctly. I have linux mint 14, do you know where the error can be?

mmh, it's x11grab, not xll...

jaja's picture

mmh, it's x11grab, not xll... Sorry for bothering you :D thanks btw!!!

Please help! I have gotten so

Simon's picture

Please help! I have gotten so far!

When I try and $ make mine I get this error, any idea what's happening?

Linking C executable ../bin/am7xxx-play
CMakeFiles/am7xxx-play.dir/am7xxx-play.c.o: In function `am7xxx_play':
am7xxx-play.c:(.text+0xacc): undefined reference to `avcodec_encode_video2'
collect2: ld returned 1 exit status
make[2]: *** [bin/am7xxx-play] Error 1
make[1]: *** [examples/CMakeFiles/am7xxx-play.dir/all] Error 2
make: *** [all] Error 2

I have all the dependencies downloaded, why can't it find avcodec?

Hi Simon, what version of

ao2's picture

Hi Simon,

what version of libavcodec do you have installed? The codebase in the master branch works with the 0.9 series, I didn't want to carry around any compatibility cruft.

For older versions you can apply this patch.

Let me know if that fixes your problem.

Ciao, Antonio

Thank you for the quick

Simon's picture

Thank you for the quick reply, I am using version 6:0.8.6-1+rpi1

I am attempting to get my pico projector to work with my raspberry pi running debian wheezy, I've spent the whole day working at it and I have gotten this far, can you give me any help? I'll try the patch you suggested and see if that works.

Ah, cool. I've got libam7xxx

ao2's picture

Ah, cool. I've got libam7xxx running on the Pi already, come on the #am7xxx IRC channel on Freenode if you want to ask something more, it'll be easier to talk there.

Ciao, Antonio

This is my error :( what to

Enrico's picture

This is my error :( what to do!?

scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055
[x11grab @ 0x8ed2480] device: :0 -> display: :0 x: 0 y: 0 width: 1024 height: 600
[x11grab @ 0x8ed2480] shared memory extension  found
[x11grab @ 0x8ed2480] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0':
  Duration: N/A, start: 1373077907.373302, bitrate: 1179648 kb/s
    Stream #0.0: Video: rawvideo, bgra, 1024x600, 1179648 kb/s, 60 tbr, 1000k tbn, 60 tbc
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  4 (X_ShmGetImage)
  Serial number of failed request:  247
  Current serial number in output stream:  247

Hi Enrico, it looks like it's

ao2's picture

Hi Enrico, it looks like it's an Xorg problem not a libam7xxx problem.

You can verify that by checking if playing a video works:

am7xxx-play -i http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v

Look at the manual page of am7xxx-play for more examples of use, or join the #am7xxx IRC channel on Freenode if you have more questions.

Ciao, Antonio

Hi, I have compiled the

Jakub Sistek's picture

Hi,

I have compiled the code, trying to use it with a PicoPix 2055 model. I am trying just with a photo, but getting the following error:

sudo LD_LIBRARY_PATH="/home/sistek/software/libam7xxx/build/lib:LD_LIBRARY_PATH" /home/sistek/software/libam7xxx/build/bin/picoproj -f P1261612.JPG -W 800 -H 480
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055
send_data[403]: ret: -9	transferred: 0 (expected 24)
send_header[591]: failed to send data
am7xxx_open_device[1064]: cannot get device info
am7xxx_open_device: Resource temporarily unavailable

It looks like the device is recognized but does not respond as expected. Any hints would be appreciated.

Thanks!

Jakub

Hi Jakub, mind that picoproj

ao2's picture

Hi Jakub,

mind that picoproj is a very basic test tool, it just sends data without performing any rescaling (that's in the man page), the image should already fit 800x480; you can use the convert program to rescale it:

convert -resize 800x480 P1261612.JPG scaled.jpg

Let me know if that helps, or join the #am7xxx IRC channel on Freenode for further assistance.

Ciao, Antonio

Hi Antonio, I apologise for

Jakub Sistek's picture

Hi Antonio,
I apologise for reacting this late, I thought I should get an email when a reaction is posted...Just found your prompt reply on your site.
Anyway, thank you very much for your help! I am now getting an image shown nicely with picoproj tool.
Now I am trying to make the am7xxx-play work:

sudo LD_LIBRARY_PATH="/home/sistek/software/libam7xxx-build/lib:/home/sistek/software/ffmpeg/lib:LD_LIBRARY_PATH" /home/sistek/software/libam7xxx-build/bin/am7xxx-play -f x11grab -i :0.0 -o video_size=800x480
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055
am7xxx_set_zoom_mode: setting zoom mode is unsupported on this device
[x11grab @ 0x82e2260] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 800 height: 480
[x11grab @ 0x82e2260] shared memory extension found
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1393043706.385574, bitrate: 737280 kb/s
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 800x480, 737280 kb/s, 60 tbr, 1000k tbn, 60 tbc
cannot find any video streams
cannot initialize input
am7xxx_play failed

In fact, I get a similar behaviour with video4linux2:

sudo LD_LIBRARY_PATH="/home/sistek/software/libam7xxx-build/lib:/home/sistek/software/ffmpeg/lib:LD_LIBRARY_PATH" /home/sistek/software/libam7xxx-build/bin/am7xxx-play -f video4linux2 -i /dev/video0 -o video_size=320x240,frame_rate=100 -u -q 30
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055
am7xxx_set_zoom_mode: setting zoom mode is unsupported on this device
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 8636.080249, bitrate: 36864 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
cannot find any video streams
cannot initialize input
am7xxx_play failed

It somehow attempts to start a stream, my webcam even blinks for a while, but immediately fails.

I have build libusbx, ffmpeg and libam7xxx from sources on my Ubuntu 12.04 LTS and I am not too familiar with such things. Quite likely, some of these dependencies does not work as they should...?

Any suggestion would be very welcome. I can even try with the freenode, although I've never used IRC so far.

Once again, many thanks. It seems I am not too far from my goal now.

Jakub

Hi Jakub, no email

ao2's picture

Hi Jakub,

no email notifications, sorry, but there is a per-post feed you can subscribe to in order to follow all the comments: http://ao2.it/en/news/2013/03/18/libam7xxx-013-released/feed

BTW, about you issue: if picoproj works then the base library works; the problem with am7xxx-play could be indeed related to your self-compiled ffmpeg but I am still not sure of that.

If you join the IRC channel, or write me an email I will guide you to try with the system libraries.

Finally, I noticed something in your command lines: when you override LD_LIBRARY_PATH you repeat it in the list of paths like LD_LIBRARY_PATH, I think you meant to write $LD_LIBRARY_PATH that is with a dollar sign in front of it so that the previous value gets expanded. However in general you don't need to repeat it at all, LD_LIBRARY_PATH is by definition a list of additional paths to search for libraries before the standard ones.

Ciao, Antonio

I have problems with

Rickyx's picture

I have problems with dependencies (libav...53) in Debian Jessie and Wheezy.
For which version you are compiling?

Thank you,
Rickyx

Hi Rickyx, are you talking

ao2's picture

Hi Rickyx, are you talking about the debian packages at http://ao2.it/debian or are you compiling yourself?

FYI the git master branch now depends libav10, it compiles with no problems in Debian Unstable and should do so in Jessie too.

If you want to compile on older systems like Wheezy use the debian/0.1.4-3 tag and apply the patches in debian/patches.

Alternatively you have to backport those patches to apply to the latest code.

If there is really interest in the v0.1.5 version for Wheezy I could work on a backport branch of the Debian package.

Ciao, Antonio

Hi Antonio, I have switched

Rickyx's picture

Hi Antonio,

I have switched to Jessie and libav...53 is not included in repository (on the other hand libav...54 or 55 are included). Trying to install 53 is breaking the dependencies.

A part from recompiling there is a quick solution I missed?

Thank you,
Rickyx

So this is about the Debian

ao2's picture

So this is about the Debian packages at http://ao2.it/debian indeed.

I'll upload packages for Jessie/Sid later today.

BTW, just curious, are you the same Rickyx from kino3d?

Ciao ciao, Antonio

These packages should install

ao2's picture

These packages should install fine on Sid and Jessie (amd64):

Let me know.

Ciao, Antonio

Ah, YES I'm from

Rickyx's picture

Ah, YES I'm from Kino3d!
but... your nickname is...???

Piccolo il mondo ;)

Rickyx

Ah, U !

Rickyx's picture

Ah, U !

Yes, U. Did the new packages

ao2's picture

Yes, U.

Did the new packages work for you?

Ciao, Antonio

Yes they are working:

Rickyx's picture

Yes they are working: however, maybe because I have to dig deep in documentation, using my PicoPix 2055 I'm not able to watch a movie: during fast scenes I see horizontal lines, like refresh or frame-rate problem.

For all other cases, including using Blam ( http://www.stuffmatic.com/2012/01/introducing-blam/ ), it works really great!

Thank you,
Rickyx

To increase the framerate try

ao2's picture

To increase the framerate try to decrease the screen resolution.

I mean, set the screen to 800x600 before launching am7xxx-play -f x11grab -i :0. Alternatively you can display only the video window with am7xxx-play-window.sh.

Let me know.

Ciao ciao, Antonio

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
V
y
F
u
L
b
Enter the code without spaces.