Is there an easily hackable open-source Tivo media server? - java

Series 2 and later Tivos have a "Music on [computername]" option under "Music, Photos & Showcases" which lets you play music that's hosted on some other machine. This option seems to appear for each computer on the local network with a compatible server running. For example, a Windows PC running Tivo Desktop can show up if configured correctly. My NAS also has support for this. Neither of these servers are as configurable as I would like, however. (And the only Windows box in our house is a laptop, so it can't really be relied on as a server since it's asleep most of the time.)
Is there an easily hackable open-source Tivo media server (or library for building one)? I need something that can run on Linux, and I'd prefer something written in Python or Java.
I mostly care about being able to serve music (mp3 files), but supporting the "Photos on [computername]" thing would be a nice bonus.

I've never done this, but there's a package called pyTiVo which claims to serve videos, music, and photos. (Here's a blog post of how someone set it up in an old version of Ubuntu.)

There is JavaHMO which is GPL. I haven't used it in ages but it should be worth investigating.
Updated:
Just after writing that I see that JavaHMO is now Galleon.

Take a look at HME/VLC Video Streamer. It's cross-platform Python and GPL 2.1 licensed. Pretty easy to set up.

Related

Is it possible to record audio from client to server in PHP- or JAVA-based online web application?

I am building an online web application which offers clients to test their language skills.
The application consists of series of different test the clients can freely do. One of these tests is one where the client sees a sentence on the web-page and then is required to speak the sentence to a microphone. The idea would be to record the audio stream, send it to server and save it there to a file.
Is this possible using PHP, Java, or something similar to them?
Thank you for any help :)
I know you asked for PHP, I'm guessing that's your language of choice, but have you considered using html5 to record your audio? Note: browser support is still lacking but it might be worth looking into depending on your requirements.
Check out this tutorial; it uses the GETUSERMEDIA API to access you camera and microphone hardware.
Update: Here is another good tutorial on the subject.
The only realistic solutions for solving the problem are with flash, as suggested by another answer, or a java applet. In a year or two that will hopefully change and you'll be able to use javascript and HTML5, but this is now.
I would say this is a problem better and more easily solved with flash, but for java, You need to write a java applet to do the recording. Here are some hints to get you started:
http://docs.oracle.com/javase/tutorial/deployment/applet/
http://www.java2s.com/Tutorial/Java/0120__Development/CapturingAudiowithJavaSoundAPI.htm
http://www.jsresources.org/
You do not need java speech API or JMF, just java sound. You might WANT JMF to compress the audio file to make uploading go faster, but you can get this working without. Note that you may need to "sign" your applet in order to record audio in a browser.
If you are averse to flash, you could also use haxe to write your flash code.
Not 100% what you're looking for but I think it'll at least give you some ideas.
How to record streaming audio to the server
It is possible to solve this problem using Flash and Java both. You can use Flash component to record sound and send it in chunks to server side which can be implemented using java.
Pros to create sound recorder in Flash are many.
Flash is widely installed plugin in Browser
Java Applet gives warning before running it which many times turns off users.
Numerically checked, most media applications are created using Flash thereby providing you nice support.
Java Applets are used where thick client has to fit into browser and must also be secure. You will still find many real time treading applications are written in java applets.
Here are couple of tutorials to create Sound Recorder in Flash
http://active.tutsplus.com/tutorials/actionscript/create-a-useful-audio-recorder-app-in-actionscript-3/
Adobe record sound and save
This collected stream of sound can be stored in chunks on client side and can be synced with backend server(any server side language shall be fine.).
Implementing your server in Java has advantage. If tomorrow need arises, you can stream the same sound using Red5 server which is implemented in Java.
See more here: http://www.red5.org/
There is an audio recording SDK for this which is written in PHP, Flash and HTML5. http://recordmp3online.com
I am actually the author of that SDK (full disclosure)

Cross Platform ~2GB File Upload Solution

I'm looking for a technology that can be used to upload large (~2GB) files from both Windows and Mac OSX machines. It should be possible to pause and resume uploads on request/error. The final artefact should be easily installed by a user with basic computer skills.
I'm thinking of using Adobe AIR as it's quite ubiquitous, so installing should be easy although I'm not sure that AIR would provide the power that we're after. Another option would be a Java app, which I believe would provide more choice in terms which upload protocols (HTTP/WebDAV/etc).
Does AIR have the power to handle such large file sizes and could it pause and resume? Would Java be better, as I could chunk the files more easily? Is there another solution that I've not thought of? Any input would be greatly appreciated!
Please don't suggest using a service like YouSendIt, DropBox, etc. I need a custom, branded solution that can be integrated with a CMS for the uploaded files.
Thanks!
Darren.
You can use the Apache FileUpload library which I've tested uploading about 4gigs to, and it didn't have any problems.
If you want more control I would advise an applet - more control and you still have the advantage of not having to install on the clients computer.

Online App to Rip Discs to ISO/DMG

I've been thinking a lot lately about how cool it would be to have a website that allows a user to insert a disc into their drive and click a button to begin a ripping process. After the rip is complete, it would upload to a server and be hosted there. Ideally, the process would be seamless for both DVDs and CDs and work cross platform.
My question is for the developers here - what recommendations do you have on approaching this situation? Does it seem feasible? Is it something that would require a flex app, java? Can the user get away with doing this in their browser only, without having to download any software? I'd also like to make sure that if the upload disconnects during the uploading process, the user can log back in and resume the upload where it failed.
I found some software that kind of achieves what I'm looking to do, but it is downloaded and is windows only as it relies on some .dll files to complete the process. I can show you this software if it would help?
For the record, the DVDs and CDs uploaded would need to be legally owned and the uploader must have the copyright, so don't think I'm getting into any infringement or illegality issues.
Thanks for the insight!
Browsers are not the best way to upload ISOs of CD/DVD. Basically, it's like asking a user to rip the CD with UltraISO and "manually" upload the file in a Web Form.
The only way to achieve your result is definitely to create an executable application, and/or a Java/.NET applet (I don't remember if/how Mono supports .NET controls on Firefox). But the executable is the basic way. You must then use a portable framework like Java or .NET/Mono which work on Windows, Mac and Linux.
In order to avoid dependencies, you must also ship the package with all the ISO-ripping libraries needed. I don't think there is a single managed-code library to rip CDs, so you need some OS help. You program should differentiate between OSes: in Linux and Mac, use dd (lots of tutorials), in Windows use NeroAPI or an open source ripper.
Once the ISO is created on a temp folder, just open it as a stream and upload via socket. I suggest not to use HTTP but FTP instead, then!
A 1-click solution is feasible, but forget the browser

Java VNC Applet vs Screen Capture

I am trying to make an application in which one component captures the screen of the user (for screen casting). I am aware that there are two options to achieve the same using a Java applet (please correct me if I am wrong). First is to use the java applet to take screen shots continuously and convert it into a video and upload it as a video file. And second is to create a java vnc server and record it as a .fbs file and play it using a player like: http://www.wizhelp.com/flashlight-vnc/index.html
I would like to know the best solution in terms of video quality, file size, cross-platform compatibility (windows and mac), firewall problems and finally ease of implementation.
I am very new to Java. Please tell me whats the best solution for my problem. Also, is it easy enough for me to program it on my own or should I get it developed via a freelancer. I have tons of programming experience (5+ years in LAMP) but none in Java.
Thank you very much.
I agree that this is pretty hard. I implemented those two solutions (VNC and onboard screen capture) plus a third (capture from an external VGA source via an Epiphan grabber) for a former employer. I had the best bandwidth-to-quality ratio with VNC, but I got higher framerate with VGA capture. In all three cases, I reduced the frames + capture times to PNGs and sequenced them in a QuickTime reference movie. Then I made flattened video (MPEG4 or SWF) of the results. In my case, I then synchronized the screen video with a DV stream.
In the end the technology worked (see a sample of the output) but our business model failed.
From what I know, the older versions of applet had security restrictions that may not allow for screen capture. Instead, a java application may be feasible.
Regarding the build-it-yourself vs the fire-a-coder, it depends on how you value your time compared to what you can find on a freelancer site.
I think you can find someone from India/Romania/Poland/Other countries that can make it for an affordable price
Given your Java knowledge and the difficulty of the task, have you considered taking an alternative approach? For example, how about a native VNC server for the end-user, which is just a small download and then they click "Run." And that native server is programmed to capture the screen and send it straight to your web server, which has a client like vnc2swf or other means of converting the VNC stream to a video or .fbs file? Does all that make sense?
Admittedly, without Java, you have to prepare one executable program per platform you want to support, however, I don't know. That still sounds easier to me. Consider Copilot.com. They are doing VNC but they still use small native apps for each platform.
Sorry but this seems the kind of job that requires a lot of experience. Even if you find code snippets all around the net to fix this and that, the overall result may be way worse than simply hiring an experienced Java programmer.

Large File Download

Internet Explorer has a file download limit of 4GB (2 GB on IE6). Firefox does not have this problem (haven't tested safari yet)
(More info here: http://support.microsoft.com/kb/298618)
I am working on a site that will allow the user to download very large files (up to and exceeding 100GB)
What is the best way to do this without using FTP. The end user must be able to download the file from there browser using HTTP. I don't think Flash or Silverlight can save files to the client so as far as I know they won't cut it.
I'm guessing we will need an ActiveX or Java applet to pull this off. Something like the download manager that MSDN uses.
Does anyone know of a commercial (or free) component that will do that? We do not want the user to have to install a "browser wide" download manager (like GetRight), we want it to only work with downloading on our site.
Update: Here is some additional info to help clarify what I'm trying to do. Most of the files above the 4GB limit would be large HD video files (its for a video editing company). These will be downloaded by users across the internet, this isn't going to be people on a local network. We want the files to be available via HTTP (some users are going to be behind firewalls that aren't going to allow FTP, Bittorrent, etc.). The will be a library of files the end user could download, so we aren't talking about a one time large download. The will be download different large files on a semi-regular basis.
So far Vault that #Edmund-Tay suggested is the closest solution. The only problem is that it doesn't work for files larger than 4GB (it instantly fails before starting the download, they are probably using a 32bit integer somewhere which is exceeded/overflown by the content length of the file).
The best solution would be a java applet or ActiveX component, since the problem only exist in IE, that would work like the article #spoulson linked to. However, so far I haven't had any luck finding a solution that does anything like that (multipart downloads, resume, etc.).
It looks like we might have to write our own. Another option would be to write a .Net application (maybe ClickOnce) that is associated with an extension or mime type. Then the user would actually be downloading a small file from the web server that opens in the exe/ClickOnce app that tells the application what file to download. That is how the MSDN downloader works. The end user would then only have to download/install an EXE once. That would be better than downloading an exe every time they wanted to download a large file.
#levand:
My actual preference, as a user, in these situations is to download a lightweight .exe file that downloads the file for you.
That's a dealbreaker for many, many sites. Users either are or should be extremely reluctant to download .exe files from websites and run them willy-nilly. Even if they're not always that cautious, incautious behaviour is not something we should encourage as responsible developers.
If you're working on something along the lines of a company intranet, a .exe is potentially an okay solution, but for the public web? No way.
#TonyB:
What is the best way to do this without using FTP.
I'm sorry, but I have to ask why the requirement. Your question reads to me along the lines of "what's the best way to cook a steak without any meat or heat source?" FTP was designed for this sort of thing.
bittorrent?
There have been a few web-based versions already (bitlet, w3btorrent), and Azureus was built using java, so it's definitely possible.
Edit: #TonyB is it limited to port 80?
Please don't use ActiveX... I am so sick of sites that are only viewable in IE.
My actual preference, as a user, in these situations is to download a lightweight .exe file that downloads the file for you.
Can you split the files into pieces and then rejoin them after the download?
If you don't want to write java code in-house, there are commercial applet solutions available:
Vault
MyDownloder
Both of them have eval versions that you can download and test.
A few ideas:
Blizzard use a light-weight .exe BitTorrent wrapper for their patches. I'm not entirely sure how it is done, but it looks like a branded version of the official BitTorrent client.
Upload to Amazon S3, provide the torrent link of the file (all S3 files are automatically BitTorrent-enabled), plus the full HTTP download link as alternative. See S3 documentation
What about saying "We recommend that you install Free Download Manager to download this file. You will have the added benefit of being able to resume the file and accelerate the download."
Personally I never download anything using the built in browser download tool unless I have to (e.g. Gmail attachments)
#travis
Unfortunately It has to be over HTTP inside the users browser.
I'll update the question to be more clear about that.
#levand
The problem only exist in IE (it works in Firefox) so while ActiveX would only work on IE, IE is the only one we need the work around for.
#travis - interesting idea. Not sure if it will work for what I need but I'll keep it in mind. I'm hoping to find something to integrate with the existing site instead of having to go out to a third party. It would also require me to setup a bittorrent tracker which wouldn't be as easy as it sounds for this application because different users will have different access to different files.
#jjnguy
I'm looking for a java applet or ActiveX component that will do that for me. These are non-technical users so we really just want to have them click download and the full file ends up in the specified location
#ceejayoz
I totally agree but its part of the requirement for our client. There will be FTP access but each user will have the option of downloading via HTTP or FTP. There are some users that will be behind corporate firewalls that don't permit FTP
I have seen other sites do this in the past (MSDN, Adobe) so I was hoping there is something out there already instead of having to make one in house (and learning java and/or ActiveX)
I say click-once installed download manager, similar to msdn.
But becoming a CDN without a more optimized protocol for the job is no easy task. I can't imagine a business model that can be worthwhile enough to have such large file downloads as a core competency unless you are doing something like msdn. If you create a thick client, you at least get the chance to get some more face time with the users, for advertising or some other revenue model, since you will probably be paying in the hundreds of thousands of dollars to host such a service.
The problem with the applet approach mentioned is that unless you have the end user modify their java security properties your applet will not have permission to save to the hard drive.
It may be possible using Java Web Start (aka JNLP). I think that if it is a signed app it can get the extra permission to write to the hard drive. This is not too different from the download an exe approach. The problem with this is that the user has to have the correct version of Java installed and has to have the Java Web Start capability setup correctly.
I would recommend the exe approach as it will be the easiest for the non-technical users to use.
There are some users that will be behind corporate firewalls that don't permit FTP...
Are users with restrictive firewalls like that likely to be permitted to install and run a .exe file from your website?
Take a look at cURL. This article describes how to do a multi-part simultaneous download via HTTP. I've used cURL in the past to manage FTP downloads of files over 300GB.
Another tip: You can boost download times even more if you increase the size of the TCP Window on the client's NIC configuration. Set it as high as the OS allows and you should see up to 2x improvement depending on your physical network. This worked for me on Windows 2000 and 2003 when FTPing over a WAN. The down side is it may increase overhead for all other network traffic that wants only a few KB for a network packet, but is now forced to send/recv in 64KB packets. Your mileage may vary.
Edit: What exactly is this you're trying to accomplish? Who is the audience? I'm assumed for a bit that you're looking to do this over your own network; but you seem to imply the client side is someone on the internet. I think we need clearer requirements.
Create a folder of files to be downloaded on the server where the document service is running (either using Linux commands or using java to execute shell commands)
Write the file to be downloaded to this folder (using Linux command or Java shell command is OK). Considering the efficiency of program execution, WGet command is used here
Package the downloaded folder as a zip file (using shell command), configure nginx agent, return the access file path of nginx to the front end, and then download from the front end.

Categories