I had taken my battery out of my Android phone for a while, and I put it back in to take some video and a photosphere picture. I noticed afterward that it had a timestamp of 1999 on it. I used PhotoMe to change the EXIF tag for the photo, but I am at a total loss on trying to change the video. I have tried ExifTool GUI, but the EXIF tags are missing. When I try to add a date for the EXIF tag and save it, it says that no changes have been made, and won't save it. I see that it has an old time (in UTC) for the QuickTime tag.
I downloaded MediaInfo and see that the encoded dates there are wrong too. So I found a thread on here with someone suggesting using MP4Box, or Avidemux. So I Remuxed the videos, but I couldn't find a way to add the timestamp. So now the date is for today.
Ughh! Why is this so difficult! It was literally a piece of cake with the photo. I just opened the program, changed the date, saved. DONE. Can someone please show me how to fix this?!
+ Reply to Thread
Results 1 to 30 of 44
But did you try mp4box? Install it(then search for the mp4box.exe) and then from the command prompt(or from start->Run) copy and paste this(change the folder names).
c:\mp4box\mp4box.exe -itags :created=UTC_2015-07-16 -add "c:\video\input.mp4" -new "c:\video\output.mp4"
Last edited by Baldrick; 6th Aug 2015 at 03:50.
I tried mp4Box already, but it was actually mp4box gui. So it was a bit different. I downloaded mp4box, opened command prompt from the window where mp4box was located, and ran this code:
C:\Program Files (x86)\GPAC\mp4box.exe -itags :created=UTC_2015-07-31 -add "C:\Users\Eric & Sarah\Desktop\VID_20150730_223000.mp4" -new "C:\Users\Eric & Sarah\Desktop\output.mp4"
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
That seemed to somewhat do the trick. It made a video this time. But now I'm getting a new error:
Invalid iTune tag format "" - ignoring
"C:\Program Files (x86)\GPAC\mp4box.exe" -itags "created=UTC 2015-07-31 12:00:00" -add "C:\Users\Eric & Sarah\Desktop\VID_20150730_223000.mp4" -new "C:\Users\Eric & Sarah\Desktop\output.mp4"
It should be the Recorded date in MediaInfo.
Well... I'm one step closer! But it's not quite right yet. In the original, when I check MediaInfo, I have an Encoded Date and a Tagged Date. After I process it with mp4Box, it makes the encoded date and tagged date for today, and adds an additional tag of Recorded Date. The Recorded Date is for what I set it to (July), but because the Encoded and Tagged Date is for today, when I upload it to my Google+ photos, it says the video was taken today.
Any way to changed the Encoded and/or Tagged Date?
I downloaded that program EncodedDate/Time Transfer, and I'm not understanding how to change the encoded date with it. Also, when I look at MediaInfo, I noticed that mp4box did not add the recorded date under "Video" or "Audio" (looking under the Tree View). Just under "General" it added the recorded date. And while under "General" the encoded date is for today, under Video and Audio, the encoded date is the still the original date.
So if i was to give EncodedDate/Time Transfer a try, how on earth do I edit the dates? I only was able to process videos. And even then, it also didn't touch the date under "Video" or "Audio."
I just found that http://photos.google.com has a feature where you can change the recorded tag in the video. Just have the video uploaded. It will first show it under the wrong date. Click on the video and it will start playing, but in the top right-hand corner there's a little "i" symbol (open information). The "info" panel will open, and you will see that the date is editable!
I changed the date and time to the appropriate ones, and then downloaded the videos to see if the tags changed. I right-clicked and checked with MediaInfo and could see that Encoded date and Tagged date were not changed, the recorded date was. That seemed to make all the difference!
I hope your videos aren't several GBs....but at least it works!
threehappypenguins, are you looking to just change the Recorded date? Not the created,modified accessed dates from Windows right?
If so I have a small program that will do it for you. The link above was incorrect and has been updated now but the correct link is:
This version has the created -> Recorded feature
Last edited by Budman1; 6th Oct 2015 at 16:50.
Yes, I wanted (and did) change the recorded date. No, not the created, modified and accessed dates from Windows (that was much easier to change; I used SKTimeStamp). That is when I realized that I needed to change the recorded date and that it wasn't so simple.
Thanks for the program.
Great... Hope I got all the bugs out of it. LOL The Rename? check box should add the date and time to the prefix of the file name. In my example it would be something like '2011-11-11 17-11-11_1N.FLV'. If you open the created Crt2Enc.bat file in the program folder, you can see the actual ffmpeg script it uses for that. It is something like this ( if rename checked) for my example:
ffmpeg -y -i "C:\Users\Bud\Desktop\1N.flv" -c copy -map 0 -metadata creation_time="2011-11-11 11-11-11" "C:\Users\Bud\Desktop\3011-11-11 11-11-11_1N.flv"
I couldn't resist for those who really want to get into the nuts and bolts of an MP4 or need to program it instead of calling the external utility Media Info... The dates are stored multiple places but the main one is in the 'mvhd' atom of an MP4. Just open it in a hex editor like HxD and search for mvhd. The bytes are as follows:
Upon searching for mvhd you will find (example):
The 32 bit hex bytes 'D21111E2' is the number of seconds from midnight Jan 1 1804. The manual says 1904 but good luck with that. If you can program or would like to, this becomes decimal 3,524,334,050. Using code such as:
Dim i = Convert.ToInt64("d21111e2", 16)
Dim b As Decimal = i / 31536000
Dim yrs As Integer = Fix(b)
Dim dysoff As Integer = Fix(yrs / 4)
i = i - (dysoff * 86400)
b = i / 31536000
yrs = Fix(b)
Dim d As Decimal = b - yrs
Dim f As Decimal = d * 31536000
b = f / 86400
Dim days As Integer = Fix(b)
d = b - days
f = d * 86400
b = f / 3600
Dim hrs As Integer = Fix(b)
d = b - hrs
f = d * 3600
b = f / 60
Dim mins As Integer = Fix(b)
d = b - mins
f = d * 60
Dim secs As Integer = f
This becomes 2015-10-02 21:40:50
subtracting the number of leap years which add a day (111 yrs/4 = 27days) gives:
Complete name : C:\Path\Copy 528.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 126 MiB
Duration : 1mn 30s
Overall bit rate : 11.8 Mbps
Performer : LGE
Encoded date : UTC 2015-09-05 21:40:50
Tagged date : UTC 2015-09-05 21:40:50
Hey Budman1...thanks for the program. I'm trying to take the Created or Modified date field value and write it to the Encoded date field, but I'm not having much luck...Encoded field in MediaInfo doesn't seem to change after using your tool. Can you show me the right combo of checkboxes in your tool to do this?
Kinda crazy that Google Photos/G+/Picasa uses a field that's so difficult to batch edit!
Okay it works here and all you should need is the Created -> Encoded checked and the rename if you want that added. The other check boxes aren't used for that process. The program just reads from the created date and sets the Encoded date (and Tagged Date if it was originally there.
THE ORIGINAL FILE WILL NOT CHANGE
ORIGINAL MP4 Stats:
AFTER CREATING NEW FILE WITH UNDERSCORE OR DATE IS FRONT OF ORIGINAL NAME:
BEAR IN MIND THE ENCODED IS ALMOST ALWAYS UTC and the created is usually local:
Puzzling... There should be a file called "crt2enc.bat" being created during process in the programs folder. You might want to do an edit on it and see what the metadata is set to in there. It should be something like
ffmpeg -y -i "D:\datetime\UnderwaterMusic480p.mp4" -c copy -map 0 -metadata creation_time="2013-05-06 21:41:00" "D:\datetime\2013-05-06 16-41-00_UnderwaterMusic480p.mp4"
It may be that I am killing the CMD window too soon if your "D:" drive is like a slow USB... Possible.
Otherwise try moving program folder and From/To folder to the C: drive and try. If that works I can alter the program.
Let me know if you see any changes.
Last edited by Budman1; 3rd Oct 2015 at 16:23.
Last edited by NiGHT-WiNG; 21st Feb 2016 at 10:05. Reason: .
Okay it looks like the creation date was rejected in yellow on your last try because, apparently, FFMpeg is fussier that Visual studio and wants the Year first in the Metadata. I think I fixed that by using another variable in my programs that should allow people who do not use Military time, as I do, on their computers to use this now.
The new version I uploaded has 2 versions to leave the CMD open for test and one that closes it after enough time to actually copy the file so it can continue with the next one in batch mode. I also included FFMpeg from http://ffmpeg.zeranoe.com/builds/ with permission since I do not compile it into my program. So everything should be in one folder now.
The new link is: https://files.secureserver.net/0sE1d56pH8vH3j
Any changes in the future I will add below and change this link to conserve space on this thread.
Fixed FFMPEG -metadata format from YYYY/MM/DD HH:MM:SS to correct YYYY-MM-DD HH:MM:SS
Last edited by Budman1; 6th Oct 2015 at 00:13.
Sorry mdpublic... Must have been too much Xanax... LOL The format of FFMPEG should have been YYYY-MM-DD HH:mms,. It doesn't like forward slashes and I should have known that.
I fixed that also added a debug check box to leave a CMD window open to check the output or uncheck for multiple batch changes. I downloaded the new version and ran to check and it got the appropriate results.
Looks like that latest build is working for me...thanks so much for the help and the nice toolset!
Great and thx for the testing. Now it should work for someone with different date formats because of your feedback. I really appreciate it. Thx
FYI, a few notes/updates:
- FYI, you're adding an underscore "_" to the beginning of the file names even when the "Rename" box is not checked
- Google treats the Encoded UTC time as your local time, so it needs to match your local time (i.e. Created Date in local time needs to display the same numbers as Encoded Date UTC time)
- It seems your program takes local time, converts to UTC, then writes that to Encoded date, so there's a difference between Created Date and displayed Encoded Date that Google interprets (so your album sorted by date will display videos XX hours later/earlier than pictures taken at same time)
- To make everything jive, I had to shift the created date back by 5 hrs (UTC to CDT difference), run your program, then shift the created date forward 5 hours and remove the underscores (I used Flexible Renamer to do all of the time and file name manipulation)
- Maybe your checkbox for "UTC --> Local" could cover this?
- In reality, it's Google's fault...they take the raw time + your configured time zone (vs reading the time + time zone and converting to your configured time zone).
Yes I am and it is for a good reason unless someone tries the program and has no problems and doesn't mind making a possible mistake:
FYI, you're adding an underscore "_" to the beginning of the file names even when the "Rename" box is not checked
Google treats the Encoded UTC time as your local time, so it needs to match your local time (i.e. Created Date in local time needs to display the same numbers as Encoded Date UTC time)
Maybe your checkbox for "UTC --> Local" could cover this?
BW... You must make that 6 hours difference instead of 5 once DST ends so hardcoding that will vary from year to year and month to month also.
I can make any changes someone needs but for other users I thought this would be correct.