Friday, December 13, 2013

Changing Meta Info of video files with ffmpeg (command line)

If you want to add or change the meta information of your video/audio files, you probably can find a GUI driven software that does just that for you. But if you happen to work on your media server in command line, and want to change a file here and there via the command line.

You have some options as:

mencoder, ogmtools, mkvtoolsnix, ffmpeg.

Of all the above, ffmpeg seems to support the largest set of container formats.


Example: 

You have a video file: videofile.mkv
and want to add or change some meta data:

title = "My Title",
comments = "My Comments"


Here is how you do it @ the command line, given you have ffmpeg and the needed codexes installed properly.


ffmpeg -i videofile.mkv -vcodec copy -acodec copy -metadata title="My Title" -metadata comments="My Comments" NewFile.mkv



Other meta tags you can manipulate for audio & video files are:


album        -- name of the set this work belongs to
album_artist -- main creator of the set/album, if different from artist.
                e.g. "Various Artists" for compilation albums.
artist       -- main creator of the work
comment      -- any additional description of the file.
composer     -- who composed the work, if different from artist.
copyright    -- name of copyright holder.
creation_time-- date when the file was created, preferably in ISO 8601.
date         -- date when the work was created, preferably in ISO 8601.
disc         -- number of a subset, e.g. disc in a multi-disc collection.
encoder      -- name/settings of the software/hardware that produced the file.
encoded_by   -- person/group who created the file.
filename     -- original name of the file.
genre        -- <self-evident>.
language     -- main language in which the work is performed, preferably
                in ISO 639-2 format. Multiple languages can be specified by
                separating them with commas.
performer    -- artist who performed the work, if different from artist.
                E.g for "Also sprach Zarathustra", artist would be "Richard
                Strauss" and performer "London Philharmonic Orchestra".
publisher    -- name of the label/publisher.
service_name     -- name of the service in broadcasting (channel name).
service_provider -- name of the service provider in broadcasting.
title        -- name of the work.
track        -- number of this work in the set, can be in form current/total.
variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of
 
 
 

No comments:

Post a Comment

Please be courteous, even if you do not share the same view.