Author Topic: MP3 Create and Original Date  (Read 3896 times)

tadej

  • Full Member
  • ***
  • Posts: 34
MP3 Create and Original Date
« 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.




Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: MP3 Create and Original Date
« Reply #1 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

  • Full Member
  • ***
  • Posts: 34
Re: MP3 Create and Original Date
« Reply #2 on: June 11, 2014, 03:46:29 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: MP3 Create and Original Date
« Reply #3 on: June 11, 2014, 07:52:13 PM »
Hi Dusan,

Any chance to see mp3 writing in the future ?

Not in the foreseeable future.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tadej

  • Full Member
  • ***
  • Posts: 34
Re: MP3 Create and Original Date
« Reply #4 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: MP3 Create and Original Date
« Reply #5 on: June 13, 2014, 07:21:17 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.

Quote
What 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ryerman

  • Sr. Member
  • ****
  • Posts: 132
Re: MP3 Create and Original Date
« Reply #6 on: June 13, 2014, 09:19:51 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.

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.
Windows 10 Home 64 bit, Exiftool v11.86

tadej

  • Full Member
  • ***
  • Posts: 34
Re: MP3 Create and Original Date
« Reply #7 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.