Friday, 24 February 2012

Embedding mp4 videos in a Virtual Learning Environment

I recently finished a fairly long project to make a DVD collection more readily available to members of a university library. The DVDs are expensive academic ones, and the library is not that keen on lending them out. Also, this would restrict usage to one person at a time, which means if they’re assigned viewing for a seminar or assignment, life becomes very difficult. This being the case, the library got permission to make the DVDs available on the university network. However, for copyright reasons and to minimise the risk of piracy, access has to be restricted to only current members of the university, which means controlling access pretty heavily; they can’t just be made available over the internet.

The small faculty library have limited influence over the university computing services, which meant that bespoke viewing solutions were not really an option. For example, they couldn’t have a special password-protected page set up that would control access through user identification. For copyright purposes, something like this with by-user watermarking would be a nice solution; but technically difficult and probably expensive, even once the basic page was set up.

The chosen solution was to make use of an existing user-restriction system: the university Virtual Learning Envirnoment (VLE). The university IT service agreed to set things up, but for various reasons were eventually forced to drop the project. Obviously (as I’m posting this) it fell to me to handle it. I thought it might be useful to post a description in case any other poor sap has to do a similar project in the future.

A complication that arose fairly early was that the VLE would not (at least at that time) allow media files to be played directly. As a result, I had to set up embedded players within the VLE to play each set of files.

There were several basic stages to the project:

  • Transcribe the content descriptions of each DVD for use on the VLE. Thse came as text pages on the DVD, (not files; still text images!) which would have been somewhat nightmarish to transcribe. Fortunately the library had paper handbooks that had accompanied the original VHS versions of the DVDs.
  • Rip the DVD to .mp4.
  • Create XML playlists for each DVD.
  • Create webpages for each DVD with an embedded player.
  • Create static webpages for the transcriptions of each DVD, and an overall DVD listing page linking to the individual embedded-player pages.

Some were trickier than others, but I’ll run through them all quickly.

Transcription

The paper handbooks were invaluable here. I simply scanned the pages and OCRed them to get the basic text. Naturally there were plenty of OCR errors to correct, some of which I picked up at the time and others much later.

Ripping

For ripping the DVDs I used Handbrake (http://handbrake.fr/). This is a very useful bit of kit, fully open-source and GPL for those worried about it, and usable on Windows, OS X and Linux.

To rip DVDs with Handbrake:

  1. Go to Options. Set the default folder to wherever you want this lot of files stored (which saves hassle later), and set up a filename scheme. This needs to be set for each DVD if you want the files named anything useful.
  2. Insert the DVD and select “DVD” as the source.
  3. In my case, the DVDs were fairly low resolution, so for space-efficiency and quick processing we chose the “Iphone and Ipod Touch” setting defaults.
  4. Set audio however you want; in our case it was worth mixing down to Mono because there was only a mono track.
  5. Select “Web Optimise”
  6. Manually select the first track, so chapters “1 through 1”
  7. Check the filename and path. Manually chance the prefix to .mp4 if you want .mp4s, as it tends to default to m4v.
  8. Add the chapter to the queue
  9. Change the start track to the next one. This will automatically change the end track, so you’re still only picking one track at a time.
  10. Repeat until all tracks are added.
  11. Open the queue, check all the tracks are actually there, and off you go. Ripping will take a while, so I suggest using a machine you won’t be needing for the rest of the afternoon; it might be safe enough, but there’s always a chance of causing problems if you try to work on it at the same time.

XML Playlists

A playlist looks like this:

  <playlist version="1" xmlns="http://xspf.org/ns/0/">
    <title>playlist title</title>
    <info>main DVD page URL</info>
    <tracklist>
      <track>
        <title>number and title of track</title>
        <creator>copyright holder</creator>
        <info>filename.mp4</info>
        <annotation>description of track</annotation>
        <location>filepath/filename.mp4</location>
      </track>
...(repeat for other tracks)     </tracklist>
  </playlist>

Sections in red need to be filled in appropriately. In the case of the VLE I was working with, files seemed to need absolute paths rather than relative ones.

I wrote them in Notepad++ (http://notepad-plus-plus.org/), which keeps track of bracket pairs, quote pairs and so on, making it amazingly useful for this kind of thing. In fact I do all my HTML editing in NP++.

Pages with embedded players

The player I ended up using is called JW Player, available from Longtail Video (http://www.longtailvideo.com/players/). It supports both Flash and HTML5. I used the simpler Flash option as the VLE was liable to create enough problems, without worrying about browser issues. I believe the newest release of JWP (currently 5.9) may make things simpler, but haven’t tried it. I started the project with the January 2011 release (probably 5.0), and have not seen any particular reason to change over.

I downloaded JWP and unzipped it into a folder on the VLE. That’s about all you need to do with it.

Each embedded-player webpage looks like this:

<h2>DVD Title</h2>
<script type='text/javascript' src='../../media/swfobject.js'></script>
<div id="mediaspace">descriptive text that should not appear unless there are problems. I used it to include a warning that library catalogue machines could not play the videos</div>
<script type='text/javascript'>
  var so = new SWFObject('../../media/player.swf','mpl','980','480','9');
    so.addParam('allowfullscreen','true');
    so.addParam('allowscriptaccess','always');
    so.addParam('wmode','opaque');
    so.addVariable('playlistfile','DVD_playlist.xml');
    so.addVariable('playlistsize','340');
    so.addVariable('playlist','right');
    so.addVariable('bufferlength','30');
    so.addVariable('autostart','true');
    so.addVariable("repeat","list");
    so.addVariable("shuffle","false");
    so.addVariable('backcolor','52708b');
    so.addVariable('frontcolor','000000');
    so.addVariable('lightcolor','ffffff');
    so.write('mediaspace');
</script>
<p>Read the <a href="path/thisdvdsummary.html">written summary</a>
</p>
<p>Return to the <a href="path/maindvdlist.html">main DVD listing</a>
</p>

Static pages

The pages with transcriptions, DVD listings and other information were just bog standard HTML pages.

Folder structure

Just for completeness, here’s the folder structure I used for the project, with generic names instead of the specifics I used.

Main (root folder for the project)
    Main.Media (contents of the JW Player download, used to actually play the .mp4s)
    Main.DVDs (includes the homepage for the videos, and any summaries or transcriptions to the contents of multiple individual DVDs; the latter could instead have been in a specific Summaries subfolder)
        Main.DVDs.ThisDVD (includes the individual mp4s; the xml playlist; summary page for the specific DVD; and the embedded-player page).

Thursday, 23 February 2012

Dy giare: craueyn clouit

Ta art beg noa screeut aym er cooish lheeys anaasoil. T'ad er gooilleeney clou craue keeilley noa da ben chaill e craue keeilley liorish osteomyelitis!

CAGHLAA: er y fa nagh vel yn ynnyd-eggey shen ayms foast, ta mee er scughey yn art. T'eh heese nish.

Craue keeilley clouit

Haink yn eie shoh jeh New Scientist 06-02-2012; 3D printer provides woman with a brand new jaw liorish Paul Marks.

Barriaght lheeys noa! Ta mee er screeu hannah er aajiooghyn jeant ass bun-chillaghyn deiney. Nish, ta laueyn-lhee Belgagh er groo craue keeilley noa liorish clou magh!

Giare-chummey

Va’n ben 83 bleeaney d’eash, as va osteomyelitis stroie y craue keeilley eck. Ren ad scanney JAM (Jallooaghey Aavuilley Magnaidagh, “Magnetic Resonance Imaging”) jeh’n chraue keeilley, do by chosoylagh eh coip jeeragh jeh y jannoo. Ren possan Jules Poukens (Biomed, rheynn ronsee bea-lheeys Ollooscoill Hasselt ‘syn Velg) stiurey y laue-lheeys as co-obbraghey marish colught clouderys Layerwise. Ta Layerwise cruinnaghey er clou 3H çhitaanium dys jannoo crooinyn feeacklagh as cuirryn craue.

Ren ad ymmyd jeh clouder 3H shinteyragh laser (“laser sintering”) dys croo y far-chraue noa. Ta’n clouder co-lheie breneenyn çhitaanium, brat er vrat, dys aachroo y kiaddey t’ad cur da. Eisht, ren ad coadey y craue keeilley fo vrat crayee bea-choardailagh (“biocompatible”) nagh boiragh er e stoo kirpey. Ta tuill as lhagganyn ‘sy chraue greinnaghey muskylyn dy chiangley rish, as thiollaneyn lhiggey da neearagyn keeilley goll ny hrooid, as ta binn ayn er son cuirryn feeacklagh my ta feme ec y ven orroo keayrt ennagh ry-heet.

Cheau ad kiare ooryn rish y laue-lheeys ayns Mean Souree 2011. Rish y nah laa, dod y surransagh loayrt as sluggey ‘syn aght dooghyssagh reesht. Ghow ad yindys dy row eh cho speeideilagh. Ta cuirryn clouit er nyn nyannoo roish shen, agh v’ad ny sloo. Aachroo ad lieh-chraue keeilley s’yrdjey ayns Finnlynn ayns 2008, liorish clowan çhitaanium clouit baiht ayns bun-chillaghyn daase stoo kirpey noa ayns brooinney y turransagh (shen bentyn rish obbyr yn aajioogh noa). Ayns 2009, ren ronseyderyn coontey jeh craueyn ordaag clouit. Shoh kesmad noa ‘sy vagher as er lesh ny commee she toshiaght t’ayn. Dooyrt reiltagh Layerwise, Peter Mercelis: “By chosoylagh eh jannoo foddey ny smoo ymmyd jeh cruinnyn jeant er son surransagh er lheh, na jeh aachuirraghyn craue deiney.”

Foddee cloudeyryn 3H jannoo bratyn micromeadaryn er çheeid as ass stoo erbee, bunnys. Ta New Scientist gra dy vel ronseyderyn shirrey aght dy chlou noadaghyn crackan da surransee lostey, as eer aght dy hroggal lane oltyn liorish cur sheese killagyn ‘sy chummey cooie. Greesee ass towse!

Jeeagh er feeshag er y chooish liorish Layerwise.

Imraaghyn

“Spare jawbone grown in gut” Sami Torma, ABC Science, Reuters.
Cha noddym feddyn art oaylleeagh bentyn rish y chooish raad erbee. Quaagh.

“Toward Regenerating a Human Thumb In Situ”, Tissue Engineering Part A September 2009, 15 (9): 2605-2615. Weinand et. al. DOI: 10.1089/ten.tea.2008.0467.

Monday, 13 February 2012

Shiaghtin ghellid

She shiaghtin ghellid t'ayn. Ta çhingys sooilley as crackanagh ennagh er ngeddyn greim orrym, as hug y ben-lhee orrym gyn ceau speckleyryn ny sooillagyn lhiantagh rish ymmodee laaghyn. Cha nel shen aashagh, er y fa dy vel mee cho kyagh as craitnag. Foddym cronnaghey cummaghyn, as cur enney er kuse dy 'leih rere'n eeaddagh as aght shooyl oc, as cha nel mee tuittym ny bwoalley noi reddyn son y chooid smoo. Agh cha noddym fakin eddinyn, as erskyn ooilley, cha noddym lhaih. Wahll, cha mnoddym lhaih agh reddyn shey oarlagh veih my ghaa hooill ny ayns clou buillvollee er heu varroose. Dy aighar, ta mee clouscreeu er meir feer vie; ta mee screeu y clane art shoh gyn fakin fockle erbee jeh, as s'treisht lhiam nagh bee rouyr marranyssyn ayn. Cha cosoylagh eh cur er y teks ve mooar dy liooar dou fakin eh gyn croymmey roym as blakey er.!
Ghow mee speckleyryn rish queig bleiney d'eash as cha gooin lhiam traa tra dod mee fakin reddyn dy baghtal. Gyn scansh da shen, cha oayllagh dou shooyl mygeayrt gyn fakin; ta mee ceau speckleyryn ny sooillagyn car y laa. Taa mee faggys er nyarrood wheesh nagh noddym dy yannoo gyn speckleyryn. Agh ny laaghyn shoh, ta dagh ooilley red, bunnys, croghey er lhaih. As mish gobbraghey ayns lioarlann, she ard-ghoilleeid t'ayn. Cha noddym fakin ny dateyn çheusthie ny lioaryn; cha noddym cronnaghey my she lioar lhien ny lioar lesh lioarlann elley t'ayn dy aashagh. Cha noddym fakin ny lipaidyn skellooagh t'orroo tra ta mee cur ad erash 'sy lioarlann; v'eh oym gliooney er y laare as blakey orroo dy quaagh, ny drappal aarey as seiy my eddin rish ny lioaryn dys feddyn y boayl kiart. Erskyn ooilley shen, cha noddym fakin taishbyneryn! Nagh quaagh eh wheesh d'obbyr ta shin jannoo orroo? Cha noddym lhaih ny cur freggyrt da postyn-l, ny shirrey lioaryn er y chatalog, as cha noddym eer cur lioaryn er eeassaght as goaill ad erash agh dy moal as dy mertragh; ta'n teks ro-veg. Ga dy noddym fakin kuse ennagh jeh liorish eab, cha noddym goaill tastey jeh reddyn dy taghyrtagh, as shen red scanshoil.
Ec y traa t'ayn ta mee thie, agh ta'n chooid smoo dy cheaughyn-traaaey caillt aym. Ta mee screeu y post shoh agh t'eh creoi dy liooar. Cha cosoylagh eh lhaih lioar, ny jeeaghyn er fillym, ny cloie gammanyn. Son y chooid smoo t'eh foym ceau yn çhiaghtin liorish eaishtagh rish recortyssyn çhengey ynsee as shareaghey my hene. Heemayd!

Monday, 6 February 2012

Skeealeen daa oor

Ta mee kiart er screeu skeealeen noa. Haink yn eie dou fastyr jiu 'syn obbyr, as aght ennagh haink eh dou dy aashagh y cheayrt shoh. Dy cadjin cha noddym geddyn greim er ny h-eieyn as t'eh orrym faagail ad noi traa elley. Nee'm eh y aalhaih as glenney beggan, as s'treisht lhiam dy noddym cur er yn ynnyd-eggey aym oie ny vairagh. Red beg quaagh elley rere aght Ghunsany.

Friday, 3 February 2012

Çharon

Gustave Doré - Dante Alighieri - Inferno - Plate 9 (Canto III - Charon)

Çharon

Chroym Çharon er oaie as ymmyrt. Va dagh ooilley red goit stiagh ‘sy tooilleilys v’er.

Cha nee cooish dy vleeantyn ny keeadyn v’ayn, agh thooillaghyn foawragh dy hraa, as shenn trommys as pian ‘syn arm v’eh er gliaghtey rish myr ayrn jeh kiaddey ny jeeghyn as myrane lesh Beaynid.

Dy beagh ny jeeghyn er chur da eer gheay chontraartagh, veagh eh er rheynn ooilley traa ‘sy chooinaghtyn echey ayns daa leac corrym rish y cheilley.

Cho lheeah va dagh ooilley red raad chum eh, dy jinnagh sollyssid erbee feiyal thurrick mastey ny merriu, er eddin benrein myr Cleopatra foddee, cha noddagh e hooill ny chronnaghey.

By whaagh eh dy daink ny merriu nyn ymmodee ‘sy traa v’ayn. Haink ad nyn dousaneyn ga dy b'oayllagh daue çheet nyn naeedyn. Cha by churrym ny mian Haron eh smooinaghtyn 'syn annym lheeah echey er cre'n oyr. Chroym eh as ymmyrt.

Eisht rish tammylt cha daink peiagh erbee. Cha b'oayllagh da ny jeeghyn gyn cur peiagh erbee neose veih'n Teihll rish lheid y tammylt. Agh share fys ec ny jeeghyn.

Eisht haink dooinney ny lomarcan. As hoie sheese y scaa beg bibbernee er beck follym as heiy yn baatey jeh'n çheer. Cha nel agh un troailtagh: share fys ec ny jeeghyn. As ren Çharon mooar as tooillit gymmyrt roish as roish rish y scaa tost beg bibbernee.

As va sheean ny h-awiney gollrish sogh vooar va Seaghyn er soghal 'sy toshiaght marish e shuyraghyn, as nagh noddagh geddyn baase myr mactullee vran deiney huitt er cruink thallooin, agh va cho shenn as traa as y pian ayns armyn Haron.

Eisht ren y baatey veih'n awin voal lheeah roshtyn thalloo Dis, as hooill y scaa tost beg er-traie as eh bibbernee foast, as ren Çharon yn baatey y hyndaa dys ymmyrt dy skee erash da'n Teihll. Eisht dooyrt y scaa, va ny ghooinney keayrt dy row.

"She mish y jerrinagh," as eh.

Cha row peiagh erbee rieau er chur er Çharon mongey; cha row peiagh erbee rieau er chur er keayney.


Charon

Charon leaned forward and rowed. All things were one with his weariness.

It was not with him a matter of years or of centuries, but of wide floods of time, and an old heaviness and a pain in the arms that had become for him part of the scheme that the gods had made and was of a piece with Eternity.

If the gods had even sent him a contrary wind it would have divided all time in his memory into two equal slabs.

So grey were all things always where he was that if any radiance lingered a moment among the dead, on the face of such a queen perhaps as Cleopatra, his eyes could not have perceived it.

It was strange that the dead nowadays were coming in such numbers. They were coming in thousands where they used to come in fifties. It was neither Charon's duty nor his wont to ponder in his grey soul why these things might be. Charon leaned forward and rowed.

Then no one came for a while. It was not usual for the gods to send no one down from Earth for such a space. But the gods knew best.

Then one man came alone. And the little shade sat shivering on a lonely bench and the great boat pushed off. Only one passenger: the gods knew best. And great and weary Charon rowed on and on beside the little, silent, shivering ghost.

And the sound of the river was like a mighty sigh that Grief in the beginning had sighed among her sisters, and that could not die like the echoes of human sorrow failing on earthly hills, but was as old as time and the pain in Charon's arms.

Then the boat from the slow, grey river loomed up to the coast of Dis and the little, silent shade still shivering stepped ashore, and Charon turned the boat to go wearily back to the world. Then the little shadow spoke, that had been a man.

"I am the last," he said.

No one had ever made Charon smile before, no one before had ever made him weep.


Ta'n skeealeen shoh çhyndaait ass Charon liorish yn Çhiarn Dunsany. Ta'n lioar vunneydagh ry-lhaih er Project Gutenberg.

Thursday, 2 February 2012

Meanyn 'sy Vretnish

As mish cummal ayns Sostyn nish, cha nel monney caa aym Bretnish y loayrt as ta'n çhengey lheie ersooyl jeem beggan er veggan. Ta mee lhaih 'sy Vretnish ny keayrtyn as geaishtagh rish kiaull Vretnish nish as reesht. Aghterbee, ghow mee toshiaght shirrey creelaghyn-fynneigagh as y lheid. Ta mee geaishtagh rish creelaghyn-fynneig dy mennick: tra ta mee shooyl dys yn obbyr, jannoo obbyr yn thie, ny roie; myr shen she caa vie dy chummal seose yn çhengey. Cha dooar mee monney.

Cha nel agh kiare ry-gheddyn jeh Radio Cymru, as cha nel ad cooie dou dy firrinagh. Ta fer jeu mychione bluckan-coshey - cha nel anaase aym er ayns çhengey erbee. Ta fer elley politickagh, as ga dy vel mee cur geill da politickaght, cha nel monney fys aym er cooishyn ynnydagh Bretin nish. Chammah's shen, ta mee geddyn dy liooar jeu liorish lhaih y naight 'sy Vretnish. Ta'n claare kiaullee mie dy liooar, agh t'eh foddey ny s'doccar toiggal kiaull na coloayrtys tra t'ou shooyl rish raaidyn mooarey, as t'ad lhiettit da beggan cooishyn son y chooid smoo. Cha nel mee son lhiettal my cliaghtey Bretnish da graih, trimshaght as shennaghys y theay. Ta'n kerroo fer er son y phossan ynsee hene; my dy liooar, agh aght ennagh cha ghow eh greim orrym.

Er y gherrid, hooar mee creeley-fynneigagh jeh'n ennym Haclediad. T'eh bentyn rish çhaghnoaylleeaght, co-earrooderyn, yn eddyr-voggyl as stoo elley ta anaase aym er myr nerd fouwragh. Deaisht mee rish y chreeley s'jerree as ghow mee ram taitnys jeh. V'ad loayrt dy baghtal as va quallid mie ec y recortys. Obbyr vie dy jarroo. Chammah's shen, ta mee er ngeddyn Pengwiniaid Madagascar, as shen yindyssagh. Mannagh vaik oo Madagascar (fillym bio-chaslyssagh), fow eh as jeeagh er, t'eh feeu y traa. Ta'n claare shoh mysh jeih minnid er lhiurid, as t'eh da paitçhyn; wahll, t'ad cur eh mastey stoo paitçhyn, agh ta sleih Sheear jannoo shen marish dagh ooilley caslys-skeeal, fillym bio-chaslyssagh as skeeal erbee elley nagh vel jeant liorish feer sleih as focklyn, er fa nagh vel mee toiggal. Aghterbee, t'eh aitt as giare as myr shen t'eh snaue stiagh dy mie ayns baarney erbee 'sy claare-traa aym.