It can be done if the item is a static video in the content folder.
Note the IStreamActionNotify interface in the example, and this event handler:
public void onPlaylistItemStart(Stream stream, PlaylistItem item)
{
getLogger().info("Item Name: " + item.getName());
}
You should be able to use (with slight modification) the code from the ModuleCalculateBitrate example, passing in item.getName(), to do it.
Richard