First off, I think I've decided to write my own, new video editing activity for the OLPC instead of modifying the existing "Camera" app. It's very cool, and I had some thoughts about how to integrate my editing code into there... but I think it could cramp the UI and also it might just be easier to have my own codebase for this. Then I can make this application do just one major task: allow kids to view and seek to a start and end point in any of the video clips in their Journal, and then mark those start and end points into some sort of timeline. And from there, run some sort of command-line (or Python-accessible) splicing library that will edit these clips together, and save them out as a new .ogg file.
I've found a couple of possible options. You might wonder why I am not just porting Pitivi (Gnome editor, based on GStreamer) to the OLPC XO laptop. I took a look into it and it's really cool... but it's probably not the best fit for the XO laptop. Yes, it's a great tool and it definitely edits cleanly and like a standard non-linear editing program that anyone has used (eg iMovie, Windows Movie Maker)... but it's not specifically made with 6 year olds in mind. Certainly not with 6 year olds in mind from countries that have never seen iMovie (or even a computer before this). It's also got stuff like an "Import Clips" and "Save Movie" button which is find for a normal operating system with a regular file system, but doesn't really line up well with the XO's "Journal" directory concept. That needs to be well-integrated, or the learning curve will be too steep and I don't think it's going to get as much use as it could get.
Given what my friend Jen said about OLPC's most popular apps, simplicity in UI design is king... and paramount to whether or not your Activity is a success or a failure. If it's too complicated, if there is too much text on screen... then (most) kids will get frustrated and not use it... in my opinion. I want a lot of kids to use my application, so I need to be particularly focused on simplicity in UI design.
All that said about UI design and the necessity to keep it simple, and keep it obvious... I still need to figure out what algorithm/library/API to use to actually decode, splice, and re-encode the ogg (theora) video files. It needs to be fast, not take up too much memory, and ideally I'd like to just give it a list of in and out points (specified by the UI) and the corresponding ogg filename. Those files will then be spliced in order (I will have to allow users to re-order the clips somehow). So focusing on the actual editing part first (since I am gonna have to get that working before I even think about the UI)... I found some useful details.
GStreamer (already available on XOs) has a plugin called Gnonlin (As in G-NonLinear Editor)... YES. This is excellent news, and in fact it's what Pitivi uses under-the-hood. That said, the code looks kinda complicated. In fact all the GStreamer code seems kinda complicated. I am gonna have to read some more, and hopefully there are some useful tutorials online or good documentation of the library and how to interface with it. In any case, this looks super powerful and useful.
Some Gnonlin links:
- http://gstreamer.freedesktop.org/apps/
- http://www.jonobacon.org/2006/12/27/using-gnonlin-with-gstreamer-and-python/
- http://www.openshotvideo.com/2008/05/introduction-to-gnonlin.html
- http://superuser.com/questions/367584/concatenating-ogg-video-files-from-the-command-line
- http://en.flossmanuals.net/ogg-theora/ch052_cat-files
- http://osric.com/chris/accidental-developer/2012/04/using-ffmpeg-to-programmatically-slice-and-splice-video/
- http://ffmpeg.org/faq.html#How-can-I-join-video-files_003f
- http://code.google.com/p/pyffmpeg/
Not entirely sure what this says. .. other than the most important point - the international olpc community is getting a video editing activity! !! So very useful and important!!!! Nunavut will be thrilled :)
ReplyDelete