Monday, April 9, 2012

GPT/UEFI Linux install nightmare

For those trying to install a Linux distro on a machine whos previous
partition table was GPT --Quick word of advice: You should get rid
of the previous GPT table by using gparted or gdisk and create a
normal DOS partition table afterwards. You can do this using a live
CD/DVD/USBstick before installing. What happens if you don't
(tried with fresh as-of-this-writing install images for Fedora and
Debian) Is that the partition step will go forward normally and the grub
MBR mambojambo that follows too, but your system wont boot.

I'm guessing you aren't worried about the internals and if you are you
can proly just Google about this and figure out what's going wrong
by yourself (Hint: wrong and dull automagic option selection from the
installer) but in the mean time and if you're in a hurry, just do that ^^
and save yourself some trouble.

There's also a nogpt flag you can pass to the installer at boot time.
Dind't try that one though but guess it should work all the same.

Ah, remember to allow legacy compatibility for non UEFI/GPT
systems on the BIOS boot configuration, option should be available
somewhere.

Tested on a Samsung NP530U3B I had to install Debian on for
my youngest brother. Shit happens.

Friday, November 18, 2011

Giving a lecture at this year's expolibre


For those of you around Talca and wanting to talk FOSS, Youness Aloui, Thibault Saunier and your's truly are going to be speaking at this year's Expolibre thanks to the gentle support of our company and the organizer's invitation.

I was talking yesterday with a fellow coworker on how community events like the good old ones get shadowed under the massive, corporate backed ones you see in the tech news by the day. Sadly as it might sound to a few (at least --And I hope), we are slowly beginning to forget there are still some guys out there that resisting the thrust of being only motivated by what to sell next year and how to make it so it goes good and cheap at the same time (like if it was possible, someway), still gather to share views, knowledge and maybe-naive-but-still-valid desires of steer collaborative innovation a bit away from the dreaded coin-only focus. We need to take an step back sometimes and think about some important things we forget on the rush of our everyday paid developer's life; there's a community that saw us shooting at the stars once and has continued backing up most of the technology we rely on. Supplying not only that but: tools, a beyond-technical environment and a reason for trying not only to do things right but do good while we are at it. Attending this kind of events is my way of taking that needed step back and I couldn't be more happier about working for a company that not only allows me to but go as far as directly supporting the event with the time of its devs.

So, if you find yourself wandering around Talca (VII Region, Chile. Some 3 hours away from Santiago) by the 24/12/2011 and wanna go do some knowledge sharing and hear and talk about FOSS without having to pay a penny, then go there. I have been giving speaks at this conference for the last 3 years and one thing I can guarantee you is that it's worth the time you will spend.

Thibault Saunier will be talking about video editing with PiTiVi, Youness Aloui will be talking about FOSS and the fights some users have to go through to make sure their rights don't get crippled by merely buying a product and I'm going to be sharing the goods of GStreamer through a gently introduction for beginners. Don't worry about not having an strong software developent background because our talks are geared towards anyone that doesn't run away from a mouse.

C you there!

Tuesday, November 8, 2011

GStreamer on Android, The NDK way


Long story short; thanks to my employer, Collabora, I have been working on getting GStreamer built and installed as a native support library under Android using the NDK. We had this working and announced for last GSTConf at Prague but there were a few details to iron out to get our work in shape for external testing.

The idea behind this adventure is showing the world you can benefit from this marvelous, swissknife-like media framework under the green droid's platform utilizing a least intrusive path.
We worked a few months ago on having GStreamer built as part of Android itself and while I do believe that approach should benefit system integrators rolling out their own customized Android version, it has the drawback of requiring both patching and building the entire Android OS and having administrative (root) access to your device. This is arguably not a problem for the most adventurous among you but we figured out providing a way to benefit from all the goods in GStreamer without forcing you to perform any major hacks was worth trying. So we did.

To be really honest, most of this work wouldn't have been possible (or at least really, like _REALLY_ harder) without the help of Collabora's own Derek Foreman's Androgenizer. You will need this tool if you want to try building our NDK bundle. And if you are working on porting some other complex project to Android; You need it too! so go check it out.

Right now you can get instructions on how to build GStreamer using the NDK and install it on your device at our freedesktop wikipage. Here is a quick run down of what is currently workig:

  • Building most of gstreamer, -base, -good, -bad, -ugly & -openmax. The first 5 entirely from upstream!
  • Building of our set of support libraries for this bundle (glib, x264, ogg, libmad, faad, libid3tag)
  • Building gstaudioflingersink from gst-android. We are still working on gstsurfaceflingersink to adapt it to some late API changes in Gingerbread
  • APK generation and Installation. Mind you this is not a real Android GUI application, just the set of GStreamer libraries and executables for you to build upon
  • Execution of gst- binaries on the device using run-as

Suported Android versions:

  • Gingerbread and Honeycomb

Test devices:

  • Samsung Galaxy Tab 10.1
  • Google Nexus S

This is still a work in progress but as I trust the community to be a great vehicle for driving innovation forward and have the luxury of working for a Company that supports this very same principle, I decided to have this aired so I can benefit from both your testing and feedback.

If you give this process a try and feel like supporting our work, please consider subscribing to our mailing list and sharing your experience!

Tuesday, November 30, 2010

Adding XSUB support to GStreamer

So I have been working on adding XSUB support to GStreamer as a landing task at my new job. To be honest, I didn't expect it to go as easy. Don't get me wrong, I do know most subpicture encoding schemes are kind of trivial, what I expected to be hard was to work with the GStreamer's plugin API, which was a completely new monster for me. Long history short; with the help of several coworkers and some good documentation, I have patch ready to be tested. There are still a few things here and there that might benefit from some tweaking but overall the code does its job and its in dire need of some testing love :) Dunno how long it would take for it to land in -bad but for the time being you can follow current development here.

If you want to test the code you might consider using a pipeline along these lines:

gst-launch-0.10 -v --gst-debug=xsub:5 xsub name=overlay show-background=FALSE ! ffmpegcolorspace ! xvimagesink filesrc location=/somepath/small.divx ! avidemux name=d d.video_00 ! queue ! decodebin2 ! ffmpegcolorspace ! overlay.video_sink d.video_01 ! queue ! overlay.xsub_sink
I'd put some screenshots here but I have been unable to find samples I can share.

Monday, October 18, 2010

Making great ER diagrams without drawing


This one will be short :-)

I needed to draw a decent looking Entity Relationship diagram for an academic assignment --BORING. This is the kind of thing that makes me wonder why I surrendered my soul to this degree hunting battle. Anyway, there are two utilities (Maybe more, who knows) that might help the candidate ER Michelangelo: Dia and kivio. Now, if you are into buttons and mousing that's all you should need; pick one, search for some online examples and you will be done in no time. Chances are your drawing will look like shit but then again, you'd be an artist you proly wouldn't be reading this anyway. Now, I'm not really into WYSIWYG so I searched a little more and discovered a life savior: The Tikz-er2 LaTeX package.

Not wanting to bore you more than what's strictly needed to communicate my joy, here is a complete example almost right from the documentation.



Neat isn't it?

Well, If you are still interested you should take a look at the
package documentation. It's quite short, just a few pages
long. For the time being and to aid your experiments here
is the LaTeX source for the above displayed diagram:

\documentclass[a4paper,10pt]{report}
\usepackage{ucs}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{tikz-er2}

\usetikzlibrary{positioning}
\usetikzlibrary{shadows}

\tikzstyle{every entity} = [top color=white, bottom color=blue!30,
draw=blue!50!black!100, drop shadow]
\tikzstyle{every weak entity} = [drop shadow={shadow xshift=.7ex,
shadow yshift=-.7ex}]
\tikzstyle{every attribute} = [top color=white, bottom color=yellow!20,
draw=yellow, node distance=7em, drop shadow]
\tikzstyle{every relationship} = [top color=white, bottom color=red!20,
draw=red!50!black!100, drop shadow]
\tikzstyle{every isa} = [top color=white, bottom color=green!20,
draw=green!50!black!100, drop shadow]

\begin{document}
\begin{tikzpicture}[node distance=8em, every edge/.style={link}]
\node[entity] (persona) {Persona};
\node[attribute] (pid) [left of=persona] {\key{id\_persona}} edge (persona);
\node[attribute] (name) [below left of=persona] {nombre} edge (persona);
\node[multi attribute] (fono) [above of=persona] {fono} edge (persona);
\node[attribute] (anex) [right of=fono] {anexo} edge (fono);
\node[attribute] (number) [below left of=fono, node distance=5em] {number} edge (fono);
\node[attribute] (email) [above right of=persona] {email} edge (persona);
\node[relationship] (pertenece) [right of=persona] {Pertenece} edge node[auto,swap] {1:1} (persona);

\node[entity] (depto) [right of=pertenece] {Depto} edge node[auto,swap] {0:N} (pertenece);
\node[attribute] (iddepto) [above of=depto] {\key{id\_depto}} edge (depto);
\node[attribute] (dname) [above right of=depto] {d\_name} edge (depto);
\node[rectangle, draw=black, fit=(pertenece), inner sep=0em] (ipertenece) {};
\node[relationship] (tieneun) [below of=pertenece] {Ocupa} edge node[auto,swap] {1:1} (pertenece);

\node[entity] (cargo) [right of=tieneun] {Cargo} edge node[auto,swap] {0:N} (tieneun);
\node[attribute] (idcargo) [right of=cargo] {\key{id\_cargo}} edge (cargo);
\node[attribute] (cname) [above right of=cargo] {c\_name} edge (cargo);
\node[attribute] (plevel) [below right of=cargo] {nivel} edge (cargo);

\node[relationship] (responde) [below of=persona] {Responde} edge node[auto,swap] {1:N} (ipertenece);

\node[entity] (pregunta) [below of=tieneun] {Pregunta};
\node[attribute] (idpreg) [below of=pregunta] {\key{id\_preg}} edge (pregunta);
\node[attribute] (ptexto) [below right of=pregunta] {p\_texto} edge (pregunta);
\node[attribute] (pnumber) [right of=pregunta] {p\_numero} edge (pregunta);

\node[relationship] (tiene) [below of=responde] {Tiene} edge node[auto,swap] {1:N} (pregunta) edge node[auto,swap] {0:N} (responde);
\node[rectangle, draw=black, fit=(tiene), inner sep=0em] (itiene) {};

\node[entity] (alternativa) [left of=tiene] {Alternativa} edge node[auto,swap] {1:1} (tiene);
\node[attribute] (idalt) [above of=alternativa] {\key{id\_altern}} edge (alternativa);
\node[attribute] (atexto) [below of=alternativa] {a\_texto} edge (alternativa);
\node[attribute] (anumber) [below right of=alternativa] {a\_numero} edge (alternativa);
\end{tikzpicture}
\end{document}


Hope it helps.

Tuesday, June 15, 2010

Attempting to filter out the annoying Vuvuzela with MPlayer

So, just followed an Slashdot link that got me to a lifehacker post about removing the infamous Vuvuzela sound from the FIFA 2010 worldcup broadcasts by equalizing out ~250 and ~500 Hz respectively. Now, as some of you might know, with MPlayer -af equalizer you can attempt such procedure.

Here is a quick cmd line for you to try out:

mplayer -af resample=192000,equalizer=0:0:0:-12:-12:0:0:0:0:0 [someavfile]

The resampling is almost guaranteed to be needed, otherwise the equalizer will throw away everything above your original material's sample rate. You might also want to try out sinesupress from the -af filters, let me know if you get any better results with that approach.

Wednesday, March 11, 2009

Quick tip on transfering files from your phone to your gnome-ill computer

So, I just hate when things that are supposed to work
right out of the box just doesn't..., Anyway, 4 steps
recipe to get this working under debian/sid:

1.- Install gnome-bluetooth and bluez-gnome: (as root) apt-get install gnome-bluetooth bluez-gnome
2.- Run bluetooth-applet if its not running already: bluetooth-applet
3.- Make your adapter discoverable and connectable: Right click on bluetooth-applet, then preferences, then choose 'Visible and connectable for other devices' under 'Mode of operation'.
4.- run gnome-obex-server from the console, an small icon should pop up on your pannel.

Now do what you need to do on your phone to select and send your files.

Not saying this is the right way to do it but what the hell, this should get you going.