Convert QuickTime '.mov' clips to '.m4v'

quicktime I’m not used to video editing, but I had to convert a movie recorded on my (Snow Leopard) Mac Os  X screen and saved as a ‘.mov’ file, in order to publish it on the web. I asked google before getting  deep into ffmpeg man page, and found tons of unknown-software, tips on using iMovie, and so  on. Actually the iMovie import-then-export solution didn’t look so bad, except exporting the  project movie it got cropped to fit the iMovie project ratio, that can be set to 4:3 or 16:9 only. I  didn’t found any intuitive way to avoid this, e.g. scaling the clip and adding the black border bars  where needed to fit the project ratio. Anyway, in the end i found the simplest solution: QuickTime  Player had the needed feature just in front of me.
Document > Register for the web allow to record the movie in m4v format, so that can published on the web or uploaded to most video-hosting providers without loosing the audio or whatever. Simple and useful ;)


OSX – Serial Connections, These strangers

serial-connector When you have to locally manage scrap metals, it doesn’t matter if you are connecting a  microwave oven or a dozen of thousands bucks value brand new router or firewall, you will  probably do that over a serial cable. Devices likely offers a port labeled CONSOLE or  whatever you should connect the cable to. The cable type is device-dependent, but it usually  ends up with a serial connector for a serial port. If your computer doesn’t have that port, you  will need an adapter and its driver, such as to an USB port. While in linux you just modprobe the usbserial module with the appropriate vendor and product code, such as:

modprobe usbserial vendor=0xVID product=0xPID

for osx you may need the adapter drivers from the vendor ( they should be available on the vendor’s site, otherwise change vendor =P ). However, when the cable is plugged, you should find the proper entry for the (adapter) device, named tty.<whatever>

ls -1 /dev/tty.*

Now you will need to attach a terminal emulator to the found serial port to access the connected device console. On Mac Os X, as linux users will like, minicom is one of the best choices. Install it via MacPorts or Fink, then use:

minicom -s

to edit the default /opt/local/etc/minirc.dfl config file or to generate configurations that will be saved to /opt/local/etc/minirc.<your-config-name>. You should at least specify the port, baudrate, data bits, parity, stop bits and flow control. These are often indicated in the machine specs, with strings like the common 9600/8N1.


How to Generate an SSL CSR (Certificate Signing Request)

csr In order to request a signed SSL/TLS certificate you have to send the Certification Authority a  proper formed request often indicated just as “CSR” together with the other details.
If you are  using Apache you can generate your passphrase-protected RSA 1024 bit key using  openssl with:

openssl genrsa -des3 -out your.host.tld.key 1024

And then generate the CSR to send ‘em, again using openssl with:

openssl req -new -key your.host.tld.key -out your.host.tld.csr

You will be prompted for some information that must be included in the CSR itself, and in short it will be done.


Connection forwarding over ssh secure channel

So Alice returned from wonderland to her dark and unsecure world, without sendig Bob the awaited postcard, that may be a big deal for their friendship, unless Alice keep with her an ssh access to the wonderland:

ssh alice@wonderland -L [<alice-bind-addr>:]<alice-port>:<bob>:<bob-port>

forward-in-tunnel That will please Alice for a while since if her postcard is sent out from the <alice-port> it’s gonna be forwarded to wonderland over a (supposed) secure channel and then sent to Bob, but blues is aroud the corner because she’s now used to be carefree using her unsecure application protocol from wonderland and she doesn’t want to set up forwarding for each of her friends. Anyway, she may be fine using ssh as a SOCKS server reached over the secure channel with:

ssh alice@wonderland -D [<alice-bind-address>:]<alice-port>

Tree

Tree Some times you want to recursively check the contents of a given directory right in your shell  asking for its inherent tree.

But sometimes the ‘tree’ utility is not available, and you may have no rights to install it or you  just  don’t want to. Other times you may even have to deal with ports to  get  the simple tree  utility.

In these cases, find and sed are here to help:

#!/bin/bash
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

MagicThumb

MagicThumb is a nice tool from magictoolbox.com that provide a way to display images  linked to thumbs on a page via javascript. Non-commercial websites can get a free licence  and  use this cool product for free. This is a smart policy for this company, because quality of  their  products are promoted “on field”. On the left there’s an example of how that works. That’s pretty  nice, isn’t it ? Find out more at magictoolbox.com



Return top

About me