Archive of articles classified as' "Arch"

Back home

Converting Video for iPad 3

27/05/2012

The new iPad isn’t too bad minus the video playback problem.  Now that I no longer have the Xoom, one problem that I have run into is video.  So far, Arista, HandBrake and Avidemux have not done the trick, so I have resorted to ffmpeg in a  terminal.  Some of the issues that I have already run into is that ffmpeg no longer support faac.  The problem is that all videos must be is mp4 with h264 video up to 720p at 30fps and have aac audio at 160Kbps at 48kHz.  The solution is simple (so I thought) but since ffmpeg doesn’t support faac, I have realized that I need to manually build that support in.

In Arch Linux, I found this to be a fairly simple process, simply compile abs, and then modify the PKGBUILD so that the support is added.

I like to work out of a root directory ‘/work’.

Add the following to PKGBUILD after the ‘./configure \’ line:

Now, all you have to do is build it.

After that, it’s time to start using ffmpeg. Make sure that x264 is installed. (The x264-git version installs, but for some reason, it doesn’t work right with ffmpeg. I believe that it names all of it’s files x264-git vice x264 so that both packages can exist in the Arch repositories without conflict, but I am not certain).

Following the guidelines above, the following is required for a video to properly play back on the iPad 3:
- Video container is mp4
- Video type is x264
- Video size is 1024×768/720p or greater
- Framerate 30fps
- Audio is AAC (the reason why faac support was added to ffmpeg)
- Audio is 160kbps at 48kHz

So, in order, the ffmpeg breakout becomes:
-vcodec libx264
-s 1024×768
-threads 0
-crf 21
-r 30
-acodec libfaac
-ab 160k
-ar 48000
-ac 2

So, the command would be:

The process takes about an hour, so I will provide an update if it worked or not.

No Comments

The Beginning of Arduino

12/05/2012

20120512 133616  The Beginning of Arduino

 

I just received my Arduino Mega 2650 in the mail about 20 minutes ago.  So far, I am very impressed with the design and the simplicity.  I installed the software (which, to my surprise, they have a linux version) and began to upload my first program to the board.

This is where the problem started.  I am receiving errors on what seems to be depriciated items in avr-libc (in arch linux).

I am beginning to troubleshoot the problem now, but I am not sure what the fix will be. Once I do figure it out though, I will be updating this post.

Edit: The problem was indeed avr-libc. The newest version (1.8.0) depreciated some of the required features to get the Arduino software to compile properly. The easiest solution was downgrading back to 1.7.1.

2 Comments

Arch Linux Web & Mail Server (Part 1)

23/11/2010

After wondering how difficult it would be to configure my own web server that could also handle mail, I decided to start a small project at home involving my desktop. I wanted to see if I could replicate the servers that I currently use to host this site, but on a much smaller scale in terms of hardware. Until now, I didn’t realize how simple it was to actually configure a server with apache, mysql, php, and roundcube (for webmail).

This post will cover how I configured my Arch linux desktop to function as a web server and webmail server. Arch linux has provided a detailed guide that was used and helped out greatly. Although it proved a great help, this post is a summary of it and a few other miscellaneous articles.

The basic requirements for a linux box to function as a web server are apache, sql and php.  In Arch linux, you can install the required packages using the following command:

Next, you will need to configure a couple of things. (Most of the packages come pre-configured, however, you will just need to verify the configuration.)  First, you need to make sure that your ‘HOSTNAME’ configurations match in both /etc/rc.conf and /etc/hosts.

Next, you will need to comment the following line in /etc/httpd/conf/httpd.conf (should be around line 91).

At the end of the LoadModule section (around line 121) add the following:

and add this line to the end of the Include section (around line 473):

This will get the basic functions in place to start your Apache server running PHP. This is in no way a secure setup, and you will need to make any additional changes to your httpd.conf and other security files to make your system more secure. To test your install, first start your services with:

# /etc/rc.d/httpd start

and then you need to make a simple index.php file in ‘/srv/http/’ and point your browser to http://localhost/.

A good example for a PHP page is the following:

The Next section will cover mysql, myphpadmin and roundcube webmail server setup.

No Comments