Mittwoch, 22. April 2015

My Change from F21 to F22-Beta

Oh well, how life just is, it happens all at once...

For the last 3 weeks i've been writing a script to build ffmpeg with some more features built in, such as x265 and libcd{io,db}.

During some testruns, i always do on my live machine - bad idea - dont do that! :p , i passed accidently passed no PREFIX, to the build script, with the result of several libs beeing linked ..now... to /usr/local/lib{64}, and me then deleted those files.

One would not assume, but somehow that inflicted pythons usage when i wanted to update the repositry for the vhs and tui updates.
The command 'createrepo' failed because of some error by python.

I then reinstalled python, and all other packages that might have some inflictation. So everything the was available from the fedora repositries but not the actual audio or video codecs.

Just happen to be in the IRC, seeing an announcement of the Beta release, and figured i've always had good experiences with the beta release, so i would skip the error search/troubleshoot and just install one of the betas.

As my moms tryout device (an old Dell Inspirion 510m) had no OS at the time, its now running XFCE F22 32bit just fine.

Also, since Fedora catched with with the LoveLock release of F15, figured it might be time to give it another try after 6 releases.

Quite more comfortable and fitting desktop usage than initialy.
And my laptop feels a bit cooler by temperature now too (compared to earlier G3 tryouts).
Though, for its currently building an AwesomeWM F22 based iso, its still quite cool.
I will have to compare when my livespin is installed.
And then share the used iso if the installation succeeded.

So as a final closure, once again the switch to the new release at its beta stage just so happened by coincidence with a part-break of my production system, and leads to an updated livecd iso.

As the pacmanfm-qt version just started to work properly on my system, i hope to be finaly able to solve the hotlink issue within the next few isos uploaded.

Happy living!

Dienstag, 7. April 2015

Building FFMPEG

Been on in all easter days, it pulls in so many different applications, codecs, drivers and whatnot.
Just imagine, the temporary build path contains more than 500mb of data, compared to the final binary of ffmpeg, which is not even 500kb in size when done.

Yesterday evening i was finaly able to build the (my) first ffmpeg.
Today when i wanted to redo it, starting with 0, figured many of the build steps got accidently optimized for rerunning, which means, some of the parameters for the first 'contact' got removed and have to be readded.

Eventhouth its a smaller script, about 700 lines of code, not beeing familiar with the building process of that many applications is not a small challenge.

But i just encoded my first x265 video last night, and i have to say, the quality is great, eveb more when comparing to the filesize.

That was a good motivator, to keep me going for the still missing (failing) things, such as, but not limited to:
  • vorbis
  • webp
  • v4l
  • ass
  • srt
  • rtmp
  • speex
  • wav
  • dc1394
Once it does what i want, this script will be part of VHS, as its a handler for ffmpeg it makes sense to let it build the tools it depends on.

I'll keep you posted :)

Samstag, 4. April 2015

Lan- & Global IP

As you probably know, a computer has at least 2 different IPs, at least when its connected to the internet.

Getting the internal (lan) IP adress, is no issue, we simply invoke ifconf and search the broadcast lines providing an IP adress.

For the external IP adress, one needs to parse a website which provides this information.
In this example i'm using this page: http://www.unix.com/what-is-my-ip.php

As first we load the page into a DATA variable, and prepare some of the html tags, as php will be interpreted and transformed to html.
How to get the actual value, depends upon the html you parse, and the hoster.

#!/usr/bin/env bash
# File:     myip.sh
# Description:    Simply prints internal and external IP using http://www.unix.com/what-is-my-ip.php
# GNU General Public License (GPL) 2015 by Simon Arjuna Erat (sea) (erat.simon@gmail.com)
# ------------------------------------------------------
#
#    Variables
#
    URL=http://www.unix.com/what-is-my-ip.php
    DATA=$(curl -s $URL) > /dev/zero
    str="DNS Lookup For"
#
#    Action & Display
#
    printf "%s\t%s\n" \
        "Internal" \
        "$(ifconfig | \
            grep -i broadcast | grep ^[[:space:]] | \
            awk '{ print $2}')"
    printf "%s\t%s\n" \
        "External" \
        "$(echo "$DATA" | \
            sed s,"$str","\n\n$str",g | sed s,"<"," ",g | \
            grep "$str" | awk '{print $4}')"