ExifTool Forum

ExifTool => Newbies => Topic started by: tadej on June 11, 2014, 01:12:21 PM

Title: MP3 Create and Original Date
Post by: tadej on June 11, 2014, 01:12:21 PM
Hi Phil,
as the last stage of my current development I would like to write the following into MP3 file.
The command is the following:
-createdate="2014:06:06 12:24:16" -datetimeoriginal="2014:06:06 12:24:16" "D:\_T2Pexamples\... multi VIDEO and PHOTOs\data\time2PlaceFILES\VOICEs\DSCN4166.mp3"

But I get a message that writing to mp3 is not yet supported.

Is there a way arround ?
Bottom line is that I would like to write time and date to sound file.



Title: Re: MP3 Create and Original Date
Post by: Phil Harvey on June 11, 2014, 01:17:47 PM
Yes.  ExifTool does not yet support writing MP3 files.

The only way around this is to use some utility other than ExifTool.

- Phil
Title: Re: MP3 Create and Original Date
Post by: tadej on June 11, 2014, 03:46:29 PM
Quote from: Phil Harvey on June 11, 2014, 01:17:47 PM
ExifTool does not yet support writing MP3 files.

I have "invented" temporary solution by file name.
Example:
t2pV~20140518165316000~IMGP1041.mp3

Any chance to see mp3 writing in the future ?

-Dusan
Title: Re: MP3 Create and Original Date
Post by: Phil Harvey on June 11, 2014, 07:52:13 PM
Hi Dusan,

Quote from: tadej on June 11, 2014, 03:46:29 PM
Any chance to see mp3 writing in the future ?

Not in the foreseeable future.

- Phil
Title: Re: MP3 Create and Original Date
Post by: tadej on June 13, 2014, 05:34:00 AM
Fair enough Phil,

Just spotted an issue.
Please find file attached.

Exif reports:
======== t2pV~19801105151907000~Video0033.mp3
ExifTool Version Number         : 9.38
File Name                       : t2pV~19801105151907000~Video0033.mp3
Directory                       : .
File Size                       : 488 kB
File Modification Date/Time     : 2014:06:13 09:43:21+02:00
File Access Date/Time           : 2014:06:13 09:57:18+02:00
File Creation Date/Time         : 2014:06:12 17:59:35+02:00
File Permissions                : rw-rw-rw-
File Type                       : MP3
MIME Type                       : audio/mpeg
MPEG Audio Version              : 1
Audio Layer                     : 3
Audio Bitrate                   : 56 kbps
Sample Rate                     : 44100
Channel Mode                    : Stereo
MS Stereo                       : Off
Intensity Stereo                : Off
Copyright Flag                  : False
Original Media                  : False
Emphasis                        : None
ID3 Size                        : 148
User Defined Text               : (compatible_brands) 3gp53gp43g2aisom
Encoder Settings                : Lavf55.22.100
Duration                        : 0:01:11 (approx)
    1 image files read
   1 files could not be read

But actuall duration is about 31 seconds.
Any idea.

What is the cause of     1 files could not be read

Regards,
Dusan
Title: Re: MP3 Create and Original Date
Post by: Phil Harvey on June 13, 2014, 07:21:17 AM
Quote from: tadej on June 13, 2014, 05:34:00 AM
Duration                        : 0:01:11 (approx)

But actuall duration is about 31 seconds.
Any idea.

It looks to me like the stored value of AudioBitrate is incorrect.  It should be 128 kbps.

QuoteWhat is the cause of     1 files could not be read

Did  you have some other garbage on your command line that ExifTool interpreted as a file name?  I'm not getting the whole picture here.  I don't know what command you used, and there should be an Error message for each file that could not be read.

- Phil
Title: Re: MP3 Create and Original Date
Post by: ryerman on June 13, 2014, 09:19:51 AM
Quote from: tadej on June 13, 2014, 05:34:00 AM
But actuall duration is about 31 seconds.
Any idea.
When an application (like Exiftool or Mp3tag) reports the duration of an MP3 file as different from the actual duration, that often means the file header is faulty in some way.
Sometimes it can be corrected by using a tool called VBRFix, available here (http://pages.citebite.com/d3x3e6e0p2eru).

After fixing your file with VBRFix, Exiftool shows 31 seconds for its duration.

Here's my disclaimer:
I don't know how or why it works and I'm not an expert on audio files or file construction.
Title: Re: MP3 Create and Original Date
Post by: tadej on June 14, 2014, 12:08:46 PM
Thanks for the tip regarding VBRfix.
I will investigate further a bit later and will give step by step findings.
Might be interesting for someone else as well.
I have setup a process which takes mp3 sound track from video using ffmpeg.exe
I also work with any other sound and convert it to mp3 using lame.exe
I also convert mp3 to mp3 if mp3 was not generated by lame.exe in the first place.
This way I get (alt least I hope so) firm mp3 structure.
There must be as issue somewhere on this path.
The thing is that correcting mp3 headers is something I can not afford to transfer to the customers.
Being non expert for audio headers means that I have to find proper mixture of tests to get most likely duration.
The last tool in despair to try to get acceptable duration is to play mp3 in windows media player or similar and measure duration between start end end using timer.
Currently I use http://www.codeguru.com/vb/gen/vb_multimedia/mp3s/article.php/c4267/Reading-Information-from-an-MP3-File.htm
which has not failed for me yet.