Posts

Showing posts from July, 2009

ffmpeg perfect mp4 recipe?

We use the flowplayer flash player to display all of the videos on a site we built. The player can play h264 videos and this is the recommended recipe/formula for ffmpeg.

Original Post: http://flowplayer.org/forum/7/12671
ffmpeg -y -i trailerTest.mov -acodec libfaac -ar 44100 -ab 96k -coder ac -me full -me_range 16 -subq 5 -sc_threshold 40 -vcodec libx264 -s 1280x544" -b 1600k -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -i_qfactor 0.71 -keyint_min 25 -b_strategy 1 -g 250 -r 20 87.mp4 Make sure and read the post as there is a lot of information in there about different setups.

php/javascript rotating image with flare

I am going through the rebranding of our corporate website and wanted to stay away from flash as much as possible to make things universal. I was looking for a very easy rotator and found one with a cool Javascript overlay. Here is the original person who I started with and then modified the code.

http://www.lawnydesigns.com/2009/07/how-to-add-jquery-image-slider-to-your.html

Here is my final code which works great as well. I used the same JS files. <strong>HEAD INFORMATION</strong> <pre lang="HTML" line="1"><!-- JavaScripts--> <script type="text/javascript" src="includes/jquery.js"></script> <script type="text/javascript" src="includes/s3Slider.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#s3slider').s3Slider({ timeOut: 5000 }); }); </script> </head> <strong>BODY&l…

Ubuntu Bonding 2+ NICs

I had problems with trying to get two independent NIC on the same network so I thought I would use bonding and it seems to work well. Here are the instructions for setting it up on Ubuntu 8.10, yes I know reverting back to 8.10 after so much invested in 9.04. I think the problem here is that 9.04 changed so much with the network that it has become a bit more tricky to get things working. This should work fine with 9.04 but I know 8.10 is stable with ServerOS and it should make a better NAS box for me. Anyways here are the instructions:

Install the bonding enslave programs apt-get install ifenslave Shutdown any active network interfaces you intend to use with bonding sudo -s ifdown eth0 ifdown eth1 Comment out the ethernet configurations from /etc/network/interfaces #auto eth0 #iface eth0 inet dhcp Add in the bonding configuration into /etc/network/interfaces auto bond0 iface bond0 inet dhcp slaves all bond-mode 4 bond-miimon 100 Bring up the interface sudo ifup bon…

Ubuntu Networking Commands

Found a couple of useful command for trouble shooting networking problems on Ubuntu I thought I would share.

show all network adaptors lshw -C network show all network configurations ifconfig -a Turn ON or OFF the network adaptor ifconfig eth1 up ifconfig eth1 down

Ruby on Rails compile mysql gem

I ran into this little problem of compiling mysql gem on a centOS box and thought I would share this.

NOTE: updated January 2010
If you don't have the mySQL development libraries installed then you might want to install them. apt-get install libmysqlclient*-dev Make sure you have the DEV libraries installed on the linux box and then run this command gem install mysql --no-rdoc --no-ri -- --with-mysql-config=/usr/bin/mysql_config It work for me on CentOS 5.3 just today.

Ubuntu 9.04 NFS fstab problems

I had a problem with the new release of Ubuntu 9.04 server not mounting remote shares upon boot. Turns out that the network service starts up after fstab now. An easy fix was to edit the /etc/rc.local file here is what I changed/added

/etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. #mount the NFS Shares mount -a exit 0 Above just added the "mount -a" just before the exit 0. Hope this helps everyone who is having the same problem. Seems to work perfect for me.

Ubuntu Linux Header

So in some cases you need the linux headers installed on the machine in order compile new software

To find out what version of linux you are running run this uname -r You will get your version, example: 2.6.15-27-386 Then try to write this command: apt-get install linux-headers-2.6.15-27-386 You can also try this.. apt-get install linux-headers-$(uname -r)

Free Zipcode Database

I am working on a project for looking up distances from zipcodes. I found an open source database and some other information for making this happen. I will post more on this when I get it completed.

http://zips.sourceforge.net/

Also take a look at this site.

http://www.populardata.com/ (you can find the Canadian DB from there)

Good luck and I will post a bunch of information on this page when I am finished.

Quicktime codec for FFmpeg

I am working on a project with QuickTime movies and found that adding the extra library when compiling the system apt-get install libquicktime-dev I wasn't able to compile the ffmpeg with this but please go back and take a look at the recently updated ffmpeg build I revised.

FLVtool2 for Flash and FFmpeg

In order to get pseudostreaming/streaming of flash you will need to either setup this in your ffmpeg system or go back and use a tool to build a meta file to enable streaming. I found an easy tool that should help make the process much easier on Linux systems. Using ubuntu it is very easy.

installing flvtool2 apt-get install flvtool2 Simple command line for making the META file flvtool2 -U <video_file>.flv Also you should add in the "g-" into your ffmpeg scripts. Here is an example ffmpeg -i UncompressedMov.mov -sameq -g 1 OutputFile.flv In ffmpeg the number of keyframes is controlled by the g- flag. A smaller value leads to more keyframes and a larger file size. With small video files (less than 10Mb) a value such as 30 should be fine.

Network repair when switching NIC

So recently I have a VMware image go down and needed to move it to another machine. I had problems with the NIC when it was moved. Here I what I did.

In terminal under root I typed dmesg | grep eth0 You will probably get an error that the eth0 was changed. Take the new name for the eth0 and edit the.. nano /etc/networking/interfaces I changed the 0 to 1 and then rebooted the machine and everything seemed to work fine.

Other command that I did where modprobe e1000 or modprobe pcnet32