[7. June 2013] Youporn available now | [19. April 2013] A-400 Advanced Network Setup | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 RC1 [13 June 2013] | A-200/A-210 RC1 [13 June 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
[200] Airplay server for C200 and A100
01-02-2011, 08:44 PM (This post was last modified: 01-28-2011 11:54 PM by popcornmix.)
Post: #1
Airplay server for C200 and A100
Here is a youtube link of the Airplay server running on Popcorn Hour C200.

This follows on from discussion here and the original work done by gek.

I've created a googlecode project here

Now can be installed with CSI. See here: http://www.networkedmediatank.com/showth...?tid=33465

It is now in the default repositories, so just select Airplay-nmt to install.

airplay-nmt for Popcorn Hour

Now can be installed with CSI. See here:
http://www.networkedmediatank.com/showth...?tid=33465

It should advertise a bonjour airplay service called NMT.
You should then be able to play a video in standard video player app on iPhone/iPhone/iPad (requires iOS 4.2.1) and select NMT from the airplay menu.

Consider this beta. It may or may not work.
This has been tested on a C200 and A110. I imagine it will work on a A200/A210, and A100.
It uses TheDavidBox API on C200 type devices, and /tmp/gaya_bc on A100 type devices. It may work on other NMTs if they support these interfaces.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 11 users say Thank You to popcornmix for this post
01-02-2011, 09:27 PM
Post: #2
RE: Airplay server for C200
Nice progress!

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to dc11ab for this post
01-03-2011, 08:16 AM
Post: #3
RE: Airplay server for C200
Can't wait to test it!

Well done !

Media Player: Popcorn Hour A-210
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 04:52 AM
Post: #4
RE: Airplay server for C200
Great work! Will give it a go later tonight or tomorrow. Have you tried streaming from iTunes directly?
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 10:30 AM
Post: #5
RE: Airplay server for C200
I've just tried it. Streaming Videos and displaying photos from my iPod touch 2nd generation on my C-200 works very nice. Streaming from iTunes doesn't work unfortunately. According to the output, the server recognises the video (which is DRM free btw.), but apparently fails to play it. The screen goes black for a moment and then I see the menu again.

Media Player: Popcorn Hour C-200 (with Samsung SpinPoint HM500JI, Lite-On iHOS104-37 and Alpha WMP-ND02 WLAN-Module)
TV: Grundig Vivance 32 LXW 82-6710 REF
Receiver: Topfield 5000 PVRt (with 160 GB HD)
Sound: LG FB162-DOU
NAS: Netgear ReadyNAS NVX RNDX400E
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 10:35 AM
Post: #6
RE: Airplay server for C200
And can we stream music from the iPhone?

Media Player: Popcorn Hour A-210
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 10:43 AM
Post: #7
RE: Airplay server for C200
I didn't even try because of the notes in the README file:

Quote:Works:
Video playback (tried up to 720p). Pause/play. Seeking. Progress bar.
Photos. Note you need to press SOURCE on remote and select flash mode. Not sure how to put NMT in this mode myself.

Will not do:
Audio (AirTunes). Uses a completely different scheme that noone has reverse engineered.
DRM protected iTunes videos.

Media Player: Popcorn Hour C-200 (with Samsung SpinPoint HM500JI, Lite-On iHOS104-37 and Alpha WMP-ND02 WLAN-Module)
TV: Grundig Vivance 32 LXW 82-6710 REF
Receiver: Topfield 5000 PVRt (with 160 GB HD)
Sound: LG FB162-DOU
NAS: Netgear ReadyNAS NVX RNDX400E
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 10:48 AM
Post: #8
RE: Airplay server for C200
(01-04-2011 10:43 AM)-Coco- Wrote:  I didn't even try because of the notes in the README file:


Ok Sad

Media Player: Popcorn Hour A-210
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 01:27 PM (This post was last modified: 01-04-2011 01:34 PM by popcornmix.)
Post: #9
RE: Airplay server for C200
iTunes with DRM is in the "never" category.
iTunes without DRM is in the "not now" category.

iPhone returns a "501 Not Implemented" to http HEAD requests. NMT player tolerates this on a C200 (not on HDX and possibly A100) and continues with the GET request and plays the file.
iTunes returns a "400 Bad Request" to http HEAD requests. NMT player does not tolerate this on a C200 and refuses to play the file. Gek's proxy could help fix this.

Would be nice if C200 treated 400 and 501 responses the same way (would also be nice if iPhone and iTunes were consistent). However a workaround would be to have a proxy that sits in between and rewrites the HTTP responses. I believe Apache can be configured to do this, but I'm no expert. If anyone knows how to do this I'd be very interested.
Another request. I play photos with a request like:
http://<popcorn IP>:8008/playback?arg0=start_pod&arg1=My-Test-Photo&arg2=http://jquery.com/demo/thickbox-3/images/plant1.jpg&arg3=1&arg4=rot0&arg5=bghide

which doesn't display the photo immediately. You still need to press source button and switch to app mode.
The equivalent video playback command does not require this.

Anyone know how to switch to app mode programmatically? E.g. from a http request, as a shell command or from C code?
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 02:26 PM
Post: #10
RE: Airplay server for C200
I made a basic CSI package of the rev3.

It starts, but I have not found a way to actually test it since I only have non-jailbroken iPhone 3G. Should it be visible from iTunes on my Mac somehow?

Anyway; please test, I'll repackage if needed.
Temporary location: http://www.cerveras.es/feed/Airplay-nmt.zip
(Download, open CSI; menu -> File -> Install from file)

Popcornmix, gek please incorporate it to the googlecode repo if you are happy with it.
The daemon.sh is quite crude and web interface could use a facelift, so the CSI package files should probably reside in trunk too ;-)

If anyone else wishes to maintains this package, remember to use the default /bin/tar cvf (...) on the NMT to create the CSI tar file.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to dc11ab for this post
01-04-2011, 02:35 PM
Post: #11
RE: Airplay server for C200
(01-04-2011 02:26 PM)dc11ab Wrote:  It starts, but I have not found a way to actually test it since I only have non-jailbroken iPhone 3G.

Doesn't matter. My iPod touch isn't jailbroken as well and it still works. Just start the airplay server on the NMT, open a video on your iPhone and tap the symbol right of the forward button. Then select NMT and voilà - video plays on the NMT.

Media Player: Popcorn Hour C-200 (with Samsung SpinPoint HM500JI, Lite-On iHOS104-37 and Alpha WMP-ND02 WLAN-Module)
TV: Grundig Vivance 32 LXW 82-6710 REF
Receiver: Topfield 5000 PVRt (with 160 GB HD)
Sound: LG FB162-DOU
NAS: Netgear ReadyNAS NVX RNDX400E
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 02:37 PM (This post was last modified: 01-04-2011 03:11 PM by popcornmix.)
Post: #12
RE: Airplay server for C200
(01-04-2011 02:26 PM)dc11ab Wrote:  It starts, but I have not found a way to actually test it since I only have non-jailbroken iPhone 3G. Should it be visible from iTunes on my Mac somehow?

Yes. iTunes (latest version) on Mac should see the device. Play a video, and there should be an airplay icon which should have "NMT" as a target. It won't succeed in playing (yet).
(01-04-2011 02:26 PM)dc11ab Wrote:  Popcornmix, gek please incorporate it to the googlecode repo if you are happy with it.
The daemon.sh is quite crude and web interface could use a facelift, so the CSI package files should probably reside in trunk too ;-)

I see a problem. The line:
/nmt/apps/server/mDNSrespd-mips -b -n NMT -t _airplay._tcp -x deviceid=FF:FF:FF:FF:FF:FF#features=0x7#model=AppleTV2,1 -p 6000 -b

needs to have \001 characters between the txt records (where I've inserted #). Your version has lost these. I inserted these into my script with a hex editor which I accept is a nasty hack. I'm sure there is a nicer linux shell way of inserting these codes.

Your version won't work with iTunes (iTunes cares about the txt records - iPhone does not).
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to popcornmix for this post
01-04-2011, 03:54 PM
Post: #13
RE: Airplay server for C200
I knew I was going to find it:

echo $((#001))

Tongue

follow me @gekort for updates in the nmt airplay daemin
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 03:59 PM (This post was last modified: 01-04-2011 04:15 PM by popcornmix.)
Post: #14
RE: Airplay server for C200
(01-04-2011 03:54 PM)gek Wrote:  I knew I was going to find it:

echo $((#001))

Tongue

Didn't work for me:

sh-3.00# echo $((#001))
sh: #001: syntax error: operand expected (error token is "#001")
This seems to work:
echo Hello`echo -ne "\x1"`world

So I guess:
/nmt/apps/server/mDNSrespd-mips -b -n NMT -t _airplay._tcp -x deviceid=FF:FF:FF:FF:FF:FF`echo -ne "\x1"`features=0x7`echo -ne "\x1"`model=AppleTV2,1 -p 6000 -b

would also.
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 04:23 PM
Post: #15
RE: Airplay server for C200
(01-04-2011 02:37 PM)popcornmix Wrote:  I see a problem. The line:
/nmt/apps/server/mDNSrespd-mips -b -n NMT -t _airplay._tcp -x deviceid=FF:FF:FF:FF:FF:FF#features=0x7#model=AppleTV2,1 -p 6000 -b

needs to have \001 characters between the txt records (where I've inserted #). Your version has lost these. I inserted these into my script with a hex editor which I accept is a nasty hack. I'm sure there is a nicer linux shell way of inserting these codes.

Thank's for spotting that. After trying numerous combinations like ctrl+@ etc. in nano and vi I gave up and used a hex editor too. After opening the daemon.sh in nano again I saw it just printed ^A ...
Hexdump shows there's a 01, so I updated the CSI package, please give it a try again!

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [200] [util] openvpn - C200/A200 - via ipkg xray 20 7,313 06-12-2013 04:37 AM
Last Post: Penfold
  [200/300] Logitech Media Server v7.7.1 vaidyasr 60 13,411 06-07-2013 01:45 AM
Last Post: erep
  Is there a FTP CLIENT i can install on my C200? parpagnas 0 305 05-19-2013 12:45 PM
Last Post: parpagnas
  [100/200/300/400] How to install remote syslog server on NMT A-200 jwalczak 0 378 05-10-2013 05:00 PM
Last Post: jwalczak
  [200] Airplay with A-210 fischgourmet 1 396 03-11-2013 12:12 PM
Last Post: fischgourmet
  [400] how to convert scripts from c200 (html+php) to a400 (javascript or bash or ???) ? dmhwsm 0 541 02-10-2013 05:39 PM
Last Post: dmhwsm
  [100/200/300/400] fuppes - v0.660 UPnP A/V Media Server - Updated 15th Dec vaidyasr 14 5,043 01-01-2013 03:55 AM
Last Post: Uisge
  [200] Using PopcornHour C200 as frontend for MythTV/MythWeb schaumburg 13 7,062 01-01-2013 01:02 AM
Last Post: flitter
  [200] Compiling SqueezeSlave for C200 papaiannis 15 3,802 12-21-2012 04:54 PM
Last Post: papaiannis
  [100/200/300/400] List of UPnP/DLNA Server Applications - For NMT vaidyasr 0 1,197 12-10-2012 08:37 AM
Last Post: vaidyasr

Forum Jump: