Topic: mp4 file time info not extracted

All mp4 file from a phone cannot be renamed by shoot time.
Expression I use: %Xdo%Vn%VDd.%e, but new names are empty.
Player gives media info:

General
Complete name                  : E:\photos\20130615.mp4
Format                         : MPEG-4
Format profile                 : Base Media / Version 2
Codec ID                       : mp42
File size                      : 2.62 MiB
Duration                       : 51s 333ms
Overall bit rate mode          : Variable
Overall bit rate               : 428 Kbps
Encoded date                   : UTC 2013-06-15 11:47:49
Tagged date                    : UTC 2013-06-15 11:47:49

Video
ID                             : 1
Format                         : MPEG-4 Visual
Format profile                 : Simple@L2
Format settings, BVOP          : No
Format settings, QPel          : No
Format settings, GMC           : No warppoints
Format settings, Matrix        : Default (H.263)
Codec ID                       : 20
Duration                       : 51s 333ms
Bit rate mode                  : Variable
Bit rate                       : 376 Kbps
Nominal bit rate               : 346 Kbps
Maximum bit rate               : 384 Kbps
Width                          : 320 pixels
Height                         : 240 pixels
Display aspect ratio           : 4:3
Frame rate mode                : Variable
Frame rate                     : 14.981 fps
Minimum frame rate             : 7.500 fps
Maximum frame rate             : 15.000 fps
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Scan type                      : Progressive
Compression mode               : Lossy
Bits/(Pixel*Frame)             : 0.326
Stream size                    : 2.30 MiB (88%)
Encoded date                   : UTC 2013-06-15 11:47:49
Tagged date                    : UTC 2013-06-15 11:47:49

Audio
ID                             : 2
Format                         : AAC
Format/Info                    : Advanced Audio Codec
Format profile                 : LC
Codec ID                       : 40
Duration                       : 51s 221ms
Bit rate mode                  : Constant
Bit rate                       : 48.0 Kbps
Channel(s)                     : 2 channels
Channel(s)_Original            : 1 channel
Channel positions              : Front: C
Sampling rate                  : 48.0 KHz
Compression mode               : Lossy
Stream size                    : 300 KiB (11%)
Encoded date                   : UTC 2013-06-15 11:47:50
Tagged date                    : UTC 2013-06-15 11:47:50

If allowed I can upload a sample.

Re: mp4 file time info not extracted

Hi,

I have to say that Siren metadata extraction capabilities are far less powerful than MediaInfo ones.
The result you have would not surprise me.

I will try to have a look at this video. Please send it to the "Remarks and suggestions" email address you can find in Siren's "About" window.
If the attached file is over 10 MB then extract only its beginning by right-clicking it in Siren and choose the "File content extraction (debug)" option, 1 MB should be enough.
Give me any information regarding its origin and modifications done to it.

Re: mp4 file time info not extracted

I have sent a small file for you to inspect. Hope you could find a way to get that "Encoded date" or "Tagged date".

Re: mp4 file time info not extracted

I have received the small mp4 file.
Based on what I understand these dates are extracted from the video/audio frames and Siren doesn't parse them.
On way to use one of them in Siren could be to extract them with MediaInfo to one or more files and then use the "%T" variable.
Sorry for not being very helpful.

Re: mp4 file time info not extracted

I dowloaded MediaInfo from:
https://sourceforge.net/projects/mediainfo/
In order to use the "%T" variable, I need to have a text file of such structure:

Time of file1
Time of file2
Time of file3
...

But MediaInfo seems do not have such option of export.

Re: mp4 file time info not extracted

Download the CLI package from MediaInfo main site and use it in a cmd window like this :
MediaInfo --Inform="Video;%Encoded_Date%" MYVIDEO.mp4

Using output redirection you can easily generate the file(s).
Maybe creating one metadata file per video could be easier to manage and use.

Re: mp4 file time info not extracted

Thank you. CLI works that I find using:
mediainfo --Inform="General;%Encoded_Date%\n" D:\*.mp4
could generate the list of dates, but it seems additional work need to be done in order to make sure the list order is the same as in Siren. How "creating one metadata file per video" work?

Re: mp4 file time info not extracted

On my machine it seems that MediaInfo treats the files alphabetically.
If it is not the case on yours maybe can you try use "for" to do it :
for %f in (*.mp4) do MediaInfo --Inform="General;%Encoded_Date%" %f >> MIED.txt
If Siren doesn't show them in the same order try to uncheck "Natural sort" in Preferences/Display.

To create one file per video you can use "for" too.
First create a directory to store them. For example "MIED". Then execute :
for %f in (*.mp4) do MediaInfo --Inform="General;%Encoded_Date%" %f > MIED\%f
Then use an expression like : MIED\\%f;%T1{%fc}

Re: mp4 file time info not extracted

I had no time to dig into your advice until today. I read the help file once again esp. the usage of ";", reviewed the "for" command, and finally got the work done. This is what I have find out working:

in command line,
for /R %f in (*.mp4) do MediaInfo --Inform="General;%Encoded_Date%" "%f" >%f.txt

in Siren, load sub directories, and rename according to expression
%fc.txt;%T1{%fc}.mp4

then in command line,
del /S *.txt (I have no other txt file)

Thank Rémi!

Re: mp4 file time info not extracted

Hello Rémi,

Do you know the excellent ExifTool by Phil Harvey? It's a tool that can extract about any meta data from a lot of media files.
It can be used as a stand alone tool or as a Perl library. Perhaps could you use it to extract meta data from the files.

Re: mp4 file time info not extracted

Hello,

I wrote about MediaInfo because I thought luweitest was using it. After rereading his post I realize that maybe I was wrong ...
ExifTool is a very good library/tool I sometimes use as a standalone program.
But linking it with Siren would be a huge task.
In general I don't like to use third party libraries even if I have made
compromises with boost and wxWidgets.

12 (edited by Todding 2022-03-08 13:51:56)

Re: mp4 file time info not extracted

apalou21 wrote:

Hello Rémi,

Do you know the excellent review of Phallosan Forte by Phil Harvey? It's a tool that can extract about any meta data from a lot of media files.
It can be used as a stand alone tool or as a Perl library. Perhaps could you use it to extract meta data from the files.

Good idea. It's a pretty good tool and I use it for this function too.