ffmpeg – Edit video h.264 metadata without encode

Ffmpeg is not known for being a metadata video editor, although
this is possible.

I quote the most-upvoted answer on the post
How to change metadata with ffmpeg/avconv without creating a new file?)

You can do this with FFmpeg like so:

ffmpeg -i input.avi -metadata key=value -codec copy output.avi

Example:

$ du -h test.mov 
 27M  test.mov
$ ffprobe -loglevel quiet -show_format out.mov | grep title    # nothing found
$ ffmpeg -loglevel quiet -i test.mov -codec copy -metadata title="My title" out.mov
$ du -h out.mov
 27M  out.mov
$ ffprobe -loglevel quiet -show_format out.mov | grep title
TAG:title=My title

See the documentation for
-metadata
and on
stream copying for more
information.

Note also that not all formats allow setting arbitrary metadata, for,
e.g., Quicktime doing -metadata title="my title" does what you’d
expect, but -metadata foo=bux does nothing.

I note that there exist specialized products for editing
video metadata that do not need to re-encode the video and have
a good user interface.

Software recommendations are off-subject on our site, but you may start
with the article
Best Free Video Metadata Editor software for Windows 11/10.

Read more here: Source link