Google Maps Street View goes 3D
- April 4th, 2010
- Write comment
Archive for the ‘Random stuffs’ Category
This is an amazing gift i just received for my birthday. It looks just like a wooden box, and lots of people can find that not interesting at all, but it’s actually an Himitsu-Bako, a typical japanese puzzle-box that may be opened only with the application of a combination of moves on its pieces.
Here is a video that shows what is that like:
Of course this is not something that will always prevent anyone to get what’s inside, since the box can be easily broken down with an hammer hit, or smashed into pieces against something hard, and still the combinations of moves for the pieces are not too many to try if having a long time. But if who may want to open don’t want to break it or don’t want the owner to know the box has been opened, and can’t try many combinations, it’s pretty effective. Obviously publishing a video showing how to open this one is not the best way to ensure it won’t be opened, but i really like this object, and i want to share something about that.
Well, this deserves a post. Check out what was the view like this morning.
I don’t remember snowing like this in Rome before

In my last post I wrote about extracting audio from in-streaming-format videos, that people often may get from content streaming services like eg. YouTube. As said, those videos may be downloaded in several ways that may also be different depending on the hosting service. A pretty effective way is using some plugin for your browser that shows the URL of the source the flash/html5 player download the video from, and allow you to get the content from that. Anyway, just for fun, here is a small shell script that can be used to download videos contents from youtube.
#!/bin/bash # ################################################################ # --- YouTube Downloader ------------------------------------- # # --- http://www.n0on3.net ----------------------------------- # ################################################################ # which wget &>/dev/null; if [ $? -ne 0 ];then echo "> Please install wget =)!"; exit; fi if [ $# -ne 1 ];then read -p "> Enter Youtube video ID: " VID else VID=$1; fi read -p "> Do you want me to try to get the HD version ? [y|N]: " HD case $HD in Y|y|yes) FMT=22;; N|n|*)FMT=18;; esac OK=1; PAGE=`tempfile` wget -q -O $PAGE "http://www.youtube.com/watch?v=$VID" SIG=`cat $PAGE | egrep -o "\"t\": \"[^\"]+\"" | \ sed 's/\"//g' | awk '{print $2}'` URL="http://www.youtube.com/get_video?fmt=$FMT&video_id=$VID&t=$SIG" TITLE=`cat $PAGE | grep VIDEO_TITLE | awk '{$1="";print $0}' ` TITLE=$(echo $TITLE | sed 's/.\(.*\)../\1/' | sed 's/\\//g') read -p "> Is the title \" $TITLE \" right for output file ? [Y|n]: " TOK case $TOK in n|N|no) read -p "> Enter filename: " TITLE ;; Y|y|yes|*) ;; esac; echo "> Saving file to $TITLE.mp4 ... " wget -q -O "$TITLE.mp4" $URL &>/dev/null if [ $? -ne 0 ];then echo "> Download failed!"; OK=0; rm -fr "$TITLE.mp4"; if [ $FMT == 22 ];then echo "> Maybe the HD version isn't available.." FMT=18; echo "> Downloading the non-HD version ..." URL="http://www.youtube.com/get_video?fmt=$FMT&video_id=$VID&t=$SIG"; wget -q -O "$TITLE.mp4" $URL &>/dev/null; if [ $? -ne 0 ];then echo "> Download failed!"; rm -fr "$TITLE.mp4"; else OK=1; fi; fi fi if [ $OK -eq 1 ]; then echo "> Successfully Downloaded to $TITLE.mp4 !" fi; #
To be said, youtube term of service, at point 6.C, states using YouTube you accept not to access the contents with any technology but the YouTube website player or other stuff explicitly authorized by YouTube. ( That means, yeah, you should really not use this u.u” ).
Sometimes you may just want to get the soundtrack of a video. And you know, today most videos are available in streaming on the web. There are several ways to download those videos, depending on the service that hosts them, but there are also many websites that explains how to do that. To give an example, youtube player retrieve videos requesting an URL with parameters that include the ID of the video and a signature it got when it’s loaded. To emulate this behaviour and get yourself the video to download, you can eg. use one of the appropriate firefox plugins , rather than getting the url from one of the many websites that build it for you. Anyway, streaming videos are in .flv or .mp4 formats. If you want to get the audio from an .flv video, you just need ffmpeg, running
ffmpeg -i "video.flv" -f mp3 -vn -acodec copy "audio.mp3"
If you want to get the .mp3 audio from an .mp4 video instead, you may use faad2 and lame to just decode the .mp4 audio to .wav e reencode it to an .mp3 .
faad -o - "video.mp4" | lame - "audio.mp3"
You can get both faad2 and lame as well as ffmpeg via apt or whatever package manager you use in Linux, and via MacPorts of Fink in Mac Os X.
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
Apache Bash Scripting Business Cool Stuffs Debian e-games EU GEYSERS Google Graphics h4t Innovation iphone Java LaTeX Linux LUG Mac Os X Networking RAID regex Security service Social Networks Solaris ssh SSL Unix VPS www xhtml xpath
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
