Tuesday, August 7, 2012

Still Frames JPEG pictures: iMovie '11/QuickTime

Creating Still Frames as JPEG pictures in iMovie '11 and QuickTime

In previous versions of iMovie, it was easy to create still frames and export them as JPEG. There used to be a menu option 'View in Finder' that would do the trick. This menu option has been removed in iMovie '11. Some posts have indicated it is due to the fact that still frames are now small movies instead of single frames.

I follow these steps to create still frames from movies.
  1. Import the movies into iPhoto.
  2. Open iMovie and import the iPhoto movies into it. A dialog box should ask you to do this every time you open iMovie.
  3. In the clip area in the bottom, move to the frame that you want.
  4. Right-click (control-click) and select Add Still Frame to Project. This will add the still frame to the project area. 
  5. In the frame in the project area, select the drop down box and select Clip Adjustments.
  6. For the duration, change it to 1 second. The default for me was 4 seconds. Check the box for Applies to All Stills. When you export below, this will give you one picture for each frame.
  7. Repeat this process for all the stills that you want.
  8. Now it is time to create the JPEG pictures for each frame. Select the Share menu item from iMovie.
  9. Select Export using QuickTime.
  10. Select Movie to Image Sequence in the Export drop down box.
  11. Click Options.
  12. Select JPEG format and frames per second as 1. Combined with the length of the still frame from above, this will give you one picture per still frame.
  13. Click OK, then Save.
Update: When I created this post, I was using iMovie 11. Somehow, I am now using 10.0.9 and the option to Export does not exist, it has been replaced with Share. The Share menu does not have an option for QuickTime.

If I export to Image, then the first still frame will be created. For each still that I wanted, I added it to the start of the timeline and saved as an image. It is tedious. I have seen other posts for installing additional software, but this seems like such a natural thing to do that I cannot believe iMovie does not have a simple option.

Monday, July 23, 2012

Building a Firefox Add-on

I have just built a Firefox add-on using the Add-on builder.

Add-on builder is a web based tool that is easy to use to develop the add on. There is also the SDK which can be used to develop the add-on from the command line. I have not used the command line options.

https://addons.mozilla.org/en-US/developers/builder

Once there, select Try Builder. This takes you to a new page. At the top, select Sign-in. Once signed in, select Account to see the add-ons you have already created.

View the addon dashboard at
https://addons.mozilla.org/en-US/developers/addons

To publish at the dashboard, zip the contents of the extension folder (do not include the folder) and change the extension to .xpi.

I am using add-on builder, so I do not have the folder for the extension, but the .xpi file can be downloaded from add-on builder and then uploaded through the dashboard. Unfortunately, the link in add-on builder for uploading a new version does not work.

It seems that the add-on builder upload did work. When I did the manual upload, I received an error message that it was already uploaded.



Available Web Services

I am approaching web services from the stand point of a user.

I want to find useful web services and access them from a web application.

I do not care about all the different ways that web services can be implemented
or the history and development of web services over time. I want to be able
to consume a web service from a web application with as little coding as possible.
Link
My first thought is to be able to access a web service for a shipping company. I
will see if there are web services for UPS, FedEx and DHL.

I found a site for developers that want to incorporate FedEx services: http://fedex.com/us/developer/index.html. A similar site for UPS is https://www.ups.com/upsdeveloperkit. DHL offers this site: http://www.dhl.com/en/express/resource_center/integrated_shipping_solutions.html.

I had difficulty finding the WSDL address for FedEx. I found the following for UPS: https://www.ups.com/e_comm_access/laServ?CURRENT_PAGE=INTRO&OPTION=ACCESS_LICENSE&loc=en_US

There is a comment on the WSDL "Access to UPS shipping, tracking and payments. Free for use but you to apply, your company must already have an account with UPS and send a minimum of 50 packages per day." I will see if I am able to access it.

Created UpsWebService web application in NetBeans 7.0

Downloaded the Address Validation Developer's Guide, but it cannot be read.

Went back to FedEx and downloaded the Rate example.
  1. Using axis2-1.5.4.
  2. The classpath variables point to the wrong JAR files.
  3. Renamed obvious ones. Removed the others.
  4. Will try a compile to see what errors I get.
  5. Failure. The code is tied to axis2-1.4. Many changes for axis2-1.5.4.
I will try to find a Google WSDL to access.

I am using FedEx again and the Rate service. I will download axis-1.4
  1. I am reading the README file from the Rate example.
  2. I will add activation.jar and mailapi.jar to the classpath as well as the axis files.
  3. Added the .project file to Eclipse Helios. No compilation errors. I had to download activation.jar from oracle and add it to the axis lib folder. Same for mailapi.jar. Alternatively, I could have edited the variables that were created for the class path.
  4. Had to add -cp "\lib\*" to java command in order to get WSDL2java to run.
  5. All stubs are created and placed in workspace.
  6. Had to request access to test environment for FedEx. Only certified apps can run on production servers. Account number, meter number, key were in confirmation on web site. Password was only sent in email (that took 10 minutes to arrive).
Trying FedEx examples from NetBeans.
  1. Must use Axis 1.4 for library, not 1.6.
  2. mailapi.jar and activation.jar are there from Eclipse example.
  3. Success.
I will not try a different application using the NetBeans Services->Web Services.
  1. I have added a new Web Service in the Services tab for FedEx.
  2. I have linked to the wsdl that was sent in the samples from FedEx. The wsdl does not appear to be accessible from the web.
  3. Drag-drop getRates to example main program. There is not enough information to make a request that runs.
I will try creating a web service from a WSDL in NetBeans.
  1. New -> Web Service Client
  2. Local reference to WSDL from FedEx
  3. Same result as using Services.


I am now trying to use Amazon Web Services (AWS) to send bulk email.

I am following the instructions at http://docs.amazonwebservices.com/ses/latest/GettingStartedGuide/.
  1. The only glitch so far is that Perl needs to be installed in order to verify the email address.
  2. Next glitch, library LibXML.pm is missing.
  3. Could not find 64 bit XML/LibXML.pm. Am uninstalling 64 and installing 32 bit Perl.
  4. Still not luck. Trying to use cpan from perl install. Need C and make. Installing now.
  5. Installed cpanm and am installing XML::LibXML.
  6. Error about uninitialized value in Makefile.
  7. I am probably missing libxml2. This is a C library that implements GNOME functionality. I am trying to do the install in Linux. It may be better to rewrite the script using XPATH.
  8. Using Windows, I was able to run the email verify address by using XPATH. Listed after this list. Still didn't show results, I had to just view the plain text of the response.
my $xpath = XML::XPath->new( xml => $response_content);
$xpath->set_namespace('ns', $SES::aws_email_ns);

my @nodes = $xpath->findnodes('/ns:ListVerifiedEmailAddressesResponse' .
'/ns:ListVerifiedEmailAddressesResult' .
'/ns:VerifiedEmailAddresses' .
'/ns:member');

print "node count: @nodes";
foreach my $node (@nodes) {
my $text = $node->to_literal();
print "$text\n";
}

Have downloaded the SDK for AWS for Java.
  1. I have been able to send an email.
  2. I used ant. Now I am creating a project in NetBeans to run the samples.
  3. I created a library for AWS jar files in the lib and third-party folders of SDK.
  4. Updated my credentials and sent an email.
It only took a few hours to get moved to production mode.
  1. Created a utility class for adding recipients, reading recipients, etc.
  2. Sent bulk mail to mailing list with 50 addresses.
  3. Messages were received quickly.








Monday, June 4, 2012

Removing files from iPod Nano, Version 1.2

Removing files from iPod Nano, Version 1.2


By default, all files are synched to the iPod nano, so the only way to delete a file from the nano is to remove it from iTunes.

To change the default behavior, open the nano in iTunes. On the first screen, there are three check boxes that can change this behavior.
  1. Check the box "Sync only checked songs". After applying the changes, any file that is unchecked in iTunes will be removed from the nano on the next synch.
  2. Check the box "Manually manage music and video". This prevents automatic syncing and allows files to be deleted directly from the nano. There is a warning about having to eject the nano manually.
  3. Check the box "Enable disk use". This will allow files to be deleted directly from the nano, but will still allow syncing when the nano is connected to iTunes.
The second and third options allow the nano to be used a data disk. Files can be copied to the nano in Finder.

Tuesday, May 8, 2012

Moving MobileMe calendar to iCloud 

When I switched from MobileMe to iCloud, my calendar did not make the move.

I stopped synching the mobile me calendar on the iPhone.
Settings->Mail, Contacts, Calendars->MobileMe->Move Calendars to Off
When prompted, keep calendar on iPhone.

Go to iCloud in the settings and Calendars
Settings->Mail, Contacts, Calendars->iCloud->Move Calendars to Off
When prompted, keep calendar on iPhone.

Wait a few minutes and then move Calendars in iCloud back to On.

When prompted, agree to Merge the calendars.

In a few minutes, the old mobile me calendar appeared in iCloud.

Wednesday, February 8, 2012

Reducing the Size of the Roaming Profile

I have a roaming profile for Windows that can be accessed from any computer on the intranet. When the profile is too large, it takes a long time to log in and out, since so much data has to be downloaded and uploaded.

Two apps that affect the size of the profile are NetBeans and Thunderbird. By default, the user files are placed in the profile. A third app is DropBox. That is a real killer.

NetBeans

First, close NetBeans.

To move the user files for NetBeans, navigate to the install dir for NetBeans and modify
/etc/netbeans.conf

Look for
netbeans_default_userdir=.....

Change it to the new location. Use ${varname} to include environment variables.

If an environment variable is used, this will change the location of the file for all new configurations.

Thunderbird

First, close Thunderbird.

To move the user file for Thunderbird, modify the profiles.ini in the AppData folder.
In Windows, type %appdata% from the run... option in the Start menu to open the AppData folder.

Change to the Thunderbird folder. The profiles.ini file is here. Edit it and change two things:
IsRelative=0
Path=C:\........

Move the default profile folder that is in the Profiles folder to the new location.

This only moves a profile that already exists. I do not know how to change the initial location of the profile.

Dropbox

From the Dropbox preferences, select a new location for the Dropbox files. Caution: The Dropbox folder cannot be placed on a network share. Dropbox can not tell the difference between "The share folder is not available" and "The user just deleted all the files in the share".





Check out my other blog post on moving Dropbox out of the roaming profile.

Saturday, February 4, 2012

Connecting X11 without ssh

I have a situation where ssh -X is too limiting for what I need to do.

I have the ability to sudo to any user account on a remote Linux machine.
I am not able to log in as root.

ssh -X works perfectly for connecting as me to the remote machine. I am able to open X windows programs. Once I change to another user, I am unable to execute X windows programs.

I found a solution after reading several helpful posts:
http://hints.macworld.com/article.php?story=20081208062918906
http://dragonwall.net/xdeep-putty.html

I enable X11 listening on my Mac.
defaults write org.x.X11 nolisten_tcp 0
If xwin is running, stop it and restart it.

At first, I opened port 6000 to allow access to the display. After reading the comments about opening port 6000 through the firewall, I realized I needed to connect via the VPN to the remote computer.
http://www.publicvpn.com/support/MacOSX105.php

I connected to my VPN. The link above did not use PPP, so I had to make that modification to the steps. I was able to connect.

I am using a Mac, so I could open a terminal. The prompt at the terminal window indicated that I was connected to the VPN. I issued ifconfig to get the local ip address from the VPN.

I issued ssh to connect to the remote computer. I did not use -X, since tunneling will not work when I change to another user.

At the remote command prompt, I set the display environment variable to the ip address of the local VPN address, adding :0 to the end.
setenv DISPLAY xxx.xxx.xxx.xxx:0

I tested opening an xterm as me. It worked.

I changed to a different user and opened an xterm. It worked.

I checked that the firewall was still blocking port 6000. The port is only accessible through the VPN.

After all this, opening the application that I need takes too much time. It will be faster to drive to the remote location and log into the machine to do the work I need to do.

I will disable X11 listening on my Mac.
defaults write org.x.X11 nolisten_tcp 1



Next attempt.

I have the MS Office suite on my Mac. It has Remote Desktop Connection. I can use it to log into the remote computer.

The remote computer is Windows 7, but it has cygwin installed on it. I followed these steps:
  1. Connect to VPN.
  2. Remote Desktop to remote Windows 7 computer (local.name).
  3. Open cygwin bash shell.
  4. Issue startxwin command in /usr/bin
  5. Open xterm
  6. Enabled xhost connections for remote Linux host (remote.name): xhost +remote.name
  7. ssh without X11 tunneling to remote Linux host.
  8. Set DISPLAY to local.name:0
  9. Change to different user and open xwin application.
  10. The GUI app opened immediately.

Tuesday, January 31, 2012

Installing LXDE in Fedora 16

Installing LXDE in Fedora 16


I used the Add/Remove software application in the Gnome desktop to install LXDE desktop.
From terminal: yum install @lxde-desktop

I used Add/Remove software application to install KDE Login Manager.
KDE Login Manager is not needed, as GNOME manager now has option to change desktop.

I used yum to install system-switch-display-manager-gnome.

I ran the system-switch-displaymanager and used KDE manager.

Restarted X.

Selected LXDE from login manager.

On VirtualBox 4.1.8 on mac, use fn+host+f1-f6 to switch virtual terminal. f1 has first GUI.

Thursday, January 26, 2012

Fedora 16 in VirtualBox

I downloaded the Live Install for Fedora 16.

I created a vdi virtual drive.

I installed Fedora.

All is good.

The install is limited to a small screen. In order to Fedora to use the full screen, the Additions must be installed.

From the VBox Device menu, choose Install Guest Additions.

Authenticate with the su password.

An error appeared about kernel-devel-... missing.

I opened a terminal window and switched to su.

yum install kernel-devel-...

Closed the window for the guest additions, but left the terminal open.

Forced an unmount to the Guest Additions, from the Device->CD menu.

Reran guest additions.

Error: could not find gcc.

Back in terminal window, did following (-y answers yes to all questions):
yum -y update kernel
yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
Reran additions. All OK.

Logged out/logged in. Full screen works.

Host key is right-control key, by default.

Host-F toggles full screen; Host-Home opens VBox menu.

Followers