Friday, June 25, 2010

Animated gif to video

This little recipe worked for the basic job of converting the giv to an avi.


mplayer animated.gif -vo yuv4mpeg
ffmpeg -i stream.yuv -an -r 24 -b 640 -s vga -aspect 4:3 test.avi


However I wanted to loop the gif, but ffmpeg's -loop_input and -loop_ouput had no affect. Decided to make a copy and cat a few times...but this didn't work as expected. (Save yourself time and don't copy this section!)


mencoder -oac copy -ovc copy -forceidx test.avi test2.avi -o test.avi
mencoder -oac copy -ovc copy -forceidx test.avi test2.avi -o test.avi
mencoder -oac copy -ovc copy -forceidx test.avi test2.avi -o test.avi


Tried this with no luck:


mplayer -loop 10 test.avi -vo yuv4mpeg


Finally found a good way:


avimerge -i test.avi test2.avi test3.avi - o mergedfile.avi


Sweet!

Wednesday, June 23, 2010

Logitech webcam issues with Ubuntu 10.04 LTS

Update:

Fixed (well, a workaround): Setting environment variable LD_PRELOAD prior to running video problem solves issues on my box.

$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so cheese


---Original Text follows---

cheese and other video programs have been working rather poorly on my AMD64 bit Ubuntu Studio install.

Errors like the following show up:


libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffd9
libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff
libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffec
libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff
libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffd9
libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000fffd


Rebuilding the latest drivers from linuxtv.org didn't help. I'm still looking for a solution.

Note: Same camera produces same error on a second computer running same version of Ubuntu.

lsusb

Bus 005 Device 004: ID 046d:089d Logitech, Inc. QuickCam E2500 series

gstreamer-properties is a great test tool for this kind of thing.


I'm going to log a bug on this one.

Sunday, June 20, 2010

New RSS feed

If you are feeding this blog into Google Reader, update your settings and pull from here instead:

http://www.devinvenable.com/rss/feed.xml

I pull my activity from several sources (including blogger.com) to display a nicely formatted aggregate of my online activity on my home page. But it hasn't been possible to subscribe to the aggregate until now. I use Universal Feed Parser to combine my various feeds and had hoped that there would be a nice method to easily turn the parsed values back into serialized ATOM. Poking around, I didn't find any such method, so I used PyRSS2Gen to pack the parsed dictionary back into RSS. It probably would have been just as easy to load an XML library and just write out XML, but I didn't want to have to read specifications or, really, do much work on this. Still took me at least an hour of my life, but that's not so bad. If it wasn't kind of fun I wouldn't be monkeying with it on my day off!

Friday, June 04, 2010

Allow Sendmail on Centos to accept connections on port 25

Need to use sendmail as an MTA? It's running but your box is not accepting incoming connections on port 25?

Perhaps you need to do this:


The default sendmail.cf file does not allow Sendmail to accept network connections from any host other than the local computer. To configure Sendmail as a server for other clients, edit the /etc/mail/sendmail.mc file, and either change the address specified in the Addr= option of the DAEMON_OPTIONS directive from 127.0.0.1 to the IP address of an active network device or comment out the DAEMON_OPTIONS directive all together by placing dnl at the beginning of the line. When finished, regenerate /etc/mail/sendmail.cf by executing the following command:



m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf


Then restart the service.

Wednesday, June 02, 2010

A little something I need to remember...

To turn off expandtab for editing makefiles, put the following in your vimrc:

autocmd FileType make setlocal noexpandtab