ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ag on October 10, 2014, 12:22:21 PM

Title: Extracting video data from remote files with curl.
Post by: ag on October 10, 2014, 12:22:21 PM
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 (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?
Title: Re: Extracting video data from remote files with curl.
Post by: Phil Harvey on October 10, 2014, 12:29:54 PM
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
Title: Re: Extracting video data from remote files with curl.
Post by: ag on October 10, 2014, 01:02:28 PM
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?
Title: Re: Extracting video data from remote files with curl.
Post by: Phil Harvey on October 10, 2014, 01:07:05 PM
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
Title: Re: Extracting video data from remote files with curl.
Post by: ag on October 10, 2014, 02:04:20 PM
Not a problem. Thanks for your help, and for exiftool.