[FFmpeg-user] filter ffmetadata does not output all metadata and is missing in documentation

James Darnley james.darnley at gmail.com
Wed Mar 4 01:34:55 EET 2020


On 2020-03-04 00:16, James Darnley wrote:
> On 2020-03-03 23:07, Ulf Zibis wrote:
>> $ ~/Projects/ffmpeg/ffmpeg-git-20200211-amd64-static/ffmpeg -i
>> 20200205_165401.mp4 -f ffmetadata 20200205_165401.meta 
> 
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20200205_165401.mp4':
>>   Metadata:
>>     major_brand     : mp42
>>     minor_version   : 0
>>     compatible_brands: isommp42
>>     creation_time   : 2020-02-05T19:55:01.000000Z
>>     location        : -00.7655-047.1715/
>>     location-eng    : -00.7655-047.1715/
>>     com.android.version: 8.0.0
>>   Duration: 00:00:58.65, start: 0.000000, bitrate: 17273 kb/s
> 
>> File '20200205_165401.meta' already exists. Overwrite? [y/N] y
>> Output #0, ffmetadata, to '20200205_165401.meta':
>>   Metadata:
>>     major_brand     : mp42
>>     minor_version   : 0
>>     compatible_brands: isommp42
>>     com.android.version: 8.0.0
>>     location        : -00.7655-047.1715/
>>     location-eng    : -00.7655-047.1715/
>>     encoder         : Lavf58.38.100
>> Stream mapping:
>> Press [q] to stop, [?] for help
> 
> It is clearly present in the input file's metadata so how is it not
> copied into the output file?
> 
> To the source!
> 

Here's the answer.

> commit e377208d43
> Author: Michael Niedermayer <michaelni at gmx.at>
> Date:   Thu Jun 28 17:09:36 2012 +0200
> 
>     ffmpeg: dont copy creation_time as the destination file is not created at that time
>     
>     Fixes Ticket1439
>     
>     Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index f6ce70b8f2..aa16e05f7e 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -5242,6 +5242,7 @@ loop_end:
>                       AV_DICT_DONT_OVERWRITE);
>          if(o->recording_time != INT64_MAX)
>              av_dict_set(&oc->metadata, "duration", NULL, 0);
> +        av_dict_set(&oc->metadata, "creation_time", NULL, 0);
>      }
>      if (!o->metadata_streams_manual)
>          for (i = output_files[nb_output_files - 1]->ost_index; i < nb_output_streams; i++) {

Trac ticket cause: http://trac.ffmpeg.org/ticket/1439

I would say: use ffprobe to get the metadata of files.



More information about the ffmpeg-user mailing list