An Open Source driver for USB pico projectors

This is a follow-up to the previous story about am7xxx devices.

The 0.1.2 stable release of libam7xxx is out, and some binary Debian packages are available as well. Check out also the am7xxx page on Ohloh.

The devices supported in this release are:

This release comes with a display daemon based on libav, it is called am7xxx-play and you can use it to:

  • display your X desktop:
    am7xxx-play -f x11grab -i :0.0
    
  • display the content of a single X window with a script like this one:
    #!/bin/sh
    
    set -e
    
    WIN_INFO="$(xwininfo)"
    
    X=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Absolute upper-left X:[[:space:]]*/s///p")
    Y=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Absolute upper-left Y:[[:space:]]*/s///p")
    WIDTH=$(echo "$WIN_INFO" |  sed -n -e "/^[[:space:]]*Width:[[:space:]]*/s///p")
    HEIGHT=$(echo "$WIN_INFO" |  sed -n -e "/^[[:space:]]*Height:[[:space:]]*/s///p")
    
    set -x
    
    am7xxx-play -f x11grab -i ":0+${X},${Y}" -o video_size="${WIDTH}x${HEIGHT}"
    
  • display the output of a framebuffer device:
    am7xxx-play -f fbdev -i /dev/fb0
    
  • display the output of a v4l2 device:
    am7xxx-play -f video4linux2 -i /dev/video0 -o video_size=640x480,frame_rate=30
    
  • display any files supported by libav (but note that the framerate is not accurate in this case and audio is not decoded at all):
    am7xxx-play -i http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v
    

Keep in mind that am7xxx-play is just a prototype, I think it is not worth adding audio decoding and audio/video synchronization to it.

It is interesting to note that the freedom to send images of arbitrary resolutions to the projectors exposed some bugs in the devices firmware. So if you get garbage output try replugging the device and changing the dimensions of the image you are sending for display.

Where to go from here?

In the long run I think that we could write a libav output format, or —maybe better— a GStreamer video sink based on libam7xxx.

GStreamer looks interesting to me, and maybe keystoning can be implemented as an element of a GStreamer pipeline too. I'll ask GStreamer devs about that.

On linux systems, writing a kernel driver is also a possibility, the first easy choice would be writing it as a v4l2 output device accepting JPEG images or raw NV12 frames, this way v4l2sink from GStreamer could be used immediately.

I don't know if the framebuffer way is viable, since we would have to do JPEG encoding in userspace anyways; I'll ask linux-media for advice.

But if we want portability (GStreamer runs on Windows too, doesn't it?) the linux kernel driver becomes low priority.

There is also the issue of having some display-extension-mode, right now am7xxx-play is enough if you are only interested in a clone of the current screen, but what if we want another screen displayed by the projector? I read the Xvfb might go away in future Xorg versions and that we should use xf86-video-dummy, but I've just learned about it, I have to see how to use it, if it supports RANDR and stuff like that.

Call for help

If any Debian Developer is willing to sponsor the libam7xxx package for upload to the Debian archive, let us know, I'll try asking on debian-mentors as well. The packaging bits are in the libam7xxx debian branch.

If you are interested in sponsoring a port to Android/Linux, get in touch, we could use some (even old) Android device with USB Host support and maybe some other projectors to test multi-device operation of libam7xxx.

If you'd like to have an Open Projectors project where you can find Open Source software to use with video projectors, speak up! I'd like to hear some opinions before I start putting time on that. The L.A.S.E.R. Tag Linux port is an example of the kind of software I am talking about.

We are in the #am7xxx channel on the freenode IRC network.

Side Note: the development of am7xxx-play brought also a little fix for libavdevice.


CommentsSyndicate content

I bought the picoproj c110

Alaeri's picture

I bought the picoproj c110 with the hope of doing what you did. I couldn't understand anything to the usb trace so I gave up.

I spent a good part of last night trying to compile the package for i386. I used the tarball provided. Why I didn't use the git version is still a mystery to me. The code is based on a version of libav which isn't in ubuntu repositories so I had to download and compile it too. (twice! damn flag --enable-shared not enabled by default in libav)

I managed to get picoproj running. axmplay is compiled but I have a problem with the path of one of the libraries apparently. I will look into this a bit later.

Huge thanks to you!

Hi Alaeri, when you compile

ao2's picture

Hi Alaeri,

when you compile am7xxx-play be sure to pass gcc the correct -I option in order to use the header files of the version of libav you are going to use.

Feel free to paste here the exact error you are experiencing.

And keep following these pages so you can help testing the gstreamer video sink when it is ready :)

Thanks, Antonio

The ubuntu repositories have

alaeri's picture

The ubuntu repositories have been updated so it's easier now to compile :)
I cant make the x11grab option work:

sudo ./am7xxx-play -f x11grab -i :0.0 -o video_size=1024x600
scan_devices: am7xxx device found, index: 0, name: Acer C110
cannot find input format
cannot initialize input
am7xxx_play failed

the v4l2 option works pretty well. I can stream my webcam, I tried to stream my desktop with webcamstudio and it worked but it was a cpuhog

ffmpeg x11grab works so I tried to record a video of the screen and play it just after it was created but it doesnt seek after the end of the file at the time it was opened.

The -i option with the file is working quite well but vlc and am7play get out of synch rapidly.

The framebuffer option is not working either. My /dev/fb0 device is black apparently.

I tried to use Xvfb to create a second framebuffer and have vlc use it but am7play cant read it.

GStreamer seems to be a good idea to make it integrated.
The fact that the program and library are lightweight and fairly easy to compile/install as it is now is great too.

I am running ubuntu oneiric ocelot on a small netbook (samsung nf210)

usb_modeswitch and am7play combined are more reliable to get hold of the device than the acer displaypal software on windows :D

I had quite a bit of fun with it as you can see :D
My ultimate goal is to project stuff and use it with libfreenect, like the lasertagging thing but with no laserpointer.

goto: sleep

x11grab works! The mandatory

Alaeri's picture

x11grab works! The mandatory flags to configure libav to use it in libam7xxx are:
$./configure --enable-x11grab --enable-shared --enable-gpl
It works very well and has a very low memory/cpu usage :D

i am also getting same

benhur's picture

i am also getting same problem, i am using ubuntu 14.04 amd64, please tell how to configure x11grab. i did not understand how to execute
$./configure --enable-x11grab --enable-shared --enable-gpl

this is the configure command

ao2's picture

this is the configure command for libav/ffmpeg, not for libam7xxx

Hi, I tried to compile the

sin jar's picture

Hi,
I tried to compile the 0.1.2 stable release under Ubuntu 11.10 i386, but could not get it compile. I had the latest version of libav* from the ubuntu repositories but it could not. However after hours of trying different verisons of ffmpeg and libav, I think I finally figured it out.. I can now compile and install easily.
I wrote a post about it...
http://shortcuttosanity.blogspot.in/2012/05/fix-install-libam7xxx-under-...
I hope this helps someone...

Cheers!

Thanks, what about posting a

ao2's picture

Thanks, what about posting a patch on your blog? It is more direct than explaining the changes with words. You can generate the patch by cloning the git repository, making your changes and using the command git diff.

I still haven't decided whether we have to support multiple libav versions in the code or not.

Bye, Antonio

I put the patch up.. See it

sin jar's picture

I put the patch up..

See it here

I think it would be nice if we went for multiple libav versions support in the code. People who are not familiar of the fact that libav differs so very much with even a minor version change are gonna face problems (like I did 2 days back :P)

By the way... Thanks a lot for the driver ;)

Cheers.

I had a question.. Why does

sin jar's picture

I had a question..
Why does it not work with Acer C120?
Doesnt it use the same protocol?

I'll think some more about

ao2's picture

I'll think some more about multiple libav versions.

About C120, it uses a different chip and a different protocol, I was told it is SCSI Pass Through over USB, but I don't have a device myself so I am not going to work on that.

Ciao, Antonio

However your original code

sin jar's picture

However your original code from git compiles okay if done under ubuntu 12.04 LTS. They must have updated the libav versions

Were you able to make c120

Anonymous's picture

Were you able to make c120 actually work on 12.04? I tried it on 10.04 and it told me:
"am7xxx-play: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory"
If you did, I am gonna backup and upgrade right NOW :D

As stated above, C120 uses a

ao2's picture

As stated above, C120 uses a different protocol, it cannot be used with libam7xxx, if someone is willing to sponsor a device I may consider working on that.

OK. Since I am a Software

Anonymous's picture

OK. Since I am a Software developer, maybe I can do it myself and contribute. SCSI Passthrough doesn't look like rocket science. How much do you think the effort would be? Where would I have to start? Is it just a module to the current driver missing or would I need to start from scratch? Next Prob is: I am used to prog in higher stacks, closer to the end user. Most recently Java and Ruby (on Rails). I bet my experience in that stuff won't be worth much in that case... Nevertheless I'd be interested in that and could sure enough learn a lot from that. What do you think?

You'll end up writing a whole

ao2's picture

You'll end up writing a whole new driver, the protocol seem to be quite different from am7xxx devices.

You would first need to reverse engineer the image format used in USB transfers between the device and the host computer: SCSI pass-through may be the transport protocol, but the payload format is not known yet AFAIK.

Then when you know WHAT to send, you can start thinking about HOW to send it. Writing a prototype can be done in any language you are comfortable with, as long as you have access to a library to do USB transfers. For a device driver in userspace I think that at the end of the day C and libusb makes the most sense because that makes it possible to use the driver even on stripped down system on embedded devices.

After you wrote a prototype in your favorite language you can of course copy from libam7xxx for a possible implementation in C.

I'd also look if there are SCSI pass-through implementations already.

If you decide to go for it I could put you in contact with others owners of a C120.

Jump in the #am7xxx IRC channel if you need more details.

hi Antonio I have an Aiptek

stuckWithWin7's picture

hi Antonio

I have an Aiptek PocketCinema T25 projector, and as it showed the same usb ids, I gave it a try. Cloned your code from git to ubuntu running on vbox. Compiled nicely. The problem was that in mass storage mode the usb ids are those, but in projector mode they are 0x08ca:0x2144. Well I added them to libam7xxx.c and wov, the thing showed images.

Then I tried the cross-compiling, but the code wouldn't start in win7. Then I just compiled it with msys+mingw64, and also on win7 after Zadig and proper libusb-1.0.dll, projector can show images also on win7. The next ordeal was to get cmake (glad you use it!) work with GNUtoMS. Running in msys-shell absolutely no go, msys doesn't understand the vcvars64.bat. The I tried command prompt, but that neither, then after running sdk7.1 command prompt, got exp and lib files. Compiled picoproj in VC 2010 Express, and it works nicely.

All this, because earlier I had to use Pico_Projector to show whole screen, when doing threePhase 3d-reconstruction with opencv. Using whole screen makes opengl window of opencv not responsive to mouse, and after taking the phase images, I had to turn the projector off. Opencv on the other hand must be compiled with MSVC to get opengl, mingw64 doesn't work. Also using CUDA needs MSVC. Now it's easy just to show the images on pico projector, no need even to clutter monitor.

this I added to am7xxx_usb_device_descriptor:

	{
		.name	    ="Aiptek PocketCinema T25",
		.vendor_id  = 0x08ca,
		.product_id = 0x2144,
         }

am7xxx_mode_switch turns the projector ok on, but even giving the Aiptek projector-mode usb ids doesn't set it back.

-matti

Ah, matti so you are using

ao2's picture

Ah, matti so you are using libam7xxx from inside your own opencv program on Windows?

Join the #am7xxx IRC channel on Freenode to tell us more.

What about sending me a git patch made with git format-patch for the change to am7xxx_usb_device_descriptor? This way your name will show up in the project history. Drop me an email or talk to me on IRC.

And yes, am7xxx_mode_switch still does not switch the projector back to USB Mass Storage mode, do you need that?

Thanks for your feedback, Antonio

Cześć I can not run the Acer

Jakub's picture

Cześć
I can not run the Acer C110 on Ubuntu 11.10, I do not know what I'm doing well.
Libam7xxx installed. I have read and link http://shortcuttosanity.blogspot.in/2012/05/fix-install-libam7xxx-under-...
I need help

Hi Jakub, did it compile

ao2's picture

Hi Jakub, did it compile after you followed that blog post?

If so have you tried running picoproj as root with sudo?

I did compile, but it does

Jakub's picture

I did compile, but it does not work.
How do I run the sudo picoproj?
I read this:
http://git.ao2.it/libam7xxx.git/blob/HEAD:/HACKING.asciidoc
I give up,

[...] lenovo@lenovo-B570:~$

Jakub's picture
[...] 
lenovo@lenovo-B570:~$ /home/lenovo/libam7xxx/build/bin/am7xxx-play -f x11grab -i :0.0 -o video_size=800x480 
scan_devices: am7xxx device found, index: 0, name: Acer C110 
libusb:error [op_open] libusb couldn't open USB device /dev/bus/usb/001/007: Permission denied. 
libusb:error [op_open] libusb requires write access to USB device nodes. 
am7xxx_open_device: No such device 

Put sudo before

ao2's picture

Put sudo before /home/lenovo/libam7xxx/build/bin/am7xxx-play.

Maybe the documentation can be improved about that.

Ciao, Antonio

Cool, I ran the

Jakub's picture

Cool, I ran the projector,
One thing is not cool, resolution 800x450, if I can fix it?
thank you Antonio

try playing with the -o

ao2's picture

try playing with the -o video_size= option, pass the resolution you have configured on your machine.

If you get a weird image, try configuring another resolution on your machine and try gain, the firmware of these projectors is buggy with some resolutions.

Hi, did you succed in making

Piero's picture

Hi, did you succed in making picopix work with ubuntu?

I have just pushed the change

ao2's picture

I have just pushed the change to enable support for the PicoPix PPX 2055.

Piero, what PicoPix model are you interested in?

tried to compile (not an

Anonymous's picture

tried to compile (not an expert, indeed...): what does it mean?

CMake Error at CMakeLists.txt:4 (find_package):
Could not find module Findlibusb-1.0.cmake or a configuration file for
package libusb-1.0.

Adjust CMAKE_MODULE_PATH to find Findlibusb-1.0.cmake or set libusb-1.0_DIR
to the directory containing a CMake configuration file for libusb-1.0. The
file will have one of the following names:

libusb-1.0Config.cmake
libusb-1.0-config.cmake

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

ok, I found step-by-step

Anonymous's picture

ok, I found step-by-step instructions and managed to compile it.
Now I have this error:

sudo ./am7xxx-play -f x11grab -i :0.0
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 1020
[x11grab @ 0x931b400] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 800 height: 600
[x11grab @ 0x931b400] shared memory extension found
[x11grab @ 0x931b400] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1344637235.355607, bitrate: 921599 kb/s
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 800x600, 921599 kb/s, 60 tbr, 1000k tbn, 60 tbc
[IMGUTILS @ 0xbf8bb364] Picture size 0x0 is invalid
cannot allocate output data buffer!
am7xxx_play failed

This was the output of

Anonymous's picture

This was the output of usb_modeswitch:

sudo usb_modeswitch --default-vendor 0x1de1 --default-product 0x1101 --message-content 55534243087052890000000000000cff020000000000000000000000000000
[sudo] password for andrea:

Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 007 on bus 002 ...
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached

SCSI inquiry data (for identification)
-------------------------
Vendor String: GENERIC
Model String: USB DISK DEVICE
Revision String: 1.00
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: actions
Product: Usb Device
Serial No.: 00000000000000000000000000000000
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
-> Run lsusb to note any changes. Bye.

Oh, I forgot... thank you for

Anonymous's picture

Oh, I forgot... thank you for your work!

Hi, the [IMGUTILS @

ao2's picture

Hi,

the [IMGUTILS @ 0xbf8bb364] Picture size 0x0 is invalid message is from libav/ffmpeg, not from libam7xxx; so I am afraid I can't help with that off the top of my head.

Join the IRC channel and we will try to find out more.

Ciao, Antonio

Hi, I have a PicoPix PPX2055,

bv's picture

Hi,

I have a PicoPix PPX2055, is there a possibility to use am7xxx-play ?
If I can help, please ask ;-)

Debian Wheezy AMD64

lsusb -v
...
Bus 002 Device 104: ID 21e7:0016  
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x21e7 
  idProduct          0x0016 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     2
    iConfiguration          6 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      8 
      bInterfaceProtocol      8 
      iInterface              7 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval

@bv, the USB descriptor

ao2's picture

@bv, the USB descriptor matches the Acer C110 one, besides some text strings; let's give it a shot with the patch below.

diff --git a/src/am7xxx.c b/src/am7xxx.c
index 5b98b84..0daa259 100644
--- a/src/am7xxx.c
+++ b/src/am7xxx.c
@@ -91,6 +91,11 @@ static struct am7xxx_usb_device_descriptor supported_devices[] = {
 		.vendor_id  = 0x21e7,
 		.product_id = 0x000e,
 	},
+	{
+		.name       = "Philips/Sagemcom PicoPix 2055",
+		.vendor_id  = 0x21e7,
+		.product_id = 0x0016,
+	},
 };
 
 /* The header size on the wire is known to be always 24 bytes, regardless of

Can you apply it to the latest code from the git repository, recompile and let me know if that works?

Thanks, Antonio

Thanks for this prompt

bv's picture

Thanks for this prompt answer. The result:

$ ./am7xxx-play -f x11grab -i :0.0
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055
[x11grab @ 0x118c8e0] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
[x11grab @ 0x118c8e0] shared memory extension  found
[x11grab @ 0x118c8e0] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1348759155.216664, bitrate: N/A
    Stream #0.0: Video: rawvideo, bgra, 1920x1080, -2147483 kb/s, 60 tbr, 1000k tbn, 60 tbc
[IMGUTILS @ 0x7fff2fd55030] Picture size 0x0 is invalid
cannot allocate output data buffer!
am7xxx_play failed

I have try this:

$ usb_modeswitch --default-vendor 0x21e7 --default-product 0x0016 --message-content 55534243087052890000000000000cff020000000000000000000000000000

Looking for default devices ...
   found matching product ID
   adding device
 Found device in default mode, class or configuration (1)
Accessing device 061 on bus 002 ...
Getting the current device configuration ...
 OK, got current device configuration (2)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Not a storage device, skipping SCSI inquiry

USB description data (for identification)
-------------------------
Manufacturer: actions
     Product: Usb Device
  Serial No.: 00000000000000000000000000000000
-------------------------
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
-> Run lsusb to note any changes. Bye.

Any Idea ?

You are

ao2's picture

You are getting:

scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055

so the patch looks OK, try picoproj.

If you can display a jpeg image with picoproj then we can say that libam7xxx supports the PPX2055.

The problem with am7xxx-play now is in:

[IMGUTILS @ 0x7fff2fd55030] Picture size 0x0 is invalid
cannot allocate output data buffer!

Which is not libam7xxx fault, IIUC the message is from libav, are you using Ubuntu?

Join us to the IRC channel and we will try to find out more about that.

Did you manage to get the

Asger's picture

Did you manage to get the PicoPix 2055 to work ?

Thank you so much for this

Danny's picture

Thank you so much for this initiative.

Q: I tried to compile the latest code so I can use ppx2055, but get many compilation errors.

Is it possible for you to re-create the .deb packages for those who do not know how to deal with compilation process/errors? Right now I think the .deb packages are made from the older version without support for ppx2055

Thank you

Sure Danny, I will release a

ao2's picture

Sure Danny, I will release a new version of libam7xxx and update the Debian packages.

That'll take a couple of days tho, I am waiting for another user with another PicoPix model and I don't feel like doing two subsequent releases, so I am delaying a bit to try to squeeze in the support for the other projector.

If you want to go through the compilation errors you are getting, feel free to contact me by email.

Ciao, Antonio

That sounds great! I actually

Danny's picture

That sounds great!
I actually managed to compile everything. Had to add: ${FFMPEG_LIBAVFORMAT_LIBRARIES} to the target_link_libraries of am7xxx-play to build.

BUT: getting the same error both with picoproj / am7xxx-play: Picture size 0x0 is invalid

Again thanks for your work!

I take it back --- it

Danny's picture

I take it back --- it works!

I compiled and built this package: libam7xxx-bcacb67.tar.gz

Hi. I need a driver to

Marco's picture

Hi. I need a driver to connect my picopix PPX 1020 on windows 8.

I asked Philips, but they don't seem to hurry to release one.
I found your page and i have no idea how that works, i can't find any "download" button, neither any instructions to install the files on the computer.

I feel lost lol. help ! :)

Hi Marco, there are no files

ao2's picture

Hi Marco,

there are no files ready to download to have libam7xxx work on Windows, sorry, but there are instructions on how to create and use them in the README and HACKING files in libam7xxx.

I am aware of people successfully using libam7xxx on Windows8 but I couldn't try that myself, I only did some brief tests on Windows XP.

I'll put you in contact with the person who managed to get it working on Windows 8.

Ciao, Antonio

Hi, First thanks for this

Greg's picture

Hi,
First thanks for this project and time spent.
I have a Philips PPX 2330. I try Debian package v1_0.1.3-1_amd64 but when i try : am7xxx-play -f x11grab -i 0:0
I have :
scan_devices[612]: Cannot find any device to open
am7xxx_open_device: No such device

Do i need a hack like this one :
http://git.ao2.it/libam7xxx.git/commitdiff/79143dacbe050e95c7d16b14a9237...

Thanks for all

Hey Greg, support for the

ao2's picture

Hey Greg,

support for the PPX2330 is already in the git repository:

http://git.ao2.it/libam7xxx.git/commitdiff/8e0a394ab05e48d650aa2fa3d0381...

http://git.ao2.it/libam7xxx.git/commitdiff/a6d453f29c096c83c5744df693c28...

I haven't managed to do a new release with that in yet, sorry, just grab the code from git.

Remember that the native resolution of PPX2330 is 640x360, using a higher one with am7xxx-play won't work.

Let me know if the code works fine, and contact me via email if it does not.

Thanks,
Antonio

Hi, Thanks for a so fast

Greg's picture

Hi, Thanks for a so fast response and for time spent to support me.

First, i cant sent you an email, it seems there's a problem with openezx.org. If needed, this is my mail : greg (at) club38.net

As you told me, I cloned current version of code and try to build it. I have a problem with the build :

 [ 28%] Built target am7xxx
 [ 57%] Built target am7xxx-static
 [ 71%] Building C object examples/CMakeFiles/am7xxx-play.dir/am7xxx-play.c.o
 /root/libam7xxx/examples/am7xxx-play.c: In function ‘am7xxx_play’:
 /root/libam7xxx/examples/am7xxx-play.c:404:5: error: implicit declaration of function ‘avcodec_encode_video2’ [-Wimplicit-function-declaration]
 /root/libam7xxx/examples/am7xxx-play.c:404:5: error: nested extern declaration of ‘avcodec_encode_video2’ [-Werror=nested-externs]
 cc1: all warnings being treated as errors
 make[2]: *** [examples/CMakeFiles/am7xxx-play.dir/am7xxx-play.c.o] Erreur 1
 make[1]: *** [examples/CMakeFiles/am7xxx-play.dir/all] Erreur 2
 make: *** [all] Erreur 2

I checked my av libraries :

root@vaio:~/libam7xxx/build/CMakeFiles# dpkg -l | grep libav
 ii  libav-tools                              6:0.8.6-1                          amd64        Multimedia player, server, encoder and transcoder
 ii  libavcodec-dev                           6:0.8.6-1                          amd64        Development files for libavcodec
 ii  libavcodec-extra-53:amd64                6:0.8.6-1                          amd64        Libav codec library (additional codecs)
 rc  libavcodec53:amd64                       6:0.8.6-1                          amd64        Libav codec library
 ii  libavdevice-dev                          6:0.8.6-1                          amd64        Development files for libavdevice
 ii  libavdevice53:amd64                      6:0.8.6-1                          amd64        Libav device handling library
 ii  libavfilter-dev                          6:0.8.6-1                          amd64        Development files for libavfilter
 ii  libavfilter2:amd64                       6:0.8.6-1                          amd64        Libav video filtering library
 ii  alibavformat-dev                          6:0.8.6-1                          amd64        Development files for libavformat
 ii  libavformat53:amd64                      6:0.8.6-1                          amd64        Libav file format library
 ii  libavutil-dev                            6:0.8.6-1                          amd64        Development files for libavutil
 ii  libavutil51:amd64                        6:0.8.6-1                          amd64        Libav utility library

I searched for avcodec_encode_video2 in libav headers :

 ls /usr/include/libav*/* | while read file; do cat $file | grep avcodec_encode_video2; done

Nothing ... is it something missing with my versions ... I investigate.

So, as library libam7xxx was builded, i tried to replace the one i had with the Debian package and launched am7xxx-play of the Debian package.

It seemed to work fine :

 greg@vaio:~$ sudo am7xxx-play -f x11grab -i :0.0 -o video_size="640x360"

 scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2330
 [x11grab @ 0x1064860] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 640 height: 360
 [x11grab @ 0x1064860] shared memory extension  found
 [x11grab @ 0x1064860] Estimating duration from bitrate, this may be inaccurate
 Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1369003594.482490, bitrate: 442368 kb/s
    Stream #0.0: Video: rawvideo, bgra, 640x360, 442368 kb/s, 60 tbr, 1000k tbn, 60 tbc

And nothing, my picopix is showing : "Connecting PC..."

I will continue to work on my problem and any advice will be welcome !!

Yeah, in my dev environment I

ao2's picture

Yeah, in my dev environment I use a newer version of libav, so the git code is based on that.

You can use the following patch which I also apply to Debian packages when I build them:

http://git.ao2.it/libam7xxx.git/blob_plain/refs/heads/debian:/debian/pat...

I'll contact you via email for further tests.

Thanks,
Antonio

OK thanks it work like a

Greg's picture

OK thanks it work like a charmed.

Now i can compile am7xxx-play. With this version, i have the same behaviour :

 root@vaio:~/libam7xxx/build/bin# ./am7xxx-play -f x11grab -i :0.0 -o video_size="640x360" 
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2330
 [x11grab @ 0x2024860] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 640 height: 360
 [x11grab @ 0x2024860] shared memory extension  found
 [x11grab @ 0x2024860] Estimating duration from bitrate, this may be inaccurate
 Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1369039200.933737, bitrate: 442368 kb/s
    Stream #0.0: Video: rawvideo, bgra, 640x360, 442368 kb/s, 60 tbr, 1000k tbn, 60 tbc

But nothing on the PicoPix which shows "Connecting PC..."

Hi, I just installed the

Paolo's picture

Hi, I just installed the following .deb packages:

  • am7xxx_0.1.4-2_i386.deb
  • libam7xxx0.1_0.1.4-2_i386.deb
  • libam7xxx-bin_0.1.4-2_i386.deb
  • libam7xxx-dev_0.1.4-2_i386.deb
  • libam7xxx-doc_0.1.4-2_all.deb

This is the output I get:

mandrake@goldrake:~$ am7xxx-play -f x11grab -i :0.0
scan_devices: am7xxx device found, index: 0, name: Philips/Sagemcom PicoPix 2055
[x11grab @ 0x8f156a0] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1024 height: 600
[x11grab @ 0x8f156a0] shared memory extension  found
[x11grab @ 0x8f156a0] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1391437266.473287, bitrate: 1179648 kb/s
    Stream #0.0: Video: rawvideo, bgra, 1024x600, 1179648 kb/s, 60 tbr, 1000k tbn, 60 tbc

and it hangs there, but my PicoPix PPX2055 projector projects nonsense (blue-ish and purple horizontal segments).

Any help?
Thank you,
Paolo

Hi Paolo, maybe the

ao2's picture

Hi Paolo, maybe the resolution scaled from 1024x600 is not supported by the projector firmware. Can you try setting your screen to a more common resolution (800x600 or 640x480)?

You can also pass the option -o video_size=800x480 on the command line to am7xxx-play, however in this case only a portion of the screen will be displayed.

JFYI, the code from git can also set the brightness on PicoPix devices, while the 1.4 stable version does not.

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
W
q
k
c
K
Enter the code without spaces.