Wednesday, December 24, 2014

You can now show your support!


You can now support my efforts and hard work that's been occurring since I learned Linux and about Open Source back in 2005. I created a Patreon because YouTube advertising model just isn't tailored to the smaller content creators. If you feel I have ever helped you in any way over xbox live, on a forum, over the phone, on skype or any other way here's your chance to finally give back to Ubu.

Patreon campaign for Linux Tech and Gaming Podcast

-Ubu out

Saturday, November 15, 2014

Ubuntu - Starting Minecraft Server Automagically FAILs

I run a Minecraft server for myself and some close friends. One thing that I struggled with was getting Minecraft to auto-start when the machine booted up. This is important so that if my power is ever interrupted (not on a UPS, yet.....) the computer would auto-restart via the UEFI bios setting which would then auto-start the Minecraft server due to the init script being added to the default system run levels from using sudo update-rc.d defaults. The error within /var/log/boot.log was
Cannot make directory '/var/run/screen': Permission denied

When I googled the error message I found that it's a bug, apparently screen-cleanup is running via upstart much earlier than it expects to have run, and is failing to correctly clean up the /var/run/screen directory. I'm not sure whether this is an acceptable fix or not but I found a solution after much googling and reading. Basically we're not going to rely on the screen-cleanup upstart or init script, we're going to remove that upstart job completely and within our Minecraft init script we'll create the /var/run/screen directory ourselves. I am using this minecraft init script which is right from the Minecraft wiki page and in order to get around this Ubuntu screen bug we need to make a small modification to it. Note that this modification should work for any init script you're using to auto-start your Minecraft server if you have the same screen bug in Ubuntu. The applicable section looks like the following
cd $MCPATH
as_user "cd $MCPATH && screen -h $HISTORY -dmS minecraft $INVOCATION"
sleep 7

And we need to add the commands for making the /var/run/screen directory ourselves so make it look like this
cd $MCPATH
if ! test -d /var/run/screen; then
mkdir /var/run/screen
chown root:utmp /var/run/screen
chmod 775 /var/run/screen
fi
as_user "cd $MCPATH && screen -h $HISTORY -dmS minecraft $INVOCATION"
sleep 7

It's important that after you alter your Minecraft init script you run the following commands to remove it from the various run levels and then re-add it. (I don't know if remove, defaults, and enable are ALL needed but that's what I did.
sudo update-rc.d minecraft remove

sudo update-rc.d minecraft defaults

sudo update-rc.d minecraft enable

Now when the computer starts up from it being off, a screen session will get created and your Minecraft server will get auto-started from within that screen session. You can then ssh into your server as user minecraft and issue
screen -r

and it will reattach you to your Minecraft server console. Hopefully this was helpful for you as I spent many hours trying to figure out why the init script was not working to auto-start the Minecraft server when the machine was turned on. -Ubu out

Saturday, November 1, 2014

Upgrade HELL: iOS 7 (jailbroken) to iOS 8.1 upgrade trouble

I have a 16GB iPhone 5S that had iOS firmware version 7.0.6 which I had jailbroken using Evasi0n. I've been jailbreaking my iPhones since the original untethered jailbreak was released years ago. Skip to the last paragraph if you don't want any back story.

Jailbreaking your iDevice allows additional tweaks and functionality. I had previously upgraded from iOS 6 to iOS 7 using an older computer which has a 1.8Ghz Core2Duo with 2GB of memory. That process went without trouble what so ever and all was well in my world.

Recently the iOS 8.x untethered jailbreak, Pangu, was updated to include the ability to install Cydia during the jailbreak which is a great convenience. Previous to the update, Pangu would only give you root access to the iDevice and you still had to SSH into your device and manually download and install Cydia. Now that the Pangu jailbreak utility included the ability to install Cydia I was ready to upgrade my iPhone 5S to iOS 8.1.

All of the tutorials I found made it clear that before I upgrade my iPhone to iOS 8.1 that I first needed to perform a restore to the iOS firmware 8.1. Simply doing an upgrade either OTA or using iTunes was not going to work, doing it those ways lead to boot loop issues and other unforeseen issues. I connected it to my computer I choose the Restore button and soon my problems began. It was stuck at "Restoring iPhone Software" within iTunes. I let it sit for about 20 minutes and without any change in the progress bar I realized that it was stuck and not doing what it was suppose to be doing.
I jumped on the IRC channel #jailbreak_qa on freenode and they suggested the normal solutions of reinstalling iTunes and the AppleMobileDevice driver so I did those 2 things and it still was getting stuck at the exact same spot. I even attempted to put the iPhone into DFU mode and using shift+restore so that I could choose the IPSW file that I downloaded for my GSM iPhone 5S but again it was getting stuck at the same location. I even tried a different cable and that didn't work either.

The solution was to perform the restore using a better computer. Believe it or not using my main gaming rig which has Windows 7 Ultimate as the OS running an i5-4670k OC'd to 4.0Ghz and 8GB of DDRIII at 2133Mhz the restore worked immediately. I didn't need to use shift+restore either, I did however ensure the iPhone was in DFU mode before clicking the Restore button within iTunes. I can't believe that's how I solved the problem, I had spent countless hours googling and reading various forums and speaking with multiple people in the IRC channel as well. Now that the restore to 8.1 is complete, I will restore my iCloud backup so I get all my contacts and apps back onto the iPhone and once that's done, I will perform the Pangu jailbreak.Hopefully this post saves anyone else who's having an issue upgrading their iDevice to a newer firmware.

-Ubu out

Tuesday, October 28, 2014

Seagate firmware flash using usb created in Linux

I had an older Seagate Barracuda 7200.12 ST31000528AS (1TB SATA) drive that I literally just found laying among my pile of old hardware. I couldn't figure out why I just had a 1TB drive just sitting there so I put it into a handy SATA to USB enclosure, connected it to my system (Xubuntu 14.04)  and fired up GSmartControl. It's a GUI app for testing hard drives and among all the info it shows that there's newer firmware for the drive. The GSmartControl log even gave me a handy link to go and find out if in fact there was newer firmware for my Seagate Barracuda 1TB drive.
There was in fact newer firmware I could try out on the drive. I was running firmware version C44 and CC49 was available. Now many people will say if it's not broke don't fix it. Meaning if the drive is performing fine than just leave it be, don't bother flashing it with new firmware but I was feeling adventurous since I had just found it and it was empty. 

Viewing the options for flashing they have a Windows executable (in .exe form) or an ISO but again refers to Windows. Since I don't use Windows I set out to find a way to accomplish this task and I found it after many hours of trial and error. First I downloaded the ISO file and mounted it in my system using the following commands:
Create a mount point for it first
sudo mkdir /mnt/iso

Now let's mount it (this command assumes your current working directory is the same location you saved the downloaded ISO file. You can cd to the directory which is most likely ~/Downloads)
mount -o loop Barracuda12-ALL-CC49.iso /mnt/iso
It may warn you that it's read only which is fine cause we're only interested in copying a file out of the ISO. Open up your preferred file manager like Nautilus or Thunar, navigate to the /mnt/iso folder and grab the PH-CC49.ima file and copy it to somewhere on our system, I put it on my desktop. Now simply rename it from an .ima file to an .img file using (you may need sudo)
sudo mv ~/Desktop/PH-CC49.ima ~/Desktop/PH-CC49.img

Now we need a flash drive, the .img file is only 5.4MB so a 256MB thumb drive should work just fine. I made sure that the thumb drive was empty by using GParted, I deleted all partitions and then made a new partition table with the msdos format. Then ensure you know which device node your thumb drive is by using the command (VERY IMPORTANT STEP, using dd is very dangerous so triple check you're running the dd command onto the correct /dev/sdX drive)
sudo fdisk -l

Which will return a list of all your harddrives that are in your system as well as each of their partition tables. Look for your thumbdrive, mine was /dev/sde. Now let's write the .img file to the thumb drive using the command
dd if=~/Desktop/PH-CC49.img of=/dev/sde bs=512k

After it's done it will output something that resembles the following
33706002+0 records in
33706002+0 records out
17257473024 bytes (17 GB) copied, 34.791 s, 496 MB/s

Now you're done, you now can boot your computer using the thumb drive that you just created and you'll be presented with the Seagate Flashing Utility. If you need some instruction for using the Firmware Flashing Utility you can find that HERE. Things to note are that the drive you want to flash will need to be connected to your motherboard directly, you can't use an external enclosure and usb. Hopefully this was helpful as I spent hours finding out how to accomplish flashing a Seagate hard drive with updated firmware.

-Ubu out

Sunday, October 26, 2014

Guvcview black screen with Linux kernel 3.16

Sorry I haven't posted anything in forever, I've just been really busy gaming and livestreaming using Linux via obs-studio along with nginx to push a 2,000Kbps flv stream to both Hitbox and Twitch at the same time. This recent incident made me feel obligated to let other Linux users know what I experienced so I decided to come to my long forgotten blog and blog it.
My system has been running rock solid as of late (Xubuntu 14.04) but my friend was telling me about Ubuntu 14.10 and how it had kernel 3.16 in it by default. I believe Xubuntu 14.04 will only ever have kernel 3.13 so after feeling inadequate I thought to myself, "what's preventing me from running kernel 3.16 also?" So I found a great tutorial for installing Ubuntu Utopic's mainline 3.16 kernel into my Xubuntu 14.04 system. It was painless and believe it or not DKMS actually worked for my proprietary Nvidia graphics driver so I didn't even need to reinstall the graphics driver after installing the new kernel.

The system booted right up and all was well, or was it? I noticed that when I launched Guvcview I was only getting a black screen. To the terminal I went, launching an app from a terminal window provides a lot of information that you just don't see when launching an app from a menu or launcher. The output looked like this
guvcview 1.7.1
file guvcview_video.mkv has extension type 1
file guvcview_image.jpg has extension type 0

** (guvcview:2853): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-RZEC5PqweK: Connection refused
file guvcview_image.jpg has extension type 0
Video file suffix detected: 0
Image file suffix detected: 3
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

(guvcview:2853): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:63:17: Theming engine 'unico' not found
video device: /dev/video0
Init. UVC Camera (046d:081a) (location: usb-0000:00:14.0-3)
{ pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' }
{ discrete: width = 640, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 176 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 432, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 544, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 640, height = 360 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 752, height = 416 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 448 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 600 }
 Time interval between frame: 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 864, height = 480 }
 Time interval between frame: 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 544 }
 Time interval between frame: 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 720 }
 Time interval between frame: 1/10, 1/5,
{ discrete: width = 1024, height = 576 }
 Time interval between frame: 1/10, 1/5,
{ discrete: width = 1184, height = 656 }
 Time interval between frame: 1/10, 1/5,
{ discrete: width = 1280, height = 720 }
 Time interval between frame: 1/10, 1/5,
{ discrete: width = 1280, height = 960 }
 Time interval between frame: 2/15, 1/5,
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 176 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 432, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 544, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 640, height = 360 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 752, height = 416 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 448 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 600 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 864, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 544 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1024, height = 576 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1184, height = 656 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 960 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ pixelformat = 'RGB3', description = 'RGB3' }
{ discrete: width = 640, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 176 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 432, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 544, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 640, height = 360 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 752, height = 416 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 448 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 600 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 864, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 544 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1024, height = 576 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1184, height = 656 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 960 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ pixelformat = 'BGR3', description = 'BGR3' }
{ discrete: width = 640, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 176 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 432, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 544, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 640, height = 360 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 752, height = 416 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 448 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 600 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 864, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 544 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1024, height = 576 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1184, height = 656 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 960 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ pixelformat = 'YU12', description = 'YU12' }
{ discrete: width = 640, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 176 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 432, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 544, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 640, height = 360 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 752, height = 416 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 448 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 600 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 864, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 544 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1024, height = 576 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1184, height = 656 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 960 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ pixelformat = 'YV12', description = 'YV12' }
{ discrete: width = 640, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 176 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 432, height = 240 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 544, height = 288 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 640, height = 360 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 752, height = 416 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 448 }
 Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 800, height = 600 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 864, height = 480 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 544 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 960, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1024, height = 576 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1184, height = 656 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 720 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 1280, height = 960 }
 Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
vid:046d
pid:081a
driver:uvcvideo
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Off
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
checking format: 1196444237
VIDIOC_G_COMP:: Inappropriate ioctl for device
fps is set to 1/20
drawing controls

=======[ Output Device #1 ]=======
Description: Built-in Audio Analog Stereo
Name: alsa_output.pci-0000_00_1b.0.analog-stereo
Index: 0
Channels: 2
SampleRate: 44100
Latency: 10438 (usec)
Card: 2

=======[ Input Device #1 ]=======
Description: 081a Analog Mono
Name: alsa_input.usb-046d_081a_13339CA0-02-U0x46d0x81a.analog-mono
Index: 0
Channels: 1 (default to: 1)
SampleRate: 48000
Latency: 140 (usec)
Card: 1

=======[ Input Device #2 ]=======
Description: Monitor of Built-in Audio Analog Stereo
Name: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Index: 1
Channels: 2 (default to: 2)
SampleRate: 44100
Latency: 0 (usec)
Card: 2

=======[ Input Device #3 ]=======
Description: Built-in Audio Analog Stereo
Name: alsa_input.pci-0000_00_1b.0.analog-stereo
Index: 2
Channels: 2 (default to: 2)
SampleRate: 44100
Latency: 59 (usec)
Card: 2

Checking video mode 320x240@32bpp : OK
Ignoring empty buffer ...
Ignoring empty buffer ...
write /home/ubu/.config/guvcview/video0 OK
free controls
cleaned allocations - 100%
Closing portaudio ...OK
Closing GTK... OK

Now I don't know exactly what this means but basically it's not receiving anything from the buffer. I tried to play around with the video format from MJPG to YU12 but that just changed the preview window from black to green.

I thought maybe I needed to get a more recent version of Guvcview since the one that's provided within the Ubuntu 14.04 repository is only version 1.7.1 but even after enabling a PPA which had version 2.0.0 that still provided the same results which was a black screen. The error I got using the 2.0.0 version was as follows:
GUVCIEW: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame
Booting my machine using kernel 3.13.0-38-generic made Guvcview work again so there's something wrong with Guvcview with the new 3.16 kernel but I would like to point out that Cheese, OBS-Studio (using the v4l plugin) as well as Skype video chat work just fine so I believe it's something specific to Guvcview or even possibly the module that it uses which is uvcvideo but I'm not so sure about that since those 3 other software titles worked with the 3.16 kernel.

I really enjoy Guvcview because it has a lot of options that just aren't in Cheese and I haven't searched for any other applications that can record video from my Logitech C260 webcam. For now I have to just keep booting into kernel 3.13 if I want to use Guvcview. That's one thing I really like about Linux is it's versatility in options, I install a new kernel but if something isn't working right with the new kernel than all I have to do is watch for the GRUB boot menu and choose the kernel that I'd like to boot into. I can then either uninstall kernel 3.16 OR modify GRUB so that it boots the kernel I want by default and not just the latest installed kernel. Accomplishing that is possibly for another blog post so until next, I'll smell ya when I smell ya.

-Ubu out

UPDATE: The developer got back to me via email within about 6 hours and informed me that I needed to run his testing PPA in order to get Guvcview to work with kernel 3.16 and sure enough as soon as I enabled the testing PPA now Guvcview works again. To reiterate the testing PPA has version 2.0.1 in it whereas the stable PPA only has version 2.0.0 for Trusty Tahr. YIPPIE!!! One thing I would like to point out about PPA's is that just removing a certain PPA (add-apt-repository -r) does NOT revert packages back to their previously installed versions before you enabled a particular PPA, you need to use the ppa-purge command. That not only removes a certain PPA but also reverts any packages that were installed using the PPA that you're purging so to ensure this all works if you had installed his Stable PPA which provided version 2.0.0 and it still didn't work ensure you used ppa-purge ppa:pj-assis/ppa and then add his Testing PPA using sudo add-apt-repository ppa:pj-assis/testing and you should be golden.

Sunday, May 25, 2014

Downgrade Apple TV 2 so we can jailbreak it

I recently found an AppleTV 2 just collecting dust in my fathers basement. Since I am already running XBMC in the family room on an original 40GB AppleTV via Crystalbuntu 2.0, it was an easy decision to want to put XBMC on it. When I booted it up and went to the about section within settings it showed that it was running software 6.1.4. In order to be able to install XBMC on it I have to jailbreak it and in order to jailbreak it, the software version needs to be 5.3. Hence the reason for the post.
A critical thing to point out is that this is a version 2 AppleTV, version 3 AppleTV's haven't been jailbroken yet so if you're going to attempt at putting XBMC onto an AppleTV that you're going to buy ensure it's a version 2. Here's a video I found which explains which version is which.
This post will show you how to get your device downgraded in case it's running any software which is higher than 5.3.
Items you'll need to complete this task;
-AppleTV version 2
-Computer running Windows with iTunes installed (I used Windows 7 Ultimate and iTunes 11.2.0.115. NOTE: you can also do this within OS X but these instructions only cover using Windows)
-Micro-USB cable (do NOT use a usb hub or usb extender)
First you'll need to download the 5.3 ISPW file, I got mine from here: atv 2 5.3 ISPW
Download that ISPW file and store it on your desktop for now. In order for us to downgrade the software on your atv 2 we'll need to get the device into DFU mode. Connect power to your atv 2 as well as connect the micro-usb cable to the back of the atv 2 and the other end to your computers usb port. Using the atv 2 remote hold the menu button along with the play button for approximately 10 seconds until the light on the front of the atv 2 starts blinking. If you did it correctly iTunes window should appear and state that your device is in recovery mode. That's what we want. If yours does anything like mine it wasn't as easy to get it into DFU mode as it sounds. The following steps are what worked for me:
-Press menu+down for around 10 seconds and you'll see the light blink, this restarts the atv 2
-Remove the power cord from the back of the atv 2 (it's still receiving some power from the usb plug)
-Press menu+play for approximately 7 seconds or so (this should put it into DFU mode)
-Replace the power cable and continue
iTunes should now show that your device is in recovery mode.
It's now that you hold the shift key on your keyboard and click on "Restore Apple TV...", navigate to where you stored the 5.3 ISPW file (your desktop if you followed along) and double click it, click Restore. iTunes should now be restoring your AppleTV 2 to software version 5.3. After approximately 5 minutes iTunes will inform you that your device has been restored.
You can now unplug the micro-usb cable and connect the HDMI cable to your TV. You'll be presented with the screen where you choose the language you want your AppleTV 2 to be and proceed thru the setup and that's it. You're done. Your device is now running software version 5.3 and is ready to jailbreak.
I may create a blog post covering how to jailbreak your AppleTV 2 but it all depends on how busy I am.

-Ubu out

Saturday, May 17, 2014

Ubuntu 13.10 upgrade to 14.04 failure

I was running Xubuntu 13.10 for a couple months, it was a new installation (not an upgrade from a previous version) when I had built my current Haswell all purpose rig. I had just upgraded my server from 12.04.4 to 14.04 so I figured it was finally time to upgrade my workstation to 14.04. Normally going from 1 release to the next is as simple as clicking the Update Manager located within System but I was receiving an error. It was
ERROR:root:Could not find any typelib for Dbusmenu 
ERROR:root:Could not find any typelib for Unity
WARNING:root:can not import unity GI cannot import name Dbusmenu

(update-manager:2799): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:3274:48: Expected ',' in color definition
Checking for a new Ubuntu release
(do-release-upgrade:2872): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:3274:48: Expected ',' in color definition
** (do-release-upgrade:2872): WARNING **: Failed to load shared library 'libwebkitgtk-3.0.so.0' referenced by the typelib: libGL.so.1: cannot open shared object file: No such file or directory
/usr/lib/python3/dist-packages/gi/_gobject/__init__.py:58: Warning: cannot derive 'DistUpgrade+ReleaseNotesViewerWebkit+ReleaseNotesViewerWebkit' from non-derivable parent type 'void'
  _gobject.type_register(cls, namespace.get('__gtype_name__'))
Traceback (most recent call last):
  File "/usr/bin/do-release-upgrade", line 152, in <module>
    fetcher.run()
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py", line 274, in run
    if not self.showReleaseNotes():
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcher.py", line 71, in showReleaseNotes
    res = self._try_show_release_notes_webkit()
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcher.py", line 81, in _try_show_release_notes_webkit
    from .ReleaseNotesViewerWebkit import ReleaseNotesViewerWebkit
  File "/usr/lib/python3/dist-packages/DistUpgrade/ReleaseNotesViewerWebkit.py", line 35, in <module>
    class ReleaseNotesViewerWebkit(WebKit.WebView):
  File "/usr/lib/python3/dist-packages/gi/types.py", line 175, in __init__
    super(GObjectMeta, cls).__init__(name, bases, dict_)
  File "/usr/lib/python3/dist-packages/gi/_gobject/__init__.py", line 46, in __init__
    cls._type_register(cls.__dict__)
  File "/usr/lib/python3/dist-packages/gi/_gobject/__init__.py", line 58, in _type_register
    _gobject.type_register(cls, namespace.get('__gtype_name__'))
RuntimeError: could not create new GType: DistUpgrade+ReleaseNotesViewerWebkit+ReleaseNotesViewerWebkit (subclass of void) 
I went to System Settings and then Menu Editor to find out what command "Software Updater" was running and it turned out it was only running
/usr/bin/update-manager
which I thought was weird as normally if you're updating your system files you'll need root access so I decided to run the command with gksudo. The command that worked is the following;
gksudo update-manager
NOTE: You don't need to use /usr/bin/ due to that directory being in your environment path anyway. After running that command I was presented with the possible upgrade to 14.04. I am now running Xubuntu 14.04 and everything is working great.

-Ubu out

Monday, April 28, 2014

Is your getty (tty) a black screen?

For those running Linux who have ever been without a graphical user interface (GUI) have most likely gotten to know and love getty's. Getty is short for "get teletype", it's a program that manages physical or virtual terminals (TTY's). When it detects a connection, it prompts for a username and runs the 'login' program to authenticate the user.

Within Ubuntu based distributions there are a total of 7 tty consoles that a user can log into but note that tty7 has the X server running on it. If you ever want to get back to your GUI desktop from a tty console than you would merely hold ctrl and alt and then hit the f7 key and that should lead you to your desktop assuming your X server is properly configured and running. You get to getty consoles by holding ctrl and alt keys and then hitting the function number key that corresponds to the getty console you want to use, f1 is getty 1. So if you wanted to log into a console at tty4, you would hold ctrl and alt and then hit the f4 key. You can see how many getty's your system has running by issuing the following command
ps aux | grep tty
I am running Xubuntu 13.10 and this is the output of the above command
root      1071  0.0  0.0  23016   968 tty4     Ss+  19:09   0:00 /sbin/getty -8 38400 tty4
root      1079  0.0  0.0  23016   960 tty5     Ss+  19:09   0:00 /sbin/getty -8 38400 tty5
root      1098  0.0  0.0  23016   968 tty2     Ss+  19:09   0:00 /sbin/getty -8 38400 tty2
root      1099  0.0  0.0  23016   972 tty3     Ss+  19:09   0:00 /sbin/getty -8 38400 tty3
root      1102  0.0  0.0  23016   968 tty6     Ss+  19:09   0:00 /sbin/getty -8 38400 tty6
root      1261  3.8  1.8 262128 152288 tty7    Rs+  19:09   0:23 /usr/bin/X -core :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root      1391  0.0  0.0  77984  2184 tty1     Ss   19:09   0:00 /bin/login --    
ubu       2812  0.0  0.0  30108  4016 tty1     S+   19:10   0:00 -bash
ubu       3339  0.0  0.0  25424  1668 pts/0    S+   19:14   0:00 man getty
ubu       3416  0.0  0.0  16644   948 pts/4    S+   19:19   0:00 grep --color=auto tty

Tty consoles are best used for when you're uninstalling a graphics driver because you can't uninstall a driver that's in use by your X server. For example, I use the Nvidia binary from their website so after I download the .run file I go to tty1, stop my X server by stopping lightdm, run the .run file with root privileges and then when it's done installing I will restart the computer using sudo shutdown -r now so that it restarts the computer using the newly installed driver.

The black tty consoles are usually caused because the graphical text-mode resolution set at boot is not compatible with your video card but there may be other reasons that I am unaware of. I will show you how to use uvesafb (it's a framebuffer) and get a high resolution console so that you can actually use them and they aren't just a black screen of nothing.

It involves installing a package and changing your grub config file as well as some other files. Everyone's video card will support different resolutions so if a resolution isn't working for you than try a lower one until you get text within your tty consoles. If you don't want to just guess than you can use vbeinfo from within grub which will show you the resolutions that are supported. So when grub appears, hit the 'c' key and then type in vbeinfo and hit enter. If your grub doesn't normally appear than you can get it to show by holding the shift key while your computer boots. Note down the largest screen resolution that you would like your tty consoles to be. Mine was 1680x1050.

Let's get to fixing. Open a terminal. The first command is to install the v86d package so that we can use  uvesafb.
sudo apt-get install v86d
Next we need to edit the grub config file.
gksudo gedit /etc/default/grub
This will open the grub config file using the text editor called gedit. If you're using Xubuntu substitute gedit with mousepad or leafpad and if using Kubuntu then your text editor is kate I believe. Now that you're in the grub config file you need to make the following 3 different lines look like mine but using your resolution.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1680x1050-24,mtrr=3,scroll=ywrap"
GRUB_CMDLINE_LINUX="vga=0x0369"
GRUB_GFXMODE=1680x1050
You'll need to look up your vga code for the resolution you want to use, google is your friend here. Once you're done make sure you save the file and then close it. Now we need to update the kernel modules file. Using the following command
gksudo gedit /etc/initramfs-tools/modules
Within that file you want to add the following line
uvesafb mode_option=1680x1050-24 mtrr=3 scroll=ywrap
Again make sure you save the file before closing it. Now we need to tell the system to use the framebuffer for your splash screen by issuing the following command. If you're not using a splash screen than I don't believe you need to perform this step. Despite me removing quiet and splash from my kernel boot line because I like seeing scrolling text in case there are any errors I still performed this step but it's up to you. This command will create a file in that location with that 1 line in it of FRAMEBUFFER=y
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
Now that we have updated the config files we need to get those cofigurations into each bootable kernel and we do that by issusing the following commands
sudo update-grub2
sudo update-initramfs -u
And that's it, if you restart your machine you should now have 6 high resolution consoles to use, tty1 thru tty6.

Wednesday, February 5, 2014

Linux Screencasting or Livestreaming

The goal of this post is to inform you about a GUI screencasting piece of software that I use for both recording my desktop gaming sessions as well the livestreaming them to sites like Twitch.tv and Hitbox.tv. I will show you how to compile and install the latest version from GIT as I feel it has some improvements within the code that are not available in the ppa version of the software. Compiling code shouldn't scare you away as it will not harm your system in anyway if you follow step by step. Many times it is necessary to compile software in Linux so that you can have the latest version of a package because the maintained versions within the official repositories are not up to date.

There are various GUI software packages out there for Linux users in order to capture their desktop so they can create a screencast of how to complete a particular task in Linux or to create a video showing how to get past a certain level in a game like gtkrecordmydesktop, istanbul, and kazam, but when I attempted to use any of those I would always have issues with synchronization of the video and audio. Either it would be out of sync from the start or it would start to become out of sync over time. Also none of those packages allowed me to livestream the action in realtime (as close to real time as you can get). I came across a package called SimpleScreenRecorder.


Simplescreenrecorder is a GUI screencasting software. It's very similar to the other pieces of software that I listed above in that it uses FFMPEG at it's core but the key difference is that it has built in synchronization coding as well as the ability to livestream to sites like Twitch or Hitbox.tv. He has a PPA if you want to just try that version of the software but that version does not contain the ability to set the keyframe interval (which Twitch and Hitbox expect a value of 2 seconds for every keyframe) and it also doesn't contain the improvements he made to the syncronizer and scaling feature. Let's get right to it and compile SSR from GIT.

The README.md file within the source files contain all the information you'll need to build and install it for your Linux Distribution except for Ubuntu 13.10, it's missing 1 library so we'll walk through those steps together right now. These steps are for a 64bit architecture so if you're running a 32bit version of Ubuntu 13.10 than your steps may vary slightly but I believe Maartin has accounted for both 32bit and 64bit in his build and compile script so don't give up now.

Let's get started, in Ubuntu 13.10 64bit you can open the terminal by holding the alt key and pressing F2 which will bring up the dash, then simple type in terminal and then click on gnome-terminal to open that application.
First we need to install the dependencies. *NOTE* Ensure you scroll inside the code box to copy and paste everything required.
sudo apt-get install build-essential pkg-config qt4-qmake libqt4-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libasound2-dev libpulse-dev libjack-jackd2-dev libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxfixes-dev libxext-dev libxi-dev g++-multilib libx11-6:i386 libxfixes3:i386 libglu1-mesa:i386
Let's first make sure you're in your /home directory. The cd command should get you there, just type in cd and hit enter in the terminal and then you can check by typing in pwd and hitting enter. It should show /home/youusernamehere.
Now we need to get the code from his GIT project
git clone https://github.com/MaartenBaert/ssr.git

NOTE: (switching branches is no longer required as he has merged the changes he made in the glinject-next branch into the main branch.)
Now let's switch to his glinject-next branch with has the improvements to the code and the ability to set the keyframe interval as required by Twitch and Hitbox. First we'll need to cd into the newly created ssr folder (run the next 2 commands separately, 1 line per command)
cd ssr
git checkout glinject-next
Now we can run the simple-build-and-install script from the ssr folder.
./simple-build-and-install
If you receive the following error than the 32bit libraries are not linked correctly for a 64bit system and we need to create some symlinks but it depends on what type of graphics drivers you're running on your system.
checking for XOpenDisplay in -lX11... no
configure: error: required library missing
If you're running open source drivers (intel, radeon, or nouveau) than you need to create the following symlinks. First cd into the appropriate directory and then create the 2 symlinks (run the next 3 commands separately, 1 line per command).
cd /usr/lib/i386-linux-gnu
sudo ln -s libGL.so.1 mesa/libGL.so
sudo ln -s mesa/libGL.so libGL.so
If you're running proprietary graphics drivers (fglrx or nvidia) than you need to create some additional symlinks which you can find out about by reading the SSR source README.me file. It's located within the ssr folder that you cloned from GIT.

For all drivers we need to create these additional 4 symlinks. You should still be within the /usr/lib/i386-linux-gnu/ directory when you create these 4 (run the next 5 commands separately, 1 line per command) *NOTE* Ensure you scroll inside the code box to see all required symlinks required.
sudo ln -s libGLU.so.1 libGLU.so
sudo ln -s libX11.so.6 libX11.so
sudo ln -s libXext.so.6 libXext.so
sudo ln -s libXfixes.so.3 libXfixes.so
sudo ldconfig

We can now cd back into the SSR directory so that we can run the simple-build-and-install script again now that we have properly linked to the 32bit libraries (run the next 2 commands separetly, 1 line per command)
cd ~/ssr
./simple-build-and-install

That should have successfully run and you should see the ending lines that appear like the following
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/vm1/ssr/build32/glinject'
make[1]: Leaving directory `/home/vm1/ssr/build32/glinject'
Making install in scripts
make[1]: Entering directory `/home/vm1/ssr/build32/scripts'
make[2]: Entering directory `/home/vm1/ssr/build32/scripts'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/vm1/ssr/build32/scripts'
make[1]: Leaving directory `/home/vm1/ssr/build32/scripts'
Making install in src
make[1]: Entering directory `/home/vm1/ssr/build32/src'
make[2]: Entering directory `/home/vm1/ssr/build32/src'
make[2]: Leaving directory `/home/vm1/ssr/build32/src'
make[1]: Leaving directory `/home/vm1/ssr/build32/src'
make[1]: Entering directory `/home/vm1/ssr/build32'
make[2]: Entering directory `/home/vm1/ssr/build32'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/vm1/ssr/build32'
make[1]: Leaving directory `/home/vm1/ssr/build32'
Running post-install script ...
Done.
You've just successfully compiled and installed SimpleScreenRecorder from GIT using the glinject-next branch. You won't be able to use SSR and encode (capture) using h264, aac, or mp3 yet though. For those to be applicable as a choice when you choose your encoding settings within SSR you'll need to install the ubuntu-restricted-extras package. You would just type in the following command into the terminal. It may prompt you to accept the installation of the packages by having to type in a "y", meaning Yes. It may also prompt you again for accepting the user license for true type fonts, mp3 and aac codec's, you would merely hit tab so that "ok" highlights and then hit enter.
sudo apt-get install ubuntu-restricted-extras
*NOTE*If you're running Kubuntu, Lubuntu or Xubuntu, be sure you install it's applicable restricted-extras pacakge ie: xubuntu-restricted-extras.
This was only to show you how to install SimpleScreenRecorder. I may do a follow up on how to use it properly but Maartin already has a lot of great information on his website.

-Ubu out