Blog Archives

Video for web and iPhone/iPad – lessons learned (the hard way)

As part of a recent project we have been involved in producing a series of short videos for increasing the awareness of doctors of how to use a physiotherapy referal service. A technical am of this project has been to deliver these videos to both PCs and mobile devices, but without using a video delivery service such as YouTube or Vimeo.  So we wanted to encode one version of the video file into a format that would play in a flash video player embedded in a web page and also be playable on the iPhone/iPad which obviously doesn’t currently have a flash player.

To do this we choose to use the JW Player which offers built in HTML 5 support and encoded the video using H.264

The first thing we learnt was that to get the player to substitute the HTML 5 version for the flash version when viewed with an iPhone/iPad, the video player needs to be embedded within the web page using the JW Player’s own JavaScript embedder (jwplayer.js), rather than HTML embed tags or the generic SWFObject javascript embedder.

Unfortunately it then turned out we had another more significant issue to overcome.  Once we had uploaded our video files and began testing them on-line we encountered serious audio synchronisation issues in the videos when viewing on a PC. This problem did not affect viewing on an iPhone and seemed to disappear if the video was paused and restarted. Initially we thought this must be an intermittant file caching issue. However the same problem was reported by various viewers and we slowly realised this was more serious.

A web search eventually found this forum post by Andrew Wallace which appeared to shed light on this problem:

The H.264 is not a completely “contained” compression method — by this I mean that Audio and Video tracks are still treated as separate entities that only QuickTime can recognize integrated timing information to match each track with one another. Flash, however, can not detect this information and so when it sees a gap of no audio, it shifts the remaining audio to fill in the gap, thus causing a sync issue. Why? Not entirely sure — it’s a Flash issue that has never been addressed by Macromedia/Adobe.

The same post suggests a solution to this problem:

Create a white noise track (generated in a sound program like Soundtrack) that is the complete duration of your video tracks and insert it underneath your currently existing audio track. Set the level to around -70dB thus making it inaudible. This track acts as a binding track to keep things in sync. Export as a self-contained file and compress as you normally would. You can still use H.264 as your compression method.

A subsequent post in the same thread suggests that this solution isn’t necessarily always successful…

So what to do… for this particular project we have now chosen to encode into FLV format for PC delivery and offer a separate H.264 version for iPhone/iPad viewers and provide jQuery tabs to allow selection between the video options available. This is not to suggest that a single video format can’t be used, but we have discovered this is not as simple as it appears and so we opted to use a tried and tested approach that we can have confidence in.

Screen shot of the video player and selection tabs

 

Webducate project wins 2 awards at ALT-C 2009

The LearnHigher making groupwork work resources has been recognised by an unprecedented double award win at the ALT-C 2009 conference.  More details on the development of these resources are available in the relatedWebducate portfolio entry.

Screen shots of the learnhigher groupworking resourcesScreen shots of the learnhigher groupworking resources

We at Webducate provided technical advice and the web development for these resources as part of a multi-institutional project funded by LearnHigher. We would like to express our particular appreciation to Carol Elston (University of Leeds) who provided enormous energy and vision to the project and without whom this success would not have been achieved.

Winner of the 2009 Jorum Learning & Teaching Competition and Winner of the 2009 Epigeum Award for Most Effective Use of Video Presentations

Details of the awards:

Jorum Learning and Teaching Award

Epigeum Award for Most Effective Use of Video

 

How to create a video based Dragster activity using an FLV file

In the previous blog post instructions were provided on how to create dragster activities that used a youtube video as the dropzone. In this post a similar set of instructions and files are provided that demonstrate how to create a video based Dragster 3 drag and drop activity where you have the original video file available and can convert it into an FLV file.

Below is an example activity created using the approach described here:

Four stroke engine activity

1. Create your video file

A useful overview of creating digital video is provided by mediacollege.com

To make the most of the dropzone area of a dragster 3 activity you

should try to encode your video with dimensions of 600 by 450 pixels.

Other video sizes will work but these will be resized

within the activity dropzone. The activity will take place on the paused last frame of the video and so it should be edited with this in mind.

2. Publish/Convert your video file into FLV format

In order to display a video within a Dragster 3 activity it needs to be encoded in the flash compatible FLV video format. There are a variety of tools available for publishing into FLV format or converting from alternative formats (e.g. Adobe Flash, On2 Flix, Sorenson Squeeze, Riva FLV encoder).

Save this video file as video.flv

3. Download the FLV video dragster files

I have provided a set of 4 files to aid your creation of these video Dragster 3 activities.

Download a zip file containing these files

You will need to save these on to your PC and extract them (left click on the downloaded zip file and select Extract all…)

Now copy the video file (video.flv) into this extracted folder overwriting the example video file with the same name already in this folder.

4. Create a dropzone image of the paused video

Within this downloaded folder is a file called video.html Open this file in your web browser to view your video as it will be displayed within the Dragster activity. Play the video until it reaches the end frame and pauses. At this point you need to create a jpg image file to use as the dropzone image in your activity authoring.

As mentioned in the previous post, I have used two alternative methods to do this:

1. use screen capture software such as TechSmith SnagIt

2. press the PrtScrn button on your keyboard then open image editing software such as Photoshop or Fireworks and use Paste to place a copy of your entire screen into the working area. Then crop this image.

Ultimately you need to create a jpg image which is 600 by 450 pixels in size which just includes the flash file displaying your video. This means the edges of this image should be where the green background meets the edges of the video. Save this image as video.jpg

5. Author and publish the Dragster 3 activity

You should now login to your myWebducate account and author the activity in the usual way using the jpg image created in step 4 as the dropzone. When you are happy with this activity publish it and extract the published files in the usual way.

6. Copy the video related files into the activity folder

Copy your video files into the extracted activity folder (i.e. copy the files: video.flv, video.swf, SteelOverNoVol.swf, video.html into the activity folder).

7. Edit the Dragster 3 activity dragndrop.xml file

Nearly done now… Open the published activity dragndrop.xml file in a text editor such as Notepad and edit the line <target targetImage=”video.jpg

/> replacing video.jpg with video.swf. Save the amended dragndrop.xml file.

8. Test the activity

You can now test this activity by opening the index.html file within the activity folder with your web browser.

Have fun using these two approaches to embed video in your activities. If/when you develop an activity you are proud of and are happy to share please do let me know!

Youtube videos in Dragster activities – demo

For a while now I have been thinking about and working on integrating Dragster with Youtube to allow drag and drop activities to be based on video and animations rather than just static images. This approach is particularly appropriate where movement and context plays an important part in the recognition of parts of an image.

The key aspects of this integration are:

  • The Youtube video is displayed as the activity dropzone image.
  • The video is played and automatically stops at a specified point in the video.
  • At this point the drag and drop activity is based on the static frame of the video being displayed.

To illustrate this I have put together a demonstrator activity which is based upon an animated MRI scan of a heart (view youtube demonstrator). In this example the identification of the structures of the heart is aided by observing their movements in the video. As this is a demonstrator I am very interested in feedback on this approach. Please feel free tocontact me in the usual way.

Heart_yt_screenshot