> Addendum on the addendum: to try and see if shotdetect is able to parse my video file, I decided to run it standalone. There's some
> problem doing this under OS X (as mentioned in my previous thread), but it works okay on Windows. After it finished, I looked in the
>/thumbs directory and there I found proper thumbnails for my clip, and most all of the shot boundaries seemed to have been detected as I
> would have expected. However, when I try the same thing in Advene on MS-Windows, once again the shot boundaries are all off.
How did you validate the shot boundaries coming directly from shotdetect ? It cannot be done on the basis of the screenshots alone.
There may be conversion issues: shotdetect processes the video frame-by-frame and outputs timestamps in ms, using fps information to convert frame number to ms. Advene gets the ms information from shotdetect, and uses gstreamer to playback the movie at the specified time. This can be one of the conversion issues.
> So, my hypothesis now is that perhaps there is a problem when Advene tries to process the results from shotdetect.
There is basically no interpretation: Advene just gets the (integer) ms values from shotdetect.
<shot fbegin="0" fduration="297" id="0" msbegin="0" msduration="4954">
<img height="150" size="thumb" src="/thumbs/0_in.jpg" type="in" width="355"></img>
</shot>
<shot fbegin="297" fduration="288" id="1" msbegin="4954" msduration="4804">
<img height="150" size="thumb" src="/thumbs/1_in.jpg" type="in" width="355"></img>
</shot>
<shot fbegin="585" fduration="507" id="2" msbegin="9759" msduration="8458">
<img height="150" size="thumb" src="/thumbs/2_in.jpg" type="in" width="355"></img>
</shot>
<shot fbegin="1092" fduration="964" id="3" msbegin="18218" msduration="16082">
<img height="150" size="thumb" src="/thumbs/3_in.jpg" type="in" width="355"></img>
</shot>
<shot fbegin="2056" fduration="48" id="4" msbegin="34300" msduration="800">
<img height="150" size="thumb" src="/thumbs/4_in.jpg" type="in" width="355"></img>
</shot>
...
<fps>59.9401</fps>
num=0 00:00:00.000 00:00:04.954
num=1 00:00:04.954 00:00:09.758
num=2 00:00:09.758 00:00:18.217
num=3 00:00:18.217 00:00:34.300
...
s.msbegin = int ((frame_number * 1000) / fps);
this->fps = av_q2d (pFormatCtx->streams[videoStream]->[b]r_frame_rate[/b]);
4.15 AVStream.r_frame_rate is wrong, it is much larger than the frame rate.
r_frame_rate is NOT the average frame rate, it is the smallest frame rate that can accurately represent all timestamps. So no, it is not wrong if it is larger than the average! For example, if you have mixed 25 and 30 fps content, then r_frame_rate will be 150.
Your best bet would be to convert the movie again using a constant frame rate.