ExifTool Forum

ExifTool => Newbies => Topic started by: ijenjcdkmsd on April 27, 2024, 01:55:36 PM

Title: Keeping video audio and removing all other metadata
Post by: ijenjcdkmsd on April 27, 2024, 01:55:36 PM
As the subject title says, I am struggling to keep my video's audio whilst removing all other metadata. Currently just using the -all tag which of course removes everything but is there a way to save the audio data and then re apply it to the video or is there a way to just ignore audio during the initial cli request.

The file is .mp4
Title: Re: Keeping video audio and removing all other metadata
Post by: StarGeek on April 27, 2024, 03:24:47 PM
Exiftool cannot do any edits to any tracks in a video, audio or otherwise.  If you have a file that exiftool is removing audio from, then it would be appreciated if you share it because that would be a bug.
Title: Re: Keeping video audio and removing all other metadata
Post by: ijenjcdkmsd on April 27, 2024, 04:31:02 PM
Sorry I think this was a mistake on my end, I just redid it and there now seems to be sound.

Would you be able to let me know how you would go about removing all metadata from a mp4 given it's file path?

Currently I am doing something like this:
                powershell_command = rf""".\exiftool.exe -overwrite_original -all="{file_path}" """
                subprocess.run(["powershell", "-Command", powershell_command], shell=True)

but I am getting the error: 'No file specified'
Title: Re: Keeping video audio and removing all other metadata
Post by: ijenjcdkmsd on April 27, 2024, 04:35:46 PM
ignore this too, this now works:
powershell_command = rf""".\exiftool.exe -overwrite_original -all= "{file_path}" """
Title: Re: Keeping video audio and removing all other metadata
Post by: StarGeek on April 27, 2024, 06:49:43 PM
You might want to add this as well
-CreateDate= -ModifyDate= -Track*Date= -Media*Date=

These are tags that cannot be removed from an MP4 file and are unaffected by -All=. The above options will set these time stamps to 0.