Saturday, March 12, 2016

Convert mp4 to mp3 using ffmpeg

How to convert mp4 files from youtube to mp3:


find . -type f -name "*.mp4" -exec ffmpeg -i "{}" -b:a 192K -vn "{}.mp3" -n ;

That can be re-run without issue, it will not overwrite files because of the "-n" flag.

Tuesday, September 16, 2014

Intel Nuc is a great Media Center Computer

Intel NUC Kit D34010WYK The Ultimate Media Center Device

Specifications:
  • i3 Haswell Processor
  • Intel HD 4400 GPU
  • Micro HDMI
  • 15W peak power usage
 What is required to get it working:
  • TV or Monitor with HDMI
  •  Laptop Ram
  • Mini PCI express slot for a SSD based storage 
Total Cost:
  • NUC - $300
  • Ram 4GB - $60
  • 256GB Corsair SSD - $150
  • Total:
    • ~$550 + TV/Monitor

Essentially the processor is an Ultrabook processor in a different form factor. So you get the performance of an Ultrabook, but for much much cheaper.


The Intel 4400 HD GPU is capable of playing most games on low-medium settings:
https://www.youtube.com/watch?v=ysDgUdQLvUk



So after setting up Netflix, ftp server, VLC media player, windows file sharing, snes/n64 emulator. You get a complete media center that is capable of playing movies, games, music off of a local network, while also being capable of playing most games on low-medium settings.

One big bonus for using such a power efficient device is that the peak power usage is 15W and standby is around 2-5W, so your electric bill will not go up by much -- even if you keep the device on all of the time.



Wednesday, May 7, 2014

Amazon Kindle 3.3 Sound Output FFMPEG



The following command is great for creating sound files for the Kindle:
ffmpeg -i 8bp027-04-nullsleep-playful_panda.mp3 -ar 8000 -ac 1 -acodec pcm_u8 panda.wav

Play the sound with the following:
aplay /tmp/panda.wav
 

Sunday, May 4, 2014

Compiling Linux kindle 2.6.26-rt-lab126 armv6l for Kindle 3


Device Supported

These instructions are specifically for the Kindle 3, the kernel version on the original device must be exactly: Linux kindle 2.6.26-rt-lab126 after the 3.3 firmware update from Amazon.

ARM x64 Cross Compile Toolchain

I found and extracted the arm-2008q3 code sorcery tool-chain. (This one is older and most certainly compatible with the kernel verison)

Linux Kernel Source

Get and Extract the linux-2.6.26-lab126.tar.bz2  from Amazon sources (under Kindle 3) Kindle_src_3.3_611680021.tar.gz

Apply kindle-3.3-kernel-buildfix.patch
patch -p1 < ./kindle-3.3-kernel-buildfix.patch

Generate .config file
make imx35_luigi_defconfig

Modify the following config setting to the following
CONFIG_INITRAMFS_SOURCE=""

Setup Build ENV
export ARCH=arm
export CROSS_COMPILE=/home/thomas/workspace/arm-2008q3/bin/arm-none-linux-gnueabi-

Build Script
#!/bin/sh
echo "=============Making make"
make

echo "=============Making uImage"
make uImage

echo "=============Making modules"
make modules

echo "=============Making modules tar at linux-2.6.26-rt-lab126.tar.gz"
make targz-pkg

echo "=============Making modules.dep"
depmod -ae -F System.map -b tar-install -r 2.6.26-rt-lab126 -n > modules.dep

# replace /kernel with /lib/modules/2.6.26-rt-lab126/kernel/
echo "=============Applying /kernel directory remapping"
perl -pi -e 's/kernel\//\/lib\/modules\/2.6.26-rt-lab126\/kernel\//g' modules.dep

echo "=============Outputing uImage, modules.dep and tared modules into ./export directory"
mkdir ./export
cp arch/arm/boot/uImage ./export/.
cp modules.dep ./export/.
cp linux-2.6.26-rt-lab126.tar.gz ./export/. 

Flashing Kernel on Kindle

SCP the ./export folder contents to /tmp/. on your kindle
Extract linux-2.6.26-rt-lab126.tar.gz to /lib/modules
Extract modules.dep to /lib/modules/2.6.26-rt-lab126

chmod 644 /lib/modules/2.6.26-rt-lab126/modules.dep
/test/flashtools/luigi/update /tmp/uImage

Friday, March 21, 2014

How to Setup Perforce Merge p4merge with git in OSX

1. Download P4V.dmg (Perforce Client)

2. Copy the p4merge.app to your /Applications directory

3. Then run the following commands:
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge

Sunday, October 27, 2013

Linux Mount OSX NFS Share


OSX

/etc/nfsd.conf
nfs.server.nfsd_threads = 20
nfs.server.tcp = 1
nfs.server.mount.require_resv_port=0

/etc/exports
/MYVOLUME -alldirs -32bitclients -maproot=root:wheel

LINUX
/etc/fstab
192.168.0.100:/MYVOLUME /MNTPOINT nfs sync,noresvport 0 0 

Thursday, September 26, 2013

Hackintosh OSX for GA-Z77X-UDH3H


Note: I am using an ATI6850 -- an Nvidia card will have different installation instructions.


Creating the Mountain Lion OSX Boot USB
  1. Download OSX Mountain Lion 10.8.3
  2. Partition Drive as MBR with case in-sensitive journaling HFS+
  3. Install on 8GB+ USB drive with unibeast-1.7.0-gold.pkg (removes DMOS image checks)
  4. Rename /System/Library/Extensions/ATI6000Controller.kext to ATI6000Controller.bak
  5. Disable Virtualization in bios
  6. Boot with no additional boot flags
Fixing OSX after installation

  1. Boot with -x -f -v
  2. Run Multi-beast
    1. Chimera Bootloader v2.2
    2. Atheros ALXEthernet v1.0.2
    3. 10.8.3+ TRIM Patch
  3. Unzip Kexts OSX10.8.3.zip (from OSX folder in dropbox)
    1. Install all of the kexts (ATI, AppleHDA, USBXHCI) with kext utility
  4. Unzip Extra.tgz  (from OSX folder in dropbox)
    1. Copy custom.aml to /Extra
    2. Copy org.chamelon.Boot.plist to /Extra

BAM PERFECT HACKINTOSH!


Note: If anyone is interested in obtained any of the files mentioned about, please make a post in the comments or send me an email.