On the radio…
Ξ April 18th, 2010 | → 0 Comments |
∇ Music | ∇ Listening, Radio, Relax, Video |
Just found this video somewhere on the Web and tough it was interesting. It looks to be a pretty interesting book trailer for Leviathan. Never had the change to read something from the work of Scott Westerfeld… this really seems to be a good change to start!
Did I already told you that I really enjoy to develop scripts in Python? It’s simply great!
Last month I did some research on how to join video files and the result was this. Now, having discovered Python I took another dive into the problem. The previous solution worked nice, but I was making it work double. Let’s see, the script began by concatenating the video files in /tmp folder, and then encoding it into the final video file.
A much more efficient was to do it is to simply execute menconder providing all the files to concatenate (in order!) as parameters. This solutions directly creates the output file, avoiding the creation of any temporary file.
Using Python to create the new script and trying to improving the first script, the new joinvids.py is now able to join .mpg and .avi files (according to the extension of the files to join).
One of the initial purposes of this blog was to store small pieces of knowledge collected from the web and that I use in a day-to-day basis. I haven’t really used the blog to do that, but I have several posts drafted and ready to be published containing only small tips. So, this is the first of many (I hope).
It makes me mad, the fact that most movies I download from the internet come divided into CD size avi or mpeg files. Why not one big, unique, file with the complete movie? I don’t know, but my solution is to join (or concatenate) the parts back together.
This is how I do it (in linux, of course)
Step 1 : To join the several parts of the same movie I just:
cat part1.avi part2.avi > joined.avi |
The example is also applicable to MPEG video. The idea is create a big file just by joining the consecutive movie parts, so the order in the command is important.
After the previous step, you should be able to play MPEG videos although their index information might be screwed up. In general, you’ll see you ‘movies time’ be reset to 0 at the end of the first part. In the case of AVI video, you won’t be able to play the movie.
Step 2: Use mencoder* to ‘fix’ the joined video, by simply doing:
For AVI video:
mencoder -forceidx -oac copy -ovc copy joined.avi -o full.avi |
For MPEG video:
mencoder -forceidx -oac copy -ovc copy -of mpeg joined.mpg -o full.mpg |
This second step usually takes no more than one or two minutes.
And that’s it. You can download joinavi.sh and joinmpg.sh, and use it at your own risk. Use these scripts by just executing: joinX.sh part1.X part2.X, and you’ll get a full.X video in your current directory.
Note: Don’t forget you need to “sudo aptitude install mencoder” to able to use mencoder.
The video shows how the day and night changes the Worldwide Air Traffic. Watch the day break in Europe and then in North America… Amazing!!!
Just watch the video and tell me if it isn’t funny…
This is a video I received from someone by email… It’s absolutely great. I rolled on the floor laughing my insides out!
Enjoy!…