Monday, November 26, 2012

Getting ffmpeg to work with libfaac on Fedora

You got your fancy Fedora 17 working.  And then you try to use ffmpeg to encode something only to see the dreaded Unknown Encoder 'libfaac' message.

When you've accepted the fact that you need to compile from source for licensing reasons, here's a cheat sheet for fc17 based on (easier) instructions by Doran L. Barton, Recompiling ffmpeg for Fedora 12 to add faac support.

$ uname -a
Linux *** 3.6.7-4.fc17.x86_64 #1 SMP Tue Nov 20 19:40:01 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ yumdownloader --source ffmpeg

$ rpm -ivh ffmpeg-0.10.6-1.fc17.src.rpm

# update the Release label
$ vi ~/rpmbuild/SPECS/ffmpeg.spec


# get dependencies
$ yum install \
    celt-devel libass-devel libcdio-devel libmodplug-devel libv4l-devel \
    libXvMC-devel openal-soft-devel openjpeg-devel pulseaudio-libs-devel

$ rpmbuild -ba ~/rpmbuild/SPECS/ffmpeg.spec --with faac

$ ls ~/rpmbuild/RPMS/x86_64/ffmpeg-*
ffmpeg-0.10.6-1.fc17_nrh.x86_64.rpm        ffmpeg-devel-0.10.6-1.fc17_nrh.x86_64.rpm
ffmpeg-debuginfo-0.10.6-1.fc17_nrh.x86_64.rpm  ffmpeg-libs-0.10.6-1.fc17_nrh.x86_64.rpm

$ rpm -Uvh ~/rpmbuild/RPMS/x86_64/ffmpeg-*
...

$ ffmpeg
ffmpeg version 0.10.6 Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 26 2012 17:48:46 with gcc 4.7.2 20120921 (Red Hat 4.7.2-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg 
   --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man 
   --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
   -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 
   --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio 
   --enable-libcelt --enable-libdc1394 --enable-libfaac --enable-nonfree --disable-indev=jack
   --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal 
   --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger 
   --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 
   --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab 
   --enable-avfilter --enable-postproc --enable-pthreads --disable-static 
   --enable-shared --enable-gpl --disable-debug --disable-stripping 
   --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Hyper fast Audio and Video encoder

Enjoy!

Sunday, August 30, 2009

Fedora 12 Alpha


The new Fedora is available as an alpha download here. Haven't really had much time to dig into the new features, but here are the installation screen shots (installed on a virtual machine using the Live CD and Q).

Notice (especially) the kick-ass artwork!



































Saturday, August 29, 2009

Graphical Boot in Fedora 10 (and Later)


If you use Fedora 10 (or a later version), you may have heard that there is a new graphical boot sequence using something called Plymouth. But if you see this kind of tri-color bar, then Plymouth is using its fall-back mode in the absence of a kernel mode setting display driver.

To get beyond this fail-safe mode, you can add a mode setting yourself. To test it out, you can just add something like vga=0x318 to the initrd line right from the boot menu in grub. From the boot menu, press "Tab" to edit and you can modify the command. For example:



The vga=0x318 is a reasonable default (1024 x 768); look here for alternatives like vga=0x314.

If you get it right, the boot sequence should look more like this ... the Fedora call-out fills up during boot and pulses before the login prompt appears.


If you're not a fan of the filling call-out, there are other themes available. Search for spinfinity and you'll find how you can use plymouth-set-default-plugin to use a different theme. Here's the how-to that helped me set up the solar theme.

Sunday, November 16, 2008

Got the kernel update blues

If you use linux with funky hardware, you will periodically enjoy time spent debugging the results of a new kernel.

We have an old Sony GRX laptop with Fedora 9. A long time ago, we bought an Asante AeroLan AL5410-G PCMCIA card. (For those who may be looking for the firmware, the Asante site still has it available as part of the driver download.) I decided to try to get this card working with Fedora. It did ... at some point. Thank you, ACX100/ACX111 project!

When the 2.6.27.5-37 kernel came along last week, the last build (acx-20080210) failed. Here's the build log:

make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering directory `/usr/src/kernels/2.6.27.5-37.fc9.i686'
LD /usr/src/acx-20080210/built-in.o
CC [M] /usr/src/acx-20080210/wlan.o
CC [M] /usr/src/acx-20080210/conv.o
CC [M] /usr/src/acx-20080210/ioctl.o
/usr/src/acx-20080210/ioctl.c: In function ‘acx_s_scan_add_station’:
/usr/src/acx-20080210/ioctl.c:506: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:506: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:506: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/acx-20080210/ioctl.c:506: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/acx-20080210/ioctl.c:513: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:513: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:513: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:513: error: too few arguments to function ‘iwe_stream_add_point’
/usr/src/acx-20080210/ioctl.c:523: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:523: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:523: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/acx-20080210/ioctl.c:523: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/acx-20080210/ioctl.c:531: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:531: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:531: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/acx-20080210/ioctl.c:531: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/acx-20080210/ioctl.c:549: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:549: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:549: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/acx-20080210/ioctl.c:549: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/acx-20080210/ioctl.c:559: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:559: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:559: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:559: error: too few arguments to function ‘iwe_stream_add_point’
/usr/src/acx-20080210/ioctl.c:574: warning: passing argument 1 of ‘iwe_stream_add_value’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:574: warning: passing argument 4 of ‘iwe_stream_add_value’ from incompatible pointer type
/usr/src/acx-20080210/ioctl.c:574: warning: passing argument 5 of ‘iwe_stream_add_value’ makes pointer from integer without a cast
/usr/src/acx-20080210/ioctl.c:574: error: too few arguments to function ‘iwe_stream_add_value’
make[1]: *** [/usr/src/acx-20080210/ioctl.o] Error 1
make: *** [_module_/usr/src/acx-20080210] Error 2
make: Leaving directory `/usr/src/kernels/2.6.27.5-37.fc9.i686'


It turns out that the underlying API has changed. I've uploaded a patch on the project site for those afflicted.

Now -- does anyone else have a problem with this card and NetworkManager? It just scans forever and refuses to associate.


Nov 16 13:23:01 sonygrx kernel: acx_set_status(1):SCANNING
Nov 16 13:23:01 sonygrx NetworkManager: nm_error_monitoring_device_link_state(): error monitoring wired ethernet link state: error occurred while waiting for data on socket
Nov 16 13:23:01 sonygrx kernel: start_scan: seems like previous scan is still running. Not starting anew. Please report
Nov 16 13:23:01 sonygrx NetworkManager: nm_error_monitoring_device_link_state(): error monitoring wired ethernet link state: error occurred while waiting for data on socket
Nov 16 13:23:01 sonygrx kernel: get_mask 0x00000000, set_mask 0x00000000 - after update
Nov 16 13:23:01 sonygrx NetworkManager: nm_error_monitoring_device_link_state(): error monitoring wired ethernet link state: error occurred while waiting for data on socket
Nov 16 13:23:01 sonygrx kernel: get_mask 0x00000000, set_mask 0x00040000
Nov 16 13:23:01 sonygrx NetworkManager: nm_error_monitoring_device_link_state(): error monitoring wired ethernet link state: error occurred while waiting for data on socket
Nov 16 13:23:01 sonygrx kernel: important setting has been changed. Need to update packet templates, too
Nov 16 13:23:01 sonygrx NetworkManager: nm_error_monitoring_device_link_state(): error monitoring wired ethernet link state: error occurred while waiting for data on socket
Nov 16 13:23:01 sonygrx kernel: updating packet templates

Wednesday, October 15, 2008

Blog Action Day

Today is Blog Action Day. The topic this year is poverty.

Many have written about many different things, but let's take a moment to consider how poverty affects humanity's ability to satisfy one of the few critical needs: food. No, I'm not talking about GMO-free food, nor am I talking about trans fat free food, nor am I talking about sugar-free cookies. I'm talking about the staples -- I'm talking about sustenance.


BBC: World hunger


I'm talking about how our ability and desire to pay more for food and siphon away food to create fuel is contributing to already soaring food prices. The world population is expected to grow from close to 6 billion today to approximately 9 billion by 2050. (Source: BBC/UN) The FAO estimates that 75m of those who are hungry are hungry because of high food prices.

And we're still wasting food. According to this CNN article that cites the US FDA, approximately one-quarter or 25.9 million tons of food winds up in garbage cans all over America. So how about this -- how about one week of consuming everything you buy?

Would that be too hard?

Sunday, September 14, 2008

University technologies ... more tag clouds

If you've spent enough time at a university, you'll have come into contact with the "Office of Technology Commercialization", "Office of Technology Licensing", or someone responsible for what's called "technology transfer". Essentially, these people are responsible for finding problems that can be solved using technology created by the university and making that technology available to the right people ... for a fee of course.

If this surprises you, consider reading the primer offered by Stanford's OTL. The Bayh-Dole act specifically intended to make federal government funded technology more accessible.

So what's this got to do with tag clouds? Well, just think about thousands of people walking around, some with ideas, some with solutions, some with problems ... we know they don't use all the same terms, so how can these people find each other productively? Think about why Google offers search suggestions. You may be looking for "software", but I might always refer to "algorithms" or "programs".

That's the power of a tag cloud. When words are placed out of context, the brain is probably forced to be more open about interpretation.

iBRIDGE screenshot


The nice people at iBRIDGE know this (or unknowingly benefit from it). Try it out. Try searching for "natural language" and see how the tags to the right help out.

For another example, look at Nestlé's US and EP patent filings. You could either scan 1,436 entries to find references to "ice cream", or you could simply click "ice", "cream", "confection", or "frozen".

So here's my question: why don't other technology search sites like yet2.com, e-ip.com, etc. use tag clouds? Don't make me click through pages of results -- give me a tag cloud!

Sunday, September 07, 2008

The Experiment

Few things engage me as much as text mining. I've had some time to play recently so I created a new toy that allows me to catch up on the news in an interesting way.



The essential mechanism is simple: use RSS to get data from a few news feeds, do some simple term analysis, add a sprinkle of "intelligent tagging", and presto!

Take a look: News site

You can click each term in the tag cloud to see a list of news articles where the term appeared. You can click over to the original article if it gets your attention.

Tag clouds are not new. The presentation here isn't half as pretty as wordle. But it was fun to create and I hope you enjoy it as well.