Just a nit:

I think this would be clearer like this:

metadata.title = readFromMetadata('title') || fileNameToVideoName(videofile.name);