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 video editing suite running locally with annotations
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
24 3. create html file with meta-data
26 All of this is stored under media in directory conference-lecture.
28 If you have different file formats, go ahead and use ffmpeg2theora:
30 http://v2v.cc/~j/ffmpeg2theora/
32 New Theora encoder 1.1 create videos that are better than anything I saw
33 on the web, oggz tool has chop support, so extracting part of video is
34 very easy and possible.
36 When re-encoding video materials following command line gives more-or-less
37 resonable video size while inserting keyframes for nice seek:
39 ffmpeg2theora -p padma --keyint 1 source_video.flv
44 I like mplayer, and lerning another set of tools to do video editing
45 didn't make sense to me.
47 It works on all platforms I'm interested in (including EeePC and
48 PlayStation 3) and I know keyboard shortcuts for it.
50 So, I used it over it's slave protocol which is described on
52 http://www.mplayerhq.hu/DOCS/tech/slave.txt
54 and available locally as docs/slave.txt which I used to implement new keyboard
57 dpavlin@t61p:~/t61p/html5tv$ grep -A10 'keyboard' bin/mplayer.pl
59 # XXX keyboard shortcuts
62 : $1 eq ',' ? add_subtitle
63 : $1 eq 'F1' ? prev_subtitle
64 : $1 eq 'F2' ? move_subtitle( -0.3 )
65 : $1 eq 'F3' ? move_subtitle( +0.3 )
66 : $1 eq 'F4' ? next_subtitle
67 : $1 eq 'F5' ? save_subtitles
68 : $1 eq 'F9' ? add_subtitle
69 : $1 eq 'F12' ? edit_subtitles
73 I used to work with semi-professional Sony U-matic video montage back in 1990
74 and have grown to love it's workflow which doesn't force you to click
75 all over the screen to do something useful.
77 In fact, with this tool, I need 3-5 times more time to finish material,
78 and with most video editing solutions available in open source,
79 I needed at least 10-20 times more time to do anything useful.
84 I decided to store subtitles in array-of-arrays in yaml with simple structure
85 of start,end,title. On every save, I need also to create .srt subtitle format
86 for mplayer and json data for web interface.
88 Effective subtitle editing requires preroll. This is feature from my U-matic days
89 because scopes (U-matic video recorders with magnetic tape) couldn't speed up
90 instantly, so they would rewind, and than start FEW SECONDS BEFORE your edit point.
92 This was crucial concept for implementing the following workflow with mplayer:
94 1. press i to record EDL point (start of subtitle)
95 2. press i to end EDL (end of subtitle)
96 3. press , to enter subtitle (usually you want to enter subtitle after end of sentence)
97 4. mplayer will preroll 3 seconds before subtitle and review it
98 5. continue subtitling, goto 1
100 You can also use F9 to add subtitle (nicely located near i key) or F12 to enter vi
101 and make bulk subtitle changes (remove empty subtitles and so on).
105 Subtitles are least common denominator for meta data which I want to preserve.
106 However, to sync subtitles with slides, I have introduced magic syntax:
110 which triggers switch to slide 42.
112 In presentations which are created using Takahashi method (lot of slides with
113 transitions which follow speaker) you might use just add subtitle to mark
114 transition to next slide.
119 Web interface using HTML5 <video> tag based on work from BBC R&D TV
121 http://open.bbc.co.uk/rad/demos/html5/rdtv/episode2/index.html
123 http://www.bbc.co.uk/blogs/rad/2009/08/html5.html
125 Which in turn is based on jCarousel from
127 http://sorgalla.com/projects/jcarousel/
129 I removed most of nice design, added support for slides and made it
130 scale to accomodate different resolutions of video materials.
133 Additional media info (author, title, location, date) is kept in hcalendar.html
134 using microformat which defines classes. For more info about hCalendar see
136 http://microformats.org/wiki/hcalendar-cheatsheet
141 Create media/conference-title/www file with source urls for video and presentation
143 # install dependecies from Debian packages
144 $ sudo bin/install-debian.sh
146 $ cd media/conference-title
152 # generate hires slide jpegs using ghostscript
153 $ ./bin/slides-hires.sh media/conference-title/presentation.pdf
155 # annotate some material
156 $ ./bin/mplayer.pl media/conference-Title/video.ogv
158 After adding first slide you will get visual overview of all slides
159 which is useful when typing in slide markers [42] in subtitles.
161 When slide reisze finish, you might want to open http://localhost/html5tv/www/_editing.html
162 in Firefox (you will have to open it through http server!) and check final result.
166 I'm using awesome as window manager, and since HTML5TV uses xdotool to focus between terminal
167 to enter subtitle and mplayer, it will switch to same virtual desktop on *both* monitors,
168 so it's helpful to start ./bin/mplayer.pl on same virtual desktop at least with awesome.