Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Bernd Dürrer" <Bernd.Duerrer@gmx.de>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: remove hack breaking creation time parsing
Date: Thu, 13 Apr 2023 12:13:50 +0200
Message-ID: <trinity-c6b1f53c-1bbb-47c2-9846-7b1ab80c5860-1681380830535@3c-app-gmx-bap58> (raw)
In-Reply-To: <b97dcfa1-9746-49f7-13bd-cbc75f84a71e@passwd.hu>

On Tue Apr 11 2023, Marton Balint wrote:

> Maybe you can check if the DLNA server reads that. Or if it only reads the
> year information, then com.apple.quicktime.year might be even better.

I have checked the DLNA Guidelines and Part 1-1, clause 10.1.3.12.3, Table 13, recommends to provide the dc:date metadata property for
video items. I have MP4 files where the date metadata was set, but not to a complete date, but only the year part. This appears to be
the reason why my DLNA server has used the creation_time metadata instead. After setting the date tag to a complete date YYYY-MM-DD HH:MM:SS,
it is recognised by the DLNA server and provided to the DLNA clients, and there is no problem to set the date tag to dates before 1970 with
ffmpeg. So my use case to set the creation_time tag to dates before 1970 is now obsolete.

Nevertheless, I looked into ffmpeg why the command

ffmpeg -i input.mp4 -map_metadata 0 -metadata creation_time="1965-01-01 12:00:00" -codec copy output.mp4

results in creation_time written as 2036-01-01T23:59:59.000000Z to the output file. The reason is at the end of function av_parse_time
in libavutil/parseutils.c where mktime is called to convert the dt structure. As mktime cannot represent calendar times before 1970,
it returns -1. However, as the result is not checked, the return value of -1 is used for all subsequent processing and results in the wrong
date written to the file. In my humble opinion, at least a warning should be raised that the date value provided as parameter on the command
line is out of range.

Thanks for your support and kind regards,

Bernd
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-04-13 10:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 11:46 Bernd Dürrer
2023-04-11 18:15 ` Marton Balint
2023-04-12  8:10   ` Bernd Dürrer
2023-04-12  8:38     ` "zhilizhao(赵志立)"
2023-04-13 10:13   ` Bernd Dürrer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-08 18:37 Marton Balint
2023-04-08 21:14 ` Michael Niedermayer
2023-04-09 13:49   ` Marton Balint
2023-04-09 14:06     ` Anton Khirnov
2023-04-09 17:20     ` Michael Niedermayer
2023-04-09 17:52       ` Marton Balint
2023-04-09 21:27         ` Michael Niedermayer
2023-04-10 19:11           ` Marton Balint
2023-04-10 22:34             ` Michael Niedermayer
2023-04-10  2:44       ` "zhilizhao(赵志立)"
2023-04-10 14:31         ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-c6b1f53c-1bbb-47c2-9846-7b1ab80c5860-1681380830535@3c-app-gmx-bap58 \
    --to=bernd.duerrer@gmx.de \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git