Advene on OS X

You can post here general questions about Advene in english.

Advene on OS X

Post by cinematicity » Wed Dec 14, 2011 2:32 am

Hi,

So, I am trying Advene again, this time on OS X :)

I want to load a film from an AVI file (about 90 mins), use shotdetect, and then save a folder full of jpeg files, one for each shot in the film.

I looked at the Advene User Guide, but I find it quite vague on this. After playing around with the application, I cannot figure out how to do this.

Finally, I just tried running the shotdetect application from the command line:

Code: Select all
/Applications/Advene.app/Contents/Resources/share/shotdetect ...


It runs, but the jpeg files are all zero length and I get the following error:

Code: Select all
gd-jpeg: JPEG library reports unrecoverable error: Wrong JPEG library version: library is 80, caller expects 70


So... this means... ? Do I need to recompile shotdetect from the sources or something?

Basically, I just want shotdetect to do its stuff. If I can do that, then I will proceed with Advene and explore its other features. If there's no shotdetect, it's a complete show-stopper for me.

I really want to try this. Any suggestions about how to make it work?

I have OS X 10.6.8 on a MBP. I don't have much developer knowledge. If somebody could tell me the exact commands step by step to recompile (or whatever I need to do), I can do that. If the answer is "oh, you know, just recompile it from the sources (hand waving in air)", then I am still stuck.

Thanks in advance,

M
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Advene on OS X

Post by oaubert » Wed Dec 14, 2011 9:11 am

Hello

Advene does not use the JPEG extraction from shotdetect. It only uses the timecodes, and then does its own extraction.
You can :
- run shotdetect from Advene to produce annotations
- go to "Player/Update annotation screenshots" to have Advene extract the snapshots for each annotation bound
- go to "Player/Save imagecache" to make sure all snapshots are written to disk. To know the location of the imagecache, either look at the status line at the bottom of the application when saving the snapshots, or go to "Edit/Preferences/Paths" to get the setting.
- Go to the imagecache directory and get your snapshots (in PNG).

The shotdetect error you mention is strange, since shotdetect is compiled statically. I will investigate this (but the MacOS X compatibility issues are a real nightmare :( and I am only using 10.5.8).
oaubert
Site Admin
Posts: 88
Joined: Mon Jan 07, 2008 4:02 pm

Re: Advene on OS X

Post by cinematicity » Thu Dec 15, 2011 12:59 am

Hi,

Thanks much for your help with this.

I tried what you suggest and it seems to partially work. However, there are some things I don't understand.

When I select "Player > Detect Shots", the Timeline view does not get updated to show the shot annotations. If I close the Timeline view and then re-open it, then I see them. Bug? In any case, this is why I didn't think it was working before.

When I look in the image cache directory, there seem to be 3-5 duplicate images for each shot. Is there a way to get a directory with one image per shot? Some export option? I looked there and tried exporting an HTML timeline, but it doesn't work as expected.

When I select "Update annotation screenshots", Advene tells me how many were updated. It doesn't seem to update all of them. I can select this menu item ten times and it keeps updating more of them. Finally, it says none were updated. I don't really understand this behavior. Is there a way to just update all of them at once?

What I would like to do is generate an XHTML file with a table of shots, one for each row. In the columns, there would be a thumbnail of the shot, the starting time, the ending time, the duration of the shot, and any notes from annotations. I see that I can get some of this information from the web interface, but I'm not sure what I would need to do to customize the output or generate a standalone XHTML file.

Any suggestions about how to do this?

Another question: the shot detection seems to work fairly well, but there are of course some cases where it doesn't. How can I clean up the annotations? For example, let's say that one shot in the film is mistakenly detected as three shots. Is there a way to select all three of them and "merge these into one shot"? Or, if two separate shots are mistakenly represented as one, is there a way to pause the player and "split this shot into two"? It seems like these would be useful functions. Maybe they are already possible, but I just don't understand the interface(?).

Regarding shotdetect, it would be cool if it works, but it's lucky for me that Advene extracts the images itself :)

Thanks,

M
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Advene on OS X

Post by oaubert » Thu Dec 15, 2011 9:06 am

Hello

The timeline refresh issue could be a bug, I will investigate it.

Here are some answers to your questions. Now that you have expressed your final aim, it will be easier to guide you:

- the imagecache directory stores a cache of screenshots, that are taken not only for annotations. For instance, every time you change position in the video, a screenshot is taken too. That is why there are not only the screenshots you expected.

- the "Update annotation" feature is based on best-effort: sometimes, it cannot grab all missing screenshots in one run, and it must be run again. I chose to not make this automatically, since it may become uncontrolable (for instance going into an infinite loop). It is not strictly necessary to run it though: every time an annotation is created, Advene will automatically try to capture screenshots for it. In the lower right hand corner of the application, there is a green square that displays the screenshot capture activity, so that you can monitor what is going on.

- there are many ways in Advene to fix shots (considered as annotations). You can manually edit any (generated or not) annotation: double click on an annotation, use the "e" shortcut... To merge annotations, you can select them (by drawing a rectangle around them) and select "Merge" from the contextual menu. There are some other shortcuts, like control+click on the bounds of an annotation. You can have a look at http://www.advene.org/wiki/index. ... eShortcuts for a complete list.

A specialized interface view is dedicated to fixing continuous sequential annotations (i.e. like shots, where the end of an annotation is also the beginning of the new one): right-click on the Annotation type ("Detected shots" here) and select "Update annotation bounds". A new interface will open, displaying the immediate frames around annotation boundaries. To fix a cut position, click on the desired frame. You can also merge annotations. The http://www.advene.org/screencasts ... dation.ogv screencast shows how this interface works.

Your aim of generating an HTML file with annotation is right into the sweet spot for Advene: Advene uses a XML-based template language (the Zope Page Templates engine) that can be used to specify any type of rendering using annotations and information from the movie. To get you started, right-click on the annotation type (Detected shots) and select "Create a comment view". A view template will be generated. To see what its rendering looks like, click on the W3 button (in the top toolbar of the view editing interface): it will open the generated document in your browser.
You can adjust this template to your needs: from the (sort-of, unfinished) WYSIWYG editor, you can right-click on the "Rendering Shots as table" to select other templates. And if you need more control, you can click on the <> (Edit HTML source) icon, and adapt the HTML template to your needs (using a plain <table> instead of a <div> grid, etc).

There is definitely a lack of documentation. Do not hesitate to ask questions on the forum, it is meant as a form of "live/on-demand" documentation, in the absence of a better solution. You can also contribute to the user wiki: http://www.advene.org/wiki/index. ... eUserGuide
oaubert
Site Admin
Posts: 88
Joined: Mon Jan 07, 2008 4:02 pm

Re: Advene on OS X

Post by cinematicity » Thu Dec 15, 2011 1:45 pm

Hi,

Thanks for all of this super-helpful information.

I was able to merge and split annotations as you suggested, and to edit their durations. It's pretty straight forward. (Here, it would be cool if there were a menu command to automatically adjust the start and finish points of an annotation so that it gets "expanded" to one frame after the preceding annotation, and one before the following one. Is there some other menu command to do this?)

I tried the "Adjust Annotation Bounds" interface and it's easy too. I notice that every annotation generated by shotdetect seems to be one frame late. Is this normal?

I also tried the "Create a comment view" option to define a new view template. I dug into the HTML as you suggested, added <table> tags, and in about 10 minutes I got exactly the tabular display that I was hoping for. Pretty cool!! Where can I read more about the syntax of the template language? E.g., if I want to show start/stop/duration in the view, how can I generate duration? What HTML do I need?

I am still trying to figure out annotations, but here's another question: let's say I want to add anther "track" of annotations below "Shots". For this, I "Create New Annotation Type" and call it "Sequences". What I'd like to do now is annotate some "Sequences", where each one is a series of shots. Is there some way to select a starting and ending shot and then make a "sequence" annotation that spans from beginning to end (does this make sense?)?

About documentation, I could try to contribute but I'm still pretty much a noob, so let me get over the learning curve a bit and then maybe I can make some suggestions/contributions.

Thanks!

M
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Advene on OS X

Post by cinematicity » Fri Dec 16, 2011 12:57 am

Another issue: I cannot get "Associate a DVD" to work. Tried the same thing using Advene on Windows and it didn't work there either.
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am


Return to English questions