Archive

Archive for June, 2009

Apple remove 1 second clip on .MOV files

June 15th, 2009 ithinkiknowit No comments

Some time ago a friend found a way to convert all his avi files that he had acquired and turn them into .mov files for his Apple TV, this allowed him to then add the filed to ITunes (something that is nor easily done with avi files). this script added a 1 second clip to the .avi file and renamed it .mov, and this seemed to pass the checks by ITunes

However, he then realised, that this did not necessarily work in other players, and wanted to remove the file to recreate the original avi. The guys at macscripter have written some awesome code to do this, See their post here:  http://macscripter.net/viewtopic.php?id=27423

The code is as follows: Though read their blog post, there is more information on there than just code

property mytitle : "remsec"</code>
 
on open droppeditems
try
set droppedfiles to {}
repeat with droppeditem in droppeditems
set iteminfo to info for droppeditem
if not folder of iteminfo then
set droppedfiles to droppedfiles &amp;amp; (droppeditem as Unicode text)
end if
end repeat
 
if droppedfiles is {} then return
 
set countdroppedfiles to length of droppedfiles
set stringlist to ""
repeat with i from 1 to countdroppedfiles
set droppedfile to item i of droppedfiles
if i is not equal to countdroppedfiles then
set stringlist to stringlist &amp;amp; (quoted form of POSIX path of droppedfile) &amp;amp; space
else
set stringlist to stringlist &amp;amp; (quoted form of POSIX path of droppedfile)
end if
end repeat
 
set foundationtoolpath to quoted form of POSIX path of (((path to desktop) as Unicode text) &amp;amp; "remsec")
-- a more convenient way to operate the script is to place the remsec foundation tool right inside the script bundle:
-- set foundationtoolpath to quoted form of POSIX path of (((path to me) as Unicode text) &amp;amp; "Contents:Resources:remsec")
set command to foundationtoolpath &amp;amp; space &amp;amp; stringlist
set output to do shell script command
on error errmsg number errnum
tell me
activate
display dialog "Sorry, an error occured:" &amp;amp; return &amp;amp; return &amp;amp; errmsg &amp;amp; return &amp;amp; "(" &amp;amp; errnum &amp;amp; ")" buttons {"OK"} default button 1 with icon stop giving up after 30 with title mytitle
end tell
end try
end open
  • Share/Bookmark
Categories: Apple Tags:

Setting JAVA_HOME variable in Ubuntu

June 4th, 2009 ithinkiknowit No comments

Okay, for the three people who have asked me in the last week how to edit the JAVA_HOME variable here is the answer, oh and no it doesn’t matter if you are playing on a VM :)

In Ubuntu open up a terminal window,

The folowing command will let you know if you have a JAVA_HOME variable set, and it will show its location:

echo $JAVA_HOME

If nothing appears, you need to set the variable, and then the path, to do this you type the following (and remember to set the /examplepath to your java director, most commonly found in usr/lib/

JAVA_HOME=/usr/examplepath/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
  • Share/Bookmark
Categories: Ubuntu Tags: