Scopes Contest Mid-way Roundup

I recently blogged about my Ubuntu Scopes Contest Wishlist after we kicked off the Scopes Development Competition where Ubuntu Phone Scope developers can be in with a chance of winning cool devices and swag. See the above links for more details.

As a judge on that contest I’ve been keeping an eye out for interesting scopes that are under development for the competition. As we’re at the half way point in the contest I thought I’d mention a few. Of course me mentioning them here doesn’t mean they’re favourites or winners, I’m just raising awareness of the competition and hopefully helping to inspire more people to get involved.

Developers have until 3rd December to complete their entry to be in with a chance of winning a laptop, tablet and other cool stuff. We’ll accept new scopes in the Ubuntu Click Store at any time though :)

Robert Schroll is working on a GMail scope giving fast access to email.

gmail

Bogdan Cuza is developing a Mixcloud scope making it easy to search for cool songs and remixes.

Screenshot from 2014-11-10 18:57:32

Sam Segers has a Google Places scope making it easy to find local businesses.

Places-scope002

Michael Weimann has been working on a Nearby Scope and has been blogging about his progress.

Main

Dan has also been blogging about the Cinema Scope.

img2

Finally Riccardo Padovani has been posting screenshots of his Duck Duck Go Scope which is already in the click store.

divergentduck

I’m sure there there are other scopes I’ve missed. Feel free to link to them in the comments. It’s incredibly exciting for me to see early adopter developers embracing our fast-moving platform to realise their ideas.

Good luck to everyone entering the contest.

Ubuntu Scopes Contest Wishlist

We’re running a Scope Development Competition with prizes including a laptop, tablets, and a bunch of cool Ubuntu swag. Check the above link for details.

I’m one of the judges, so I’m not allowed to enter which is both good and bad news. Good because then you won’t see my terrible coding quality, but bad because I would really love one of these sweet Dell XPS laptops! :)

I do have things I’d like to see made as scopes, and some ideas for making ones that I might do in the future when time permits, and I thought I’d share them. As a judge I’m not saying “make this scope and I’ll vote for your entry” of course, I simply figured I can give people some ideas, if they’re stuck. We do have a set of criteria (see link above) for rating the scopes that are submitted, and those will be used for judging. None of those criteria are “whether it was on the list on popey’s blog”. These are just ideas to get people thinking about what might be possible / useful with a scope.

Surfacing my data

One of the goals of scopes is to enable users to easily and quickly get access to their data. That could be local data on the device or remote data in a silo somewhere online. Typically on other platforms you’d need a dedicated app to get at that data. To access your Spotify playlist you need the Spotify app, to access your LinkedIn data you need the LinkedIn app and so on. Many of the sites and services where my data is held is accessible via an API of some kind. I’d love to see scopes created to surface that data directly to my face when I want it.

Manage Spotify Playlist

I use and love Spotify. One problem I have is that I don’t often add new music to my playlists. I don’t use or value the search function in the app, or the social connected features (I don’t have my Spotify hooked up to Facebook, and don’t have any friends on Facebook anyway). I tend to add new music when I’m having a real life verbal conversation with people, or when listening to the radio.

So what I would like is some quick and easy way to add tracks to my playlist, which I can subsequently play later when I’m not in the pub / driving / listening to the radio during breakfast. This could possibly sign in to Spotify using my credentials, allow me to search for tracks and then use the API to add tracks to playlist

Amazon Wishlist

My family tell me I’m really hard to buy presents for, especially at this time of year. I disagree as I have an Amazon wishlist containing over a hundred items at all price points :) When I visit family they may ask what’s on my wishlist to find out what I’m most interested in.

I’d like to be able to pull out my phone, and with a couple of swipes show them my wishlist. It would also be useful if it had the ability to ‘share’ the wishlist URL over some method (email is one, SMS might be another) so they get their own copy to peruse later.

I’d also like to be able to add things to the wishlist easily. Often when I’m out I think “That’s cool, would love one of those” and that could be achieved with a simple search function, then add to my wishlist.

Location Specific

Satellites Overhead

I (and my kids) like to watch the International Space Station go over. Perhaps I enjoy it more than the kids who are made to stand outside in the cold, but whatever. When I travel it would be nice to have a scope which I can turn to during twilight hours to see when the ISS (or indeed other satellites) are passing overhead. This information appears to be publicly available via well documented APIs.

Upcoming TV Programmes

I frequently forget that my favourite TV programmes are on, or available to stream. It would be awesome to pull together data from somewhere like Trakt and show me which of my most loved programmes are going to be broadcast soon, on what local TV channel.

Events Nearby

When I travel I like to know if there’s any music, social or tech events on locally that I might be interested in going to. There’s quite a few sites where people post their events including Songkick, Meetup and Eventbrite (among many others I’m sure) which have a local event look-up API. One of the cool things about scopes is you can aggregate content from multiple scopes together. So there could be a scope for each of the above mentioned sites, plus a general “Local Events” scope which pulls data from all of those together. Going to one scope and refreshing when I arrive in a new location would be a great quick way to find out what’s on locally.

Some of the above may be impractical or not possible due to API limitations or other technical issues, they’re just some ideas I had when thinking about what I would like to see on my phone. I’m sure others can come up with great ideas too! Let your imagination run wild! :)

Good luck to all those entering the contest!

Sprinting in DC

For the last week I’ve been working with 230 other Ubuntu people in Washington, DC. We have sprints like this pretty frequently now and are a great way to collaborate and Get Things Doneā„¢ at high velocity.

This is the second sprint where we’ve invited some of the developers who are blazing a trail with our Core Apps project. Not everyone could make it to the sprint, and those who didn’t were certainly missed. These are people who give their own time to work on some of the featured and default apps on the Ubuntu Phone, and perhaps in the future on the converged desktop.

It’s been a busy week with discussion & planning punctuating intense hacking sessions. Once again I’m proud of the patience, professionalism and and hard work done by these guys working on bringing up our core apps project on a phone that hasn’t event shipped a single device yet!

We’ve spent much of the week discussing and resolving design issues, fixing performance bugs, crashers and platform integration issues, as well as the odd game of ‘Cards Against Humanity’ & ‘We Didn’t Playtest This At All’ in the bar afterwards.

Having 10 community developers in the same place as 200+ Canonical people accelerates things tremendously. Being able to go and sit with the SDK team allowed Robert Schroll to express his issues with the tools when developing Beru, the ebook reader. When Filippo Scognamiglio needed help with mouse and touch input, we could grab Florian Boucault and Daniel d’Andrada to provide tips. Having Renato Filho nearby to fix problems in Evolution Data Server allowed Kunal Parmar and Mihir Soni to resolve calendar issues. The list goes on.

All week we’ve been collaborating towards a common goal of high quality, beautiful, performant and stable applications for the phone today, and desktop of the future. It’s been an incredibly fun and productive week, and I’m a little sad to be heading home today. But I’m happy that we’ve had this time together to improve the free software we all care deeply about.

The relationships built up during these sprints will of course endure. We all exchange email addresses and IRC nicknames, so we can continue the conversation once the sprint is over. Development and meetings will continue beyond the sprint, in the virtual world of IRC, hangouts and mailing lists.

XDA Developer Conference 2014

The XDA Developer community had its second conference last weekend, this time in Manchester, UK. We were asked to sponsor the event and were happy to do so. I went along with Daniel Holbach from the Community Team and Ondrej Kubik from the Phone Delivery Team at Canonical.

This was my first non-Ubuntu conference for a while, so it was interesting for me to meet people from so many different projects. As well as us representing Ubuntu Phone, there were guys from the Jolla project showing off SailfishOS and their handset and ports. Asa Dotzler was also there to represent Mozilla & FirefoxOS.

Daniel did a small Ubuntu app development workshop which enabled us to learn a lot from our materials and process around App Dev Schools which we’ll feed back to later sessions. Ondrej gave a talk to a packed room about hardware bring-up and porting Ubuntu to other devices. It was well receieved and explained the platform nicely. I talked about the history of Ubuntu phone and what the future might hold.

There were other sponsor booths including big names like nVidia showing off the Sheild tablet and Sony demonstrating their rather bizarre Smart EyeGlass technology. Oppo and OnePlus had plenty of devices to lust after too including giant phones with beautiful displays. I enjoyed a bunch of the talks including MediaTek making a big announcement, and demonstrating their new LinkIT One platform.

The ~200 attendees were mostly pretty geeky guys whose ages ranged from 15 to 50. There were Android developers, ROM maintainers, hardware hackers and tech enthusiasts who all seemed very friendly and open to discuss all kinds of tech subjects at every opportunity.

One thing I’d not seen at other conferences which was big at XDA:DevCon was the hardware give-aways. The organisers had obtained a lot of tech from the sponsors to give away. This ranged from phone covers through bluetooth speakers, mobile printers, hardware hacking kits through to phones, smart watches & tablets, including an Oppo Find 7, pebble watch and nVidia Sheild & controller. These were often handed out as a ‘reward’ for attendees asking good questions, or as (free) raffle prizes. It certainly kept everyone on their toes and happy! I was delighted to see an Ubuntu community member get the Oppo Find 7 :) I was rewarded with an Anker MP141 Portable Bluetooth Speaker during one talk for some reason :)

On the whole I found the conference to be an incredibly friendly, well organised event. There was plenty of food and drink at break times and coffee and snacks in between with relaxing beers in the evening. A great conference which I’d certainly go to again.

Creating Time-lapse Videos on Ubuntu

I’ve previously blogged about how I sometimes setup a webcam to take pictures and turn them into videos. I thought I’d update that here with something new I’ve done, fully automated time lapse videos on Ubuntu. Here’s when I came up with:-

(apologies for the terrible music, I added that from a pre-defined set of options on YouTube)

(I quite like the cloud that pops into existence at ~27 seconds in) :)

Over the next few weeks there’s an Air Show where I live and the skies fill with all manner of strange aircraft. I’m usually working so I don’t always see them as they fly over, but usually hear them! I wanted a way to capture the skies above my house and make it easily available for me to view later.

So my requirements were basically this:-

  • Take pictures at fairly high frequency – one per second – the planes are sometimes quick!
  • Turn all the pictures into a time lapse video – possibly at one hour intervals
  • Upload the videos somewhere online (YouTube) so I can view them from anywhere later
  • Delete all the pictures so I don’t run out of disk space
  • Automate it all

Taking the picture

I’ve already covered this really, but for this job I have tweaked the .webcamrc file to take a picture every second, only save images locally & not to upload them. Here’s the basics of my .webcamrc:-

[ftp]
dir = /home/alan/Pictures/webcam/current
file = webcam.jpg
tmp = uploading.jpeg
debug = 1
local = 1

[grab]
device = /dev/video0
text = popeycam %Y-%m-%d %H:%M:%S
fg_red = 255
fg_green = 0
fg_blue = 0
width = 1280
height = 720
delay = 1
brightness = 50
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 100
once = 0
archive = /home/alan/Pictures/webcam/archive/%Y/%m/%d/%H/snap%Y-%m-%d-%H-%M-%S.jpg

Key things to note, “delay = 1″ gives us an image every second. The archive directory is where the images will be stored, in sub-folders for easy management and later deletion. That’s it, put that in the home directory of the user taking pictures and then run webcam. Watch your disk space get eaten up.

Making the video

This is pretty straightforward and can be done in various ways. I chose to do two-pass x264 encoding with mencoder. In this snippet we take the images from one hour – in this case midnight to 1AM on 2nd July 2014 – from /home/alan/Pictures/webcam/archive/2014/07/02/00 and make a video in /home/alan/Pictures/webcam/2014070200.avi and a final output in /home/alan/Videos/webcam/2014070200.avi which is the one I upload.

mencoder "mf:///home/alan/Pictures/webcam/archive/2014/07/02/00/*.jpg" -mf fps=60 -o /home/alan/Pictures/webcam/2014070200.avi -ovc x264 -x264encopts direct=auto:pass=1:turbo:bitrate=9600:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 -vf scale=-1:-10,harddup
mencoder "mf:///home/alan/Pictures/webcam/archive/2014/07/02/00/*.jpg" -mf fps=60 -o /home/alan/Pictures/webcam/2014070200.avi -ovc x264 -x264encopts direct=auto:pass=2:bitrate=9600:frameref=5:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 -vf scale=-1:-10,harddup -o /home/alan/Videos/webcam/2014070200.avi

Upload videos to YouTube

The project youtube-upload came in handy here. It’s pretty simple with a bunch of command line parameters – most of which should be pretty obvious – to upload to youtube from the command line. Here’s a snippet with some credentials redacted.

python youtube_upload/youtube_upload.py --email=########## --password=########## --private --title="2014070200" --description="Time lapse of Farnborough sky at 00 on 02 07 2014" --category="Entertainment" --keywords="timelapse" /home/alan/Videos/webcam/2014070200.avi

I have set the videos all to be private for now, because I don’t want to spam any subscriber with a boring video of clouds every hour. If I find an interesting one I can make it public. I did consider making a second channel, but the youtube-upload script (or rather the YouTube API) doesn’t seem to support specifying a different channel from the default one. So I’d have to switch to a different channel by default work around this, and then make them all public by default, maybe.

In addition YouTube sends me a “Well done Alan” patronising email whenever a video is upload, so I know when it breaks, I stop getting those mails.

Selection_264

Delete the pictures

This is easy, I just rm the /home/alan/Pictures/webcam/archive/2014/07/02/00 directory once the upload is done. I don’t bother to check if the video uploaded okay first because if it fails to upload I still want to delete the pictures, or my disk will fill up. I already have the videos archived, so can upload those later if the script breaks.

Automate it all

webcam is running constantly in a ‘screen’ window, that part is easy. I could detect when it dies and re-spawn it maybe. It has been known to crash now and then. I’ll get to that when that happens ;)

I created a cron job which runs at 10 mins past the hour, and collects all the images from the previous hour.

10 * * * * /home/alan/bin/encode_upload.sh

I learned the useful “1 hour ago” option to the GNU date command. This lets me pick up the images from the previous hour and deals with all the silly calculation to figure out what the previous hour was.

Here (on github) is the final script. Don’t laugh.