Extracting video data from remote files with curl.

Started by ag, October 10, 2014, 12:22:21 PM

Previous topic - Next topic

ag

I'm in the process of building an application that extracts metadata from .mov/.mp4 videos, which are hosted remotely on Amazon S3.

Is it possible to use partial downloads of video files to extract IPTC (primarily worried about subject, keywords, title) metadata, in a reliable manner? For example:


curl -s --range 0-10000000 https://fake-s3-bucket.amazonaws.com/content/video/really-large-fake-file.mov | exiftool -fast -


Thank you in advance for your help.

Edit: I already checked out this other post: https://exiftool.org/forum/index.php/topic,5392.msg26095.html#msg26095, which suggests it's possible for images...but is the same thing possible for video files?

Phil Harvey

You can always try to throw a partial file at exiftool to see what happens.

In my experience, about half of the time metadata is at the end of an MP4/MOV video, so in these cases you would need to read the whole thing.  If it is at the start, then you could just read the first 1 MB or so, but you would have to do this because ExifTool will always read the whole thing to look for metadata at the end.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ag

Thanks for your reply.

Do you know if it's possible to specifically encode a file to put metadata in the front of a file? Or if there's another way to ensure faster execution of the metadata extraction?

Phil Harvey

Sorry, I don't know anything about video editing software.

If you use ExifTool to write XMP to a MOV/MP4, it will place it at the end.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ag

Not a problem. Thanks for your help, and for exiftool.