ExifTool Forum

General => Metadata => Topic started by: Zetorg on April 28, 2021, 02:11:32 AM

Title: Backup and restore metadata with MP4 files
Post by: Zetorg on April 28, 2021, 02:11:32 AM
I have 2 selfie videos taken with my Samsung Galaxy S10, both in MP4 format. Would like to merge/join/concatenate them, while keeping the metadata of the first. So if data is not preserved with ffmpeg, would like to do so with exiftool. Any idea how to backup then restore, if possible?
Title: Re: Backup and restore metadata with MP4 files
Post by: StarGeek on April 28, 2021, 11:16:29 AM
You can copy over everything that exiftool can copy with
exiftool -TagsFromFile OriginalFirst.mp4 -All:all NewFile.mp4

But, in all probability, you're going to lose data.  Odds are there's an EXIF block in the original video.  This is non-standard as the spec doesn't provide for inclusion of an EXIF block.  So this will be lost.  You can mitigate some of that by copying the data to XMP using the exif2xmp.args file (https://raw.githubusercontent.com/exiftool/exiftool/master/arg_files/exif2xmp.args).  This will copy most EXIF data to the equivalent XMP tag, though I don't know if there is an equivalent for every EXIF tag.

It's also likely that the original will include MakerNotes.  There's nothing equivalent for these tags as they are the proprietary tags that most camera companies include.  So these will also be lost.
Title: Re: Backup and restore metadata with MP4 files
Post by: Zetorg on April 28, 2021, 04:54:36 PM
Thank you. Looks like works.