>>Single Point of Failure >>

§ Home § CV § Blog Photography Divagações §

Calendar

February 2009
M T W T F S S
« Jan   Mar »
 1
2345678
9101112131415
16171819202122
232425262728  


Popular Tags


Recent Entries



Categories


Archives

How to: Join MPEG or AVI videos (now using Python)

Ξ February 8th, 2009 | → 0 Comments |
Development, Tools |, , |

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).

 

The Latest Experiment

Ξ February 8th, 2009 | → 0 Comments |
Computer, Development |, , , |

The last post was so long ago that it’s hard to remember. Usually, the lack of posts comes associated with some huge amount of work. I could say that this is another example how my work takes to much of my own time, but that would not be completely true. In fact, I have been working long hours but the main reason for not having time to write is another…

I don’t see myself has a sysadmin, but I like to do my own experiments… like building a file sharing server (one that no one will hever use), having a wireless network in place (to be used once every month by a computer that could easily be connected using a wired connection) or mounting a home theater PC (an placing the old computer box in the living room and understanding that it really looks ugly and out-of-place).

No, this time it wasn’t one of “my crazy” projects. I just decided to learn a new language… I didn’t actually decided it! Let’s just say that Python started to grow on me. And front my point of view, Python is far better that bash script or perl or any other scripting language out there. With it you can do the simplest things, like inspecting some file’s content or you can do the most complex procedure (including, for example, DB access).

Book Cover
A friend talked about Python with me, and for someone with background in C/C++ and some bash script, Python turned out to be really (REALLY!) simple. I’ve been using it for a couple of months and I already converted all my ‘~/bin’ scripts to Python.

My real interest began after finding “Python for Unix and Linux System Administration” and reading this really hands-on and example based ‘introduction’.

More on my Python experiments, soon… (I hope!)

 


On the nightstand...



Entries | Comments