Converting videos so they can be edited

April 18, 2014

At Cramlington, we don’t currently have a third-party video service.

Not that sort of video service!

Not that sort of video service!

Instead, having an entirely Windows server environment, we’ve used Windows Media Encoder and WMV files to stream all our videos.

Together with Graeme Porter (since moved to be Walbottle Campus’ VLE Coordinator), I put together our own video database system (CramTube – yeah, our naming’s not got better either).  We also methodically went through all of the encoding settings in Adobe Premiere to determine best compression – size ratio.  Using WMV we achieve around 4 Mbs per minute.

  • Bit rate encoding: CBR, 1 pass
  • Maximum bit rate: 550 kbps
  • Width: 640, height: 480

At this setting, you see a little artefacting (it’s not yet a word, but I’m holding out hope), but the file size has to double before the quality noticeably improves.  And so far, we’ve only rolled out Android devices to students which can play WMVs fine.

 

The problem

Of course, there’s a problem.  In this case, it’s our students, who use their Android tablets and phones (only in 6th form supposedly) to record video.

I'm currently pushing for month long detentions for filming the wrong way.

I’m currently pushing for month-long detentions for filming the wrong way.

Shockingly, they also to want to be able to edit it.  Trouble is, there’s no app in existence (I’ve looked) that allows the user to record video as WMV.  And if the student wishes to edit the video, generally it involves a trip to the IT support office with a memory stick.

Our Solution

Please note, that this bit is entitled Our Solution.  I’m sure there are many other ways to achieve this, but this is our solution using products we had to hand.  The solution required:

  1. Some way of students uploading video (large files).
  2. Have it convert automatically.
  3. Be able to download the new file.

1 – PL Upload
To solve the first point, a Google search (sorry Bing – I never even considered you) discovered PL Upload.  This system is a lovely bit of code which allows large files to be automatically uploaded by users.  This gets round the problem of standard file upload forms timing out.  The documentation is a little off-putting, but the example file provided works just fine.  From there, it’s easy enough to adapt to suit your own design.

2 – Adobe Media Encoder
The next part involves converting the video from whatever format into the editable WMV.  We’re lucky enough to have Adobe CC for our department.  It’s meant we have the latest versions of all the Adobe products, though I think AME has had watch folders for some time.

Hang on….sorry, got ahead of myself.  In AME, you can set up the program to “watch” for new files on a network drive.  So every time a user uploads a video file using PL Upload, it drops into one of these ‘watch folders’.  AME, running on a spare PC detects the new file, converts it and saves it into another folder.

3 – Auto menu – PHP
On upload, we used a bit of our own code to rename the video file with the user’s username, time and date.  Using a variation on the auto menu code I shared last time on this blog, the user sees a list of all the videos containing their username.

And that’s it.   Obviously AME can be set to convert to formats other than WMV, but seeing as our students use Adobe Premiere Pro CS3 (site licence years ago) and Windows Movie Maker (free), we find it’s the easiest format.

So far, only our sixth form students have used the uploader, but our Year 7 students are using a stop motion app which only saves in MOV or MP4 formats.  PL Upload being a web-based tool should allow them to upload and convert.

Advertisements

Making Apps – Part 2

January 25, 2012

When I started writing this post, I realised it was a case of tl:dr (too long, didn’t read – just in case you didn’t know).  I say I realised, my wife leaned over and said “Really?   tl:dr much!”

Loved ones, always the harshest critics 🙂

So, where was I.   Oh yes…

3) Adobe Flash CS5 and Adobe AIR

Flash.  Aha!  Saviour of the internet!

Adobe Flash

I love Flash, although I seem to be in an ever reducing minority, which no longer includes Adobe for some reason.  I think I know why – Flash in webpages on mobile devices isn’t as responsive as it feels like it could be.  There are resizing issues and supposedly it causes crashes, although I’ve never experienced a browser crash because of Flash.

Apple have blamed Flash for being too RAM intensive to be safely included on their iPhones and iPod Touches.  This decision had the happy coincidence of closing off thousands of free Flash games just as Apple were launching their App Store full of paid games.

As a development platform, Flash is second to none.  I said previously that only Apple understands about wrapping up everything you need.  Well I have to include Adobe as well in that exclusive club.  Flash combines graphics, animations and coding very easily and with the downloadable Adobe AIR for Android plugin folds in app making too.

Flash CS5 also comes with the ability to make Apple iOS apps.  Unfortunately, due to restrictions imposed by Apple, (you need a certificate which can only be create on a Mac, you can only upload to the App Store from a Mac) .

Using Adobe AIR to make apps is simplicity itself.  You open a new file, using the AIR for Android template.  From here, you build your Flash file as usual.

Adobe Flash start screen

At this point, I need to point out that out of the box, you don’t get AIR for Android as a template (at least not in CS5).  I seem to remember being alerted to its existence by a popup on this screen.   I do remember adding it via Adobe’s Extension Manager and unfortunately, the Developer Site doesn’t make it clear how to get it either.  Maybe it’s just bundled in.

Note from this screen you can also make iPhone OS apps and standard AIR programs to run in Windows.  All three are pretty identical and just differ in their publishing settings.

AIR for Android's publishing settings

When you open the AIR for Android template the stage is automatically set to 480 x 800 which is the most common screen resolution for the Android platform.  Of course, you can alter this easily.

There are four templates included with Flash, one is plain, but the other three contain code examples showing how to use a mobile device’s accelerometer, its menu button and a swipe gallery.  Between this, my own knowledge of ActionScript 2.0 and the internet, I was able to build a number of apps, such as the Question Dice.

ActionScript

The programming language for Adobe AIR is ActionScript 3.   This is really unfortunate for me, because I learned the previous language ActionScript 2.   AS2 is a much simpler language to learn, its grammar is less precise and how it functions is fairly straightforward.

AS3 is much more complex, designed with professional teams in mind, not individual programmers.  To this end, it is incredibly intimidating and the general advice on internet forums tends to be irrationally anti-AS2 style.  I’ve seen a number of posts from novice users, asking perfectly reasonable questions only to be shouted down with cries of “you shouldn’t be doing it like that at all”.

Years ago, I was similarly shot down for asking a question about linking one scene to another.  The response was “you should be using scenes”.  Now, I have the confidence to question that.  If you’re not supposed to use scenes, why does Flash include them?  Personally, I very rarely use scenes now, but if I needed to I still would.  The moral of this story is ignore all negative comments on the internet.  The trolls are never right.

The Truth (read it quick before I’m silenced)

Well, I’m finally learning AS3 and firstly, everything you’ve read about team programming and OOP and the “right way” to do things is rubbish!

AS3 is almost as forgiving as AS2.  Public functions, private variables and separate .as files are only needed IF you are writing complex games AND you use a separate .as file.   It came as a bit of shock to me.  The so-called right way is simply one way.

You can happily code in AS3 on the timeline.   If you do use code from a tutorial and run into compiler warnings about public functions, just remove the public bit.

public function startgame() {

}

becomes:

function startgame() {

}

if you’re placing code on the timeline.

Oh and regular functions, not connected to mouse clicks can just be written as AS2 functions. Rely on the Code Snippets box too, it really useful to get started.

Where to go from here

The book I’m using is an update of the book I learnt AS2 from.   It’s called Actionscript 3.0 Game Programming University.

ActionScript 3.0 Game Programming University

The author, Gary Rosenzweig has an excellent, easy-going style.  He provides the full code for each game, but breaks it down ito what each section does.  Something I liked from his original book is that each game only takes you so far, but it’s always easy to see how to develop each game to make them better.

Next time

My wife was right.  This post has become its own mini-series.

In part 3, I’m going to show just how easy it is to produce an app and publish it on your VLE and the Android Market


Making Apps – Part 1

January 22, 2012

I’ve talked before about how I’ve started to build apps for use in school, but I’ve never really gone into how I do it.  Surprisingly there are a number of methods.

1) Using Google’s SDK and Eclipse software to write apps directly

This is where I started.   Although started is a bit of a misnomer (started and stopped being closer to the truth).  It’s easy enough to sign up for the free SDK and links in the developer area point you in the right direction for downloading the Eclipse platform.  But that’s where it gets confusing.  Eclipse being a third-party, open-source product has a number of different versions and figuring out the right one to download either involves blindly guessing or reading through a pages of text.  tl:dr I’m afraid.

Through more luck than judgement, I downloaded and installed a version of Eclipse (Gallileo seemed right at the time) that worked with the SDK and through a bit more luck, managed to get it hooked up to my phone.

Eclipse - but you're not there yet - still have to run the Android SDK

Eclipse - but you're not there yet - still have to run the Android SDK

Struggling to get set up is something that only Apple seems to understand is an issue.  Open-source and SDKs are great, but you need an underlying knowledge of how and what to install before you can even get started.  Recently, we tried to get the Xbox Kinect SDKs to work with Windows 7.  This could have been so easy, providing a single file which would have installed all the drivers we need.  Instead, we were taken to a page with 4 different installation programs.  Three of which installed fine, the fourth was just impossible.

A big chunk of Apple’s success comes from wrapping everything up together.  Take iTunes for example.  MP3 players had existed for at least 5 years before the iPod.  Apple were the only ones to provide a standard way to get music onto a player that was easy to use.   Now, they have launched their iBooks and (reportedly) their iBook creator makes it easy to create content.   eBook programs have existed for years for Windows, but Apple makes it easy by declaring “this is what you need, nothing more”.   As a long time PC and Android lover, I have to take my hat off to Apple for this.  But I digress.  Back to Android.

Hello World

From here on, it’s easy enough to follow the tutorials back on the Android Developer centre and build the standard Hello World.  But beyond that, building apps directly in this environment is a bit lacklustre.  As someone used to building in Adobe Flash, I found making the leap to a purely coding system to be just that little bit too far.  I couldn’t figure out how to use animations for instance.
I made this! - by following instructions precisely

I made this! (By following instructions precisely)

2) Using Adobe Flex (and/or Flash Builder)

There seems to be a quickly growing community around using these Adobe products to build apps for all platforms.

I can’t quite figure out how you use Flex and there is a cost involved with Flash Builder so I’ve never fully investigated it.  At school, we have the full Adobe Production Premium suite which includes Flash CS5, which I’ll talk about in Part 2.


Educating in the third dimension

December 18, 2011

One again, it’s been a while since I posted.  Please accept my humble apologies.  To make it up to you all, here are two articles in one:

Terry Freedman from ICT in Education.org asked me to write an article for their  Computers in Classrooms newsletter.  It’s a special 3D edition.

Here’s a direct link to my article although the rest of the magazine is worth viewing too.

In the article, I talk about the Panasonic T750 Camcorder:

Panasonic T750 3D camcorder

The camcorder comes with a 3D lens attachment, so you can use it as a regular 2D camera as well.  Surprisingly, Five’s Gadget Show didn’t think much of this model (preferring the Sony camcorder) on TV at least.  The online review seems a little more accomodating.  Which I think overlooked some key points:

  • As a 2D video camera, the quality is excellent.  It has 3 CMOS sensors and can record in 1080p which makes chromakeying (i.e. greenscreen) very easy.  I’ve always been a fan of Panasonic cameras, they seem to understand what’s actually important.  It’s a slight shame the camera doesn’t have a SD mode.   As a school, we have no need of HD quality, where filesize is as important as quality.  Don’t get me wrong, we don’t sacrifice quality, it’s just that I’m not in the business of delivering broadcast-quality content.
  • Panasonic (unlike Sony) use an open-source recording codec.   This allows editing in Adobe Premiere Pro without having to convert the video beforehand.  This is a huge time- and quality-saver.

We picked up the camcorder for around £500 + VAT (you have to shop around and we have an excellent finance department who do just that).   For that price, we got two cameras in one.

The recordings are side-by-side, which makes incorporating the video into my existing Cinema4D’s workflow really straightforward.  What is most suprising is just how effective the depth of the video is.  We mounted the camera on the front of a boat which passed under the Tyne’s Milennium footbridge.

It’s not a view most people get to see and it really impressed our staff and students.

If you have the free time and the budget, you can buy 3D software like Cinema4D and start making animations for yourself.  And of course, there are now dozens of S3D-content suppliers (if their content works with your system) and if you have the free time and the budget, you can wade through these resources to find the occasional gems.  But if you buy a 3D camcorder, you can immediately start creating content for yourself.   (Or hand the camera over to your students to see what they can do.)

And of course, self-created content is free!


Battle of the Handhelds: Redux!

November 19, 2011

I think the one post I’ve made which has caused the most feedback and continues to draw in audiences is my post about two devices we were considering for school use back in April, namely the iPod Touch and the Archos 43.

So much has happened since I wrote that blog entry.  First off, we didn’t go with either iPod Touch or Archos.  Like I summed up at the time, the iPod had too many restrictions and the single-touch Archos made it too frustrating to use.

Pick a device already!Samsung Galaxy Tab 7" Wi-Fi

At that point, our ICT Coordinator stumbled across the Samsung Galaxy Tab.  I say stumbled upon, because Apple pretty much had the high street sewn up.  All credit to them (and it’s changing now admittedly), but if you want to buy a tablet on the high street, everyone wants to sell you an iPad.  And why not, they’re great devices (personally I find them a little large and a bit heavy) but there’s no denying Apple created another product the world didn’t know it needed.

Samsung (who incidently make the iPad for Apple) have their own range of tablets, a 7″ wifi, a 7″ 3G and similar in the 10″ range.  They’ve also started on their gen 2 tablets which are even more sleak, though not widely available yet.

We evaluated and then chose the Wi-Fi only, 7″, P1010 model.  It runs Android Froyo, has 16Gb internal memory, front and rear cameras.  It comes preloaded with ThinkFree Office (which allows creating and edit MS documents) along with a host of other apps (some good, some not worth it).

Size does matter

The main difference between the 7″ tablet and the smaller handheld we were looking at before is the size (obviously).  When you’re using the tablet, it feels like it is for work.  You can achieve a lot of the same stuff on the smaller devices, but they lack a feeling of productivity.  With the Samsung, you feel like you’re using a work tool.

We did look again at the iPad and iPod Touch, but the cost of the iPad is too prohibitive to seriously consider (those schools that have gone down the iPad route must have sacrificed something else from their budget).  Ultimately we found iOS too restrictive/problematic in terms of file uploads, Flash (yes I know Adobe have pulled development) and for building our own apps as well as paying for other apps.

Niggles

There are a couple of niggles.  The battery gives you a day if you’re using it.  Given the size of the device, I was surprised, but I suppose powering the much larger screen is the big difference.  The native keyboard makes some truly irritating errors, but Steven Lin has kindly ported the Gingerbread keyboard.  Neither of these are big issues, at least not compared to:

WTF!

The tablet cannot charge from a computer’s USB while turned on!   Wait…what?  That’s like… the point of USB.  We’ve got round this issue by buying these special cables.  It took a couple of hours searching the internet to even find out what the problem was.  It turns out to be a voltage issue.  These cables contain a switch and resistor which gets round that.

Still, these are all niggles and while many would point out that you shouldn’t have to deal with niggles, life always proves otherwise.

Order ready

We ordered the tablets about a month ago (with parental contributions) and they are due to arrive within the next two weeks.  All the preparations have been done (fingers crossed).  We have a comprehensive mobile version of our VLE, a really cool instruction booklet to be given out with the devices and we’ve put together a number of school-specific apps:

This slideshow requires JavaScript.

I do hope that we’ll make some of these available on the Android Market.  They are all built in Adobe AIR, which has made the creation of Apps so much simpler.  I think we will eventually move away from AIR, but for right now, it just works.

In conclusion

Have we chosen the right device?  I think so.  The size is right.  The functionality is right.   The price is right ~£300 (including insurance).  I’ll admit my heart sank a little when Amazon announced the $199 Kindle Fire – but it’s not out in the UK yet.  And not in the quantities we need.  And can we even run our own apps on it? Maybe next year, if this year is successful.

The battle may have been won, but something tells me the war has just begun.


My First App!

December 20, 2010

A few months ago I posted about the new App Inventor from Google which has a pretty impressive App maker for Android phones.

Unfortunately, I found it all a little awkward to use.  Animations for example seemed impossible.   Google own Android SDK also proved a steep learning curve.  And you need a Mac to use Apple’s iOS SDK.   So all in all, building useful Smart Phone Apps (or even rubbish ones) seemed out of my grasp.Buffalo Billy plays Pig on my HTC Desire

Then several things happened.   Firstly, Apple announced a relaxation of the policy towards third-party App making software, then Adobe released Air for Android.   Suddenly it was possible to build Apps in Flash Professional and export them for phones and tablets!

This weekend, in a couple of hours, I took a favourite game my wife and I built for a ventriliquist friend of ours (back in 2005) and converted it to ActionScript 3 (AS2 is a lot easier, but is being replaced by the more complex AS3 – though AS2 will still work for traditional flash resources on websites).   Once it was running in AS3, using the new AIR for Android template I was able to plug my phone into the PC, set it to development mode and build a new App. 

For some reason, Adobe have almost hidden their Android template.   After much searching, I found it on their Adobe Labs site.   But it was apparently available or linked from their Adobe AIR site.  Strange?

For those of you who don’t know the dice game Pig, you take turns rolling a dice and adding up the amount on the face.   If you throw a ‘1’, you lose your points and play reverts to the other person.   You can end your turn voluntarily at any point.  The winner is the first to 100 points.    You can play the original version here.  One cute thing we added for the app is that you can shake the phone to roll the dice. 

There are certificates to be correctly filled out, and testing to be handled before I submit this game to the App Market.  And in theory, I should also be able to press a button an convert it into an iPhone App too.  I’ll post here once I know more and as I understand, for Android at least, you don’t have to submit it.  You can just host an app install file on your own server.

This is going to be huge frankly!  As school budgets tighten, and ICT use expands, imagine the savings possible if we can build our own tailored apps.   The new Advent Amico is a 7″ Android tablet which costs £129.   That’s cheaper than most netbooks.   We found netbooks main disadvantage was that they look like laptops, so people assume they can handle the same software as laptops.   Smart phone tablets are taken to be big smart phones, and people only expect web browsing and basic use.

The future is looking very bright, and if not orange, then decidely mobile!


PrimoPDF

July 21, 2010

Here’s a couple of quick tips in one post.   If you want to drive up viewing figures for your blog, just pop the word “iPad” into your post somewhere.   Actually given the amount of spam that post attracted maybe that’s not such a good tip 🙂

Ok, onto the actual tip.

PrimoPDF

This really handy bit of software sits on your computer like a printer.   You “print” to it and it outputs a PDF file of whatever you have sent.

It’s very handy for converting any Office document into something anyone on any computer or mobile phone can read.   Adobe Acrobat (the software that reads PDFs) is free and already on 99% of the world’s computers so that makes it VERY compatible.

 Printing isn’t limited to Office documents of course, photos, posters, web pages can all be converted for ease of distribution.  

I wonder if the iPad reads PDF?  🙂