|
At the crossroad of New media, Engineering, Research and Development
|
|
Archive for ‘Opensource’ Category
Nov
03
2011
Stream your Windows desktop using ffmpegI’ve already covered how to do this with vlc a while back in parts 1 followed by part 2. I just found out that something very similar in results can be done with ffmpeg. ffmpeg has recently added support for directshow filters which now allows one to capture the screen and stream and/or save it. Here is how you can do this: 1.) Grab a copy of the Screen Capture DirectShow source filter from Unreal Streaming Technologies. It’s about half way down that page. They have both the UScreenCapture X86 Edition and the X64 Edition (depending on your OS installation). I used the 64 bit filter on a Windows 7 64 bit installation. 2.) Install the filter and make sure you make the following changes to your windows registry using regedit. The default frame rate for UScreenCapture filter is 10 f/s and we need to boost this to 30 frames/sec. You need to find the key HKLM\SOFTWARE\UNREAL\Live\UScreenCapture and insert a DWORD value of 30 for FrameRate (You have to create FrameRate, it does not exist by default). Once you’ve done the registry tweak, reboot. 3.) Install the latest greatest version of ffmpeg for your windows version from Zeranoe. I grabbed the 64 bit Static build since I didn’t want to deal with libraries and such. Extract it and stick it somewhere on your hard drive. Remember the path to this folder since we will need it later. 4.) Open a command line window and cd to the directory where you extracted ffmpeg into, find the bin directory and cd into it. This is were the ffmpeg executable resides. In my case (I extracted the ffmpeg files into “Program Files” directory) it is C:\Program Files\ffmpeg-git-059707e-win64-static\bin. 5.) If you’ve made it this far, hand in there, we’re almost home. Now you need to issue the command that gets the screen streaming going. But first we need to find out the name of the Screen filter device. So issue the following command:
In the output look for a device called “UScreenCapture“. Hopefully if everything is working with the directshow filter you have a entry in the list. That’s the name of our device that we need to pass onto ffmpeg. While you’re there also look for your audio device entry as well. Mine was the truncated word “Stereo Mix (Realtek High Defini” (Yes mine was missing the end of that line). Jot that down somewhere as well. I will show you how to get audio going as well. 6.) So first step is to get video going. Assuming you have a “UScreenCapture” device (You could use another directshow filter if you like, this will work with most of them. I just used the Unreal filter for the heck of it), here is the command to start encoding and sending video:
7.) On the receiving machine you should be able to use vlc, ffmpeg or mplayer to catch the stream. In vlc simply open the Network stream rtp://@:6666 , in ffmpeg you can use the command ffplay -i udp://:6666 or using mplayer you can issue the command mplayer -framedrop -double udp://:6666 . 8.) Now to optionally add sound to the whole thing we can use this command on the encoding machine (instead of step 6). You need to know the device name for your sound card and you probably want to turn the volume down (at least initially) on the decoding machine.
Feb
05
2010
Movist…..will it be the next VLC for mac….The answer to that is maybe, we’ll see. But all that aside if you’re interested in a minimalistic video player that can handle more codecs than VLC and is generally faster then give Movist a try. The unique thing about the player is that it allows you to switch codec engines between ffmpeg and quicktime based on file extensions. Oh and did I say it’s FREE aswell :-).
Jan
14
2010
OpenShot Video Editor 1.0 released…..iMovie for Linux is here.For those of you who don’t know OpenShot Video Editor(TM) is an open-source program that creates, modifies, and edits video files. OpenShot provides extensive editing and compositing features, and has been designed as a practical tool for working with high-definition video including HDV and AVCHD. Jonathan Thomas and crew have reached their 1.0 milestone (congrats :-)). The program is rock solid and is running beautifully on my Ubuntu 9.10 installation. OpenShot’s Features include:
There are 4 ways to install OpenShot: LiveDVD, PPA, DEB Installer, and the Build Wizard. Grab it here.
Oct
23
2009
Ninite: Number 1 application you need in Windows…..There are a lot of fantastic free software packages out there for the PC if you’re running windows. VLC, Firefox come to mind. The problem is that it takes a long time to install all of them on your PC. You know the routine, click, wait for download, double click, next, next, next, etc……Well, why? Head over to Ninite’s website, choose the applications you want and let them create a custom “Meta Installer” for all the applications in one package. Run the installer and wham, you got all those free/opensource apps downloaded and installed on your machine in one shot, with minimal clickage :-). No sign-up required, Free for personal use, Just in time for Windows 7 Upgrade (or potentially downgrade). Now if only someone would make something like this on OSX, so I can install Final Cut Pro Studio without having grass grow under my seat, that would be nice :-). Sep
09
2009
TechPosters: Technical Posters and Cheat Sheets for the NERD in you…..Title says it all…..head over to TechPosters (kinda slow right now) and snag your favourite cheat sheet/reference card. There are also more of this kinda stuff over at Cheat-Sheets.org as well. Yep, those crazy open source hackers over at dvinfo.net have done it again. You thought the RED camera brought about a revolution in dcinema, well, you ain’t seen nothing yet. Apertus is using the Elphel 353, free software and open hardware camera. The Elphel Camera which this entire project is based on is basically an excellent security camera that can do some real magic. The camera uses an Aptina CMOS bayer-pattern sensor with an optical format of 1/2.5″ (5.70mm x 4.28mm) and a native resolution of 2592×1944 (5 Megapixels). It features a 12 bit ADC and supports: region of interest, on-chip binning and decimation. Aptina claims that the chip has 70db of dynamic range at full resolution and 76db when using 2×2 binning. The camera has a standard C-mount but ships with an adapter ring that allows to mount CS-lenses as well. The recording resolution can be freely adjusted to anything starting from 16×16 to 2592×1944 in 16 pixel steps. This includes Apertus AMAX (2224×1251), Apertus CIMAX (2592×1120), 2K (2048 × 1536), Full HD (1920×1080), HD (1280×720) and of course all lower resolution SD formats like DV PAL, DV NTSC, etc.
The lower the resolution the higher the maximal possible framerate. At the full sensor size (5 million pixels or 5 Megapixels) the maximal frame rate is 10 fps in normal color mode and 15 fps in JP4 RAW mode. JP4 achieves higher framerates in general as some camera internal calculations are skipped and need to be applied later in postproduction (like debayering/demosaicing). The RAW recording mode in Apertus is called JP4 RAW. Because certain in-camera compression steps can be skipped JP4 RAW allows higher recording speed resulting in more fps. JP4 RAW requires postprocessing (DNG Converter) but in return offers the highest possible image quality. The following connectors are available on the camera body:
The camera also supports the following recording media:
And if that’s not enough for you there is a extra bonus that comes from the ability of the camera to shoot Full HD in portrait (upright) mode. Upright screens are basically 1080p screens mounted sideways (portrait mode). This type of mounting is becoming increasingly more popular for events, exhibitions and advertising. If you want to spare yourself the hassle of building a right to mount the camera 90 degrees rotated you can whip out your Apertus rig and just start recording. This will give you a 1088×1020 image that’s ready for portrait playback. Jun
19
2009
Step-by-step instructions to get Cacti installed on Ubuntu 9.04 (Jaunty Jackalope) Desktop EditionSo after yesterdays rant, I went back and figured out how to install the Cacti monitoring software (OSS, Free) onto a Ubuntu 9.04 “Jaunty Jackalope” Desktop installation. This guide uses packages only, no compiling, no Makefiles or anything like that…..You should be able to just follow this and get a fully functioning Cacti installation in about 30 minutes. Here are the steps:
The USB-powered Beagle Board is a low-cost, fan-less single board computer utilizing Texas Instruments’ OMAP3530 application processor that unleashes laptop-like performance and expansion without the bulk, expense, or noise of typical desktop machines. Beagle Board is based on an OMAP3530 application processor featuring an ARM® Cortex™-A8 running at up to 600MHz and delivering over 1,200 Dhrystone MIPS of performance via superscalar operation with highly accurate branch prediction and 256KB of L2 cache. Focal to Beagle Board experience is the high-speed USB 2.0 on-the-go (OTG) port that can be utilized to provide power to the board or to deliver highly flexible expansion. Standard PC peripherals can be connected to Beagle Board using the USB with a mini-A to standard-A cable adapter, DVI-D using an HDMI to DVI-D adapter, or through the MMC/SD/SDIO connector enabling a complete desktop experience. The picture below should give you a good idea of it’s size beside the tiny Pico Projector. Hardware Specifications are as follows:
Looks very nice and complete, a good alternative to Gumstix Avero stuff we covered earlier . And did I mention it’s only $149. Perfect for your next project. Not too sure, but the Zoom OMAP34x-II Mobile Development Platform looks too “finished/flashy” to be a Mobile Development Platform (MDP). I guess time will tell……For now we can all drool over the pics….and btw, if you have $1150, you can beat the crowd and own one today. Out of the box features of the Zoom OMAP34x-II MDP :
The DLP Pico projector is a interesting critter. It is literally tiny. The above picture gives you an idea of it’s size compared to the power adapter. You can pick one up for about $350 at Digi-Key.com ’s online store. The tech specs for this little guy are:
Wow, this little guy is cool. Check out Surveyor Corporation’s Open Source Wireless Mobile Robot . Very neat little package for just $475. While there, you might also want to check out YARB 1.0 (Yet Another Robotic Blimp) robot, also pretty neat. Here is a bit of a description according to their site: Designed for research, education, and exploration, Surveyor’s SRV-1 internet-controlled robot integrates a 1000MIPS 500MHz Analog Devices Blackfin BF537 processor, a digital video camera with resolution from 160×128 to 1280×1024 pixels, laser pointer ranging, and WLAN 802.11b/g networking on a quad-motor tracked mobile robotic base. Features
Hardware
Software
Yeah, now I know what I’ll be doing with my next 500 bucks :-).
May
23
2009
Build your own smartphone…..from scratch.Yep, you can do it now…..The open source hacker community GizmoForYou is shipping a Linux hardware/software kit for building a modular touchscreen smartphone. Using the OMAP35x-based Gumstix Overo Earth single-board computer (SBC), the Flow phone offers numerous customization modules including GPS, 3.5G cellular, Bluetooth, WiFi, and a camera. At around $1300 for the complete kitchen sink version, it’s not exactly cheap, but since they offer multiple choices for each component, you can pick and choose what you like to have inside your smartphone. Really neat stuff. For those of you who are not tuned into Gumstix, the Overo line is a new line of Computer-on-Module devices designed by Gumstix based on TI’s OMAP Processor. Overo Earth comes with the following specs: Processor: OMAP 3503 Application Processor with ARM Cortex-A8 CPU
Connections:
Size: 17mm x 58mm x 4.2mm (0.67 in. x 2.28 in. 0.16 in.) The core of the Flow phone is the Flow motherboard, which is designed to integrate the separately available Overo Earth module. You can also use the more expensive Overo Water, Air or Fire modules. Other modules attach to the motherboard, including a 3.7-inch 640 x 480 Sharp LS037V7DW01 touchscreen LCD and Flow Sharp LCD module. Connectivity modules include GPS, USB, and a choice between a plain GSM cellular module and a HSDPA-ready 3.5G/GPS/GSM/GPRS module. (WiFi and Bluetooth are already supplied by the Overo SBC.) Additional options include a 1GB MicroSD card, camera, power supply, battery, and enclosure, with various options available on several of the modules. Flow motherboard features include:
GizmoForYou does not say much about software, but there are a growing number of Linux development platforms supporting the Overo Earth and OMAP35x platforms, and according to a project member, the group is working on an Android implementation. May
23
2009
How to mount your Journalized HFS+ disk in Linux….This is something that people who deal with OSX and Linux come across everyday. Yes you can format your USB stick or removable HD using FAT32. The problem is that FAT32 does not support large sized files which can cause problems. So how do you solve this…..Easy. Attach the Journalized HFS+ disk to your MAC and startup disk utility. Inside disk utility find the disk in question and click on the partition(s) while holding down the “ALT” key. Keep holding the key down and go to the File menu and choose “Disable Journaling” (command-J). Eject the disk, move it over to your linux machine and hook it up. Linux can now read and write to the disk. Once you’re done, move the disk back to the apple machine and after selecting it in disk utility click on “Enable Journaling” button. Done. May
20
2009
Single command Ubuntu LAMP stack installation on Desktop Edition…..This used to be a pain in the butt. Lots of manual apt-get lines and config edits to get it to work. Weŕe talking about installing the LAMP stack onto a preexisting Ubuntu Desktop Edition installation. I used to do this backwards in the old days by installing the Server edition first (with LAMP) and then getting the graphical desktop goodies installed on top of that. That method still works, but I found out that LAMP stack install on a Desktop edition is a simple one command affair. As of the 7.04 release, the Ubuntu base system includes Tasksel. You can install LAMP using tasksel. Heard of Moblin yet….Intel’s foray into designing a Linux distro. Moblin is an open source project focused on building a Linux-based platform optimized for the next generation of mobile devices including Netbooks, Mobile Internet Devices, and In-vehicle infotainment systems. I came across the promo video below and I have to say I’m impressed. I’m downloading the beta image file right now to give it a try on my brand new Aspire One D150. More to come soon….. May
13
2009
ROCKS Cluster: "Unable to run job: denied: host is no submit host"I ran into this a couple of weeks ago and it’s been driving me bonkers. I finally figured out what’s wrong. I was just trying to get my feet wet using the Sun Grid Engine and figured I follow their instruction page and try out the example shell script and submit it using “qsub” command. I was doing this on the frontend machine that’s been configured properly as a ROCKS cluster frontend. This was not working and the error I kept getting was “Unable to run job: denied: host “name_of_computer” is no submit host. Exiting.” After googling around for a couple of days I found the answer (atleast the answer in my case). Issuing the following command solved my problem:
Apparently the SGE roll does not setup the frontend node as a “submit host” during install. After this (the above command) everything seems to work properly. Now I can do “qstat -f” and “qsub”. May
05
2009
Openfiler install on large disk + failover setup + usb installOkay so I’ve been playing around with openfiler for the past couple of months. We’re trying to setup a Student homedirectory NAS device and have a mirror machine that would take over if our primary dies. Our machines are hand built 13-TB NAS servers using 16 x 1TB Seagate disks and a 16 channel sata2 raid controller from 3Ware. There are several problems that one needs to overcome in this type of setup so I will try to cover it, bit by bit as I finish confirming it at work. As I said we’re using a Super Micro case and motherboard (Dual Quadcore Xeon) and we’ve stuffed a 16 channel 3ware 9650 controller in there. The first issue we had was with hardware and the fact that we had some screwy new firmware on the controller that was not working nicely with our 16 x 1TB seagate drives. We downgraded the firmware and got the machine to post. Then we created a (roughly) 14 TB container in raid-6 mode (16 drives, less 2). We further devided up the space into a 20GB boot partition (using the bios setting in 3ware bios) and a giant (rougly) 13TB partition that will hold our student data. The 20 GB partition will later on hold our swap space and non essential (frequently updated) folders under /var (lock, log, etc.) We have physically 2 separate machines that are exact copies of each other hardware-wise. The plan initiallly was to use DRBD and heartbeat service to create a High availability NAS cluster, but since we are tying to authenticate (for smb) with our Windows system, we could not get that configuration working (and frankly I still don’t trust DRBD, as good as it is). So we decided to create two USB sticks images. One for master and another for slave. The master will be a machine enrolled into our Active directory domain and the slave will be a passive (private) rsync server. The master USB image is configured with all the AD stuff and two interfaces. One interface serves as the NAS and another runs rsync against our slave/rsync server. When/If the master fails (ie: motherboard failure) beyond recognition, we simply plug the master USB stick into our slave machine and reboot it. Since the machines are exact copies of one another the (old slave) will now be master and once the (old) master is fixed, it will become the new slave/rsync server. Real simple. So here is Chapter one – How do you get Openfiler 2.3 to boot off a USB stick: Before you start you’ll need the following:
Insert your USB stick, and boot from the OpenFiler 2.3 installation CD. At the boot prompt, type expert (for text mode type expert text, I used graphical mode). Manually configure your partitions. I just had one 2Gb partition (ext2) on /. I used ext2 since it has no journal and won’t constantly write to the USB stick. No Swap partition at this point. After the install I noticed that something between 600 and 700 Mb was used for the system, so you might be able to use about 200-300Mb for swap if really needed (however, I doubt the use for a swap partition, as USB storage is really slow). The installer will breeze through to the end. Note that it is realllyyy slow. It took more than an hour on my config. Reboot at the end and get the OF2.3 CD booting again in rescue mode by typing “linux rescue” at the prompt. Once you’re at the prompt mount the USB stick manually (fdisk -l might help as it will print out info about all the disks). My USB stick was /dev/sdc, hence the commands below:
Now you’ve got the partition mounted and your shell chrooted to the root of the USB stick. We next copy the initrd on the USB stick into a temporary directory (on the stick) and uncompress it so we can modify it. You need to do this so that grub can initialize the bootloader ram disk off the USB stick (ie: makes OF installation bootable from USB).
At this point we need to edit the “init” file (text file containing kernel module listings that are required during boot). I used vi to do this, not sure if there is another editor available during rescue mode. Find the line containing “insmod /lib/sd_mod.ko” and insert the following snippet under it:
Save the file and follow along with the following commands to physically copy the appropriate kernel modules to the temp directory.
IMPORTANT – Now adjust grub config (/boot/grub/grub.conf) to reflect the change to initrd filename. You should also repeat this on kernel upgrades (but then again, never touch a working system ;)). More than likely it’s a no go, since the installer did not install grub properly. Now take out your Ubuntu (or other favourite rescue CD) out and boot from it. Don’t use the OF2.3 CD in rescue mode…..IT DOES NOT WORK. Once booted, mount the USB stick on the system and use the following commands to re-install grub:
Reboot and you should be good to go (you will get a couple of Errors during boot about modules already loaded stuff…..ignore). At some point you do want to move some of those auxiliary directories (/tmp/ /var/log /var/lock and others) and swap file off the stick and onto the 20GB portion of our raid-6 we prepped earlier on. Below you find the fdisk -l listing of that “logical disk” (/dev/sdb in our system):
Device Boot Start End Blocks Id System here is a breakdown of what goes where (/dev/sdb6 is obviously swap which was prepared with “mkswap” command):
You need to make the above changes to your USB stick’s /etc/fstab, but before rebooting you need to use “cp -a” command to copy all the folders from the appropriate location on the USB stick to the above partitions (by mounting the partitions temporarily/one-at-a-time), just to make sure no process would go crazy if it didn’t find the lock directory (or cache, run, etc.). Next we want to make four copies of this stick. You can use a Mac or Win (using rawrite) or better yet Linux. It’s important that the stick your copying is not booted. Use the Ubuntu/whatever CD you used ealier and boot it into rescue mode. Go to command line and use “dd” command to create three more copies of the stick you just preped. Two copies (one for safe keeping) will become your Master USB sticks to boot the machine in Master mode (as described earlier in this article). The other two copies (one for safe keeping) will become your Slave sticks. NOTES: These notes have nothing to do with the installation. I’m just putting them down here for safe keeping. Only use these if you’re in trouble. - If you want to create a “Home Share” and you don’t get the “Make Home Share” button on the interface, something has gone wrong with one of the xml config files. No worries, find and edit the file /opt/openfiler/etc/homespath.xml . Inside it will look something like this: - If you have upgraded to a Windows 2008 R2 (Win2k8 r2) AD domain and you’re getting authentication errors when accessing your openfiler shares (although everything was working fine under R1) like the ones below: Nov 16 08:42:02 openfiler winbindd[3316]: [2009/11/16 08:42:02, 0] rpc_client/cli_pipe.c:rpc_api_pipe(789) [2009/11/16 08:43:12, 1] winbindd/winbindd_util.c:trustdom_recv(269) - If you’re having problems accessing a samba share you just created on your brand new openfiler, you might want to check the following. Lets say you have a Volume Group called “bigvg” and a Volume inside that called “studentvol” where you have a share called “test”. If you’re having problems accessing the share by just using something like - Couple of useful commands for Samba troubleshooting….. - There is another issue with this master/slave setup and that is UID/GID synchronization for samba. This comes into play since we’re rsyncing our files from master to slave. This process also transfers their respective UID/GID to the slave machine. If the master fails, our procedure is to turn if off and reboot the slave using the masters USB stick. This works, but all those rsync’ed UID/GID’s will not match when the slave machine is booted using the masters USB stick (samba voodoo that translates windows UID/GID’s to linux UID/GID is kinda random)…..UNLESS YOU DO THE FOLLOWING (taken from Samba How-To): The idmap_rid facility is a new tool that, unlike native winbind, creates a predictable mapping of MS Windows SIDs to UNIX UIDs and GIDs. The key benefit of this method of implementing the Samba IDMAP facility is that it eliminates the need to store the IDMAP data in a central place. The downside is that it can be used only within a single ADS domain and is not compatible with trusted domain implementations. Please note that the update version of SAMBA that gets installed after you do “conary updateall” (see above) has a option for this under “Advance” tab of the Accounts section. Mar
02
2009
TMS – The stuff Apple forgot to include in Time Machine GUI….Just came across tms , what a great tool. It a command line tool for OSX 10.5+ that allows basic CVS style operations on your Time Machine volumes and It does its thing in read-only mode, so nothing gets changed/deleted…..woohooo. Here is the stuff you can do with it:
Go grab your copy NOW. Feb
24
2009
Linux Server-in-a-Plug is here…..only $100Marvell Semiconductors is now shipping their SheevaPlug linux machines. Little tiny Linux boxes the size of a plugin adapter. The SheevaPlug draws about 5 Watts of power, comes with Linux, and boasts completely open hardware and software designs. At $100 the platform is available in single quantities, and is priced within reach of students, hobbyists, and tinkerers. This looks like the perfect embeded platform for all sorts of stuff. Think home automation, security monitoring, ultra low powered file servers, ad-hoc mini clusters, not to mention robots and such …..there is no end to it. Its hardware design is completely open — everything from schematics to Gerber files will be available on a marvell’s website — and ARM ports of several popular Linux distributions are already running, and included. More importantly, Marvell has committed to do everything it can to ensure the best Linux support for SheevaPlug going forward. The $100 SheevaPlug development platform and Plug Computer designs are built around the Marvell 88F6000, or “Kirkwood” SoC, which was introduced last year. The Plug Computer is based on the high-end 88F6281 version of the Kirkwood, with a Sheeva CPU core clocked to 1.2GHz. The Sheeva core combines elements of Marvell’s earlier Feroceon and XScale architectures, both of which implemented ARM Ltd.’s ARMv5 architecture, similar to ARM Ltd.’s own “ARM9″ cores. The SheevaPlug Plug Computer is further equipped with 512MB of DRAM and 512MB of flash. The tiny embedded PC also includes gigabit Ethernet and USB 2.0 ports. One early product based on the design is listed as measuring 4.0 x 2.5 x 2.0 inches. Plugging directly into a standard wall socket, the Plug Computer draws less than five watts under normal operation, compared to 25-100 watts for a PC being used as a home server, claims Marvell. Early supporters of the SheevaPlug Plug Computer design include the following companies, each with links to their respective websites:
Fun,fun,fun….. Thanks to Sugar Labs you can now have your Ubuntu 8.10 or Fedora 10 linux distributions with sugar on it…..Shweet :-). Yep you heard right, go here and grab your OLPC XO inspired 1GB USB stick image and boot all those old PC’s into sugar. According to Walter Bender (the creator of Sugar OS) a new version dubbed Sucrose 0.84 is on its way soon. Complete article (including interview with Mr. Bender) is over at XConomy. Feb
18
2009
LaserTouch….Multitouch using a projection TV and Lasers….Yep you heard right….freaking lasers…..yummy. These guys have managed to turn a rear-projection TV into a multitouch surface using IR lasers. Absolutely fantastic as it (using lasers) makes the whole design a lot simpler and gets rid of the the tracking problems associated with regular IR LED based tables and ambient IR light. Although the original laser idea comes from arbi.trario.us gang, stuffing everything inside a 16″ deep tv is a nice touch :-). Below is a good rundown of the pros and cons of this setup vs. FTIR: Pros Their blog page outlines everything…..and I mean everything. |