3 This is my attempt to finish my masters degree. I'm just kidding :-)
5 Actually, in 1997 I had idea to have masters degree on topic of video
6 delivery over Internet. I was few years too early to make it actually
7 work, but now-days we have all components needed to create good video
10 I envision this as combination of two parts:
12 * powerful editing suite running locally to annotate video
13 * good web interface with sync between slides and video
18 I have some of my presentations in video with slides, but I also have
19 few of freely available presentations which would benefit from
20 audio-video slide annotation. So you are assumed to have two files:
22 1. video file in Ogg Theora format
23 2. pdf file with slides of presentation
25 all other meta-data should be stored in git under media/
27 If you have different file formats, go ahead and use ffmpeg2theora:
29 http://v2v.cc/~j/ffmpeg2theora/
31 New Theora encoder 1.1 create videos that are better than anything I saw
32 on the web, oggz tool has chop support, so extracting part of video is
33 very easy and possible.
38 I really don't want to learn another set of tools. I like mplayer,
39 it works on all platforms I'm interested in (including EeePC and
40 PlayStation 3) and i all-ready know keyboard shortcuts for it.
42 So, I used it over it's slave protocol which is described on
44 http://www.mplayerhq.hu/DOCS/tech/slave.txt
46 and available locally as docs/slave.txt which I used to implement new keyboard
49 dpavlin@t61p:~/t61p/html5tv$ grep -A10 'keyboard' bin/mplayer.pl
51 # XXX keyboard shortcuts
54 : $1 eq ',' ? add_subtitle
55 : $1 eq 'F1' ? prev_subtitle
56 : $1 eq 'F2' ? move_subtitle( -0.3 )
57 : $1 eq 'F3' ? move_subtitle( +0.3 )
58 : $1 eq 'F4' ? next_subtitle
59 : $1 eq 'F5' ? save_subtitles
60 : $1 eq 'F9' ? add_subtitle
61 : $1 eq 'F12' ? edit_subtitles
65 I used to work with semi-professional Sony U-matic video montage back in 1990
66 and have grown to love it's work flow which doesn't force you to click
67 all over the screen to do something useful.
69 In fact, with it, you need 3-5 times more time to finish material,
70 and with most video editing solutions available in open source,
71 I needed at least 10-20 times more time to do anything useful.
76 I decided to store subtitles in array-of-arrays in yaml with simple structure
77 of start,end,title. On every save, I need also to create .srt subtitle format
78 for mplayer and json data for web interface.
80 Effective subtitle editing requires preroll. This is feature from my U-matic days
81 because scopes (U-matic video recorders with magnetic tape) couldn't speed up
82 instantly, so they would rewind, start AND SHOW YOU FEW SECONDS BEFORE YOUR EDIT.
84 This is crucial part in implementing following work flow with mplayer:
86 1. press i to record EDL point (start of subtitle)
87 2. press i to end EDL (end of subtitle)
88 3. press , to enter subtitle (usually you want to enter subtitle after end of sentence)
89 4. preroll 3 seconds before subtitle and review it
90 5. continue subtitling, goto 1
92 You can also use F9 to add subtitle (nicely located near i key) or F12 to enter vi
93 and make bulk subtitle changes (remove empty subtitles and so on).
97 Subtitles are least common denominator for meta data which I want to preserve.
98 However, to sync subtitles with slides, I have introduced magic syntax:
102 which triggers switch to slide 42.
107 Web interface using HTML5 <video> tag based on work from BBC R&D TV
109 http://open.bbc.co.uk/rad/demos/html5/rdtv/episode2/index.html
111 http://www.bbc.co.uk/blogs/rad/2009/08/html5.html
113 Which in turn is based on jCarousel from
115 http://sorgalla.com/projects/jcarousel/
117 I removed most of nice design, added support for slides and made it
118 scale to accomodate different resolutions of video materials.
121 Additional media info (author, title, location, date) is kept in hcalendar.html
122 using microformat which defines classes. For more info about hCalendar see
124 http://microformats.org/wiki/hcalendar-cheatsheet
129 Create media/conference-title/www file with source urls for video and presentation
131 $ cd media/conference-title
135 $ ln -s 20090704183304_dobrica.mts.ogv video.ogv
137 # generate hires slide jpegs using ghostscript
138 $ ./bin/slides-hires.sh media/conference-title/presentation.pdf
142 $ ln -sf ../media/conference-title media
145 # annotate some material
148 # resize presentation and show montage preview
149 $ ./bin/slides-resize.sh
151 You will probably want to run resize after you made first annotation in mplayer
152 because you will get visual overview of all available slides which is useful
153 when typing in slide markers [42] in subtitles.
155 When slide reisze finish, you might want to open http://localhost/html5tv/www/media.html
156 in Firefox and check final result.