VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 52
Thread
  1. 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?!
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    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).

    Code:
    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 02:50.
    Quote Quote  
  3. 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:

    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"
    But then I got this error:

    'C:\Program' is not recognized as an internal or external command, operable program or batch file.
    Also, how would I get the actual time on there as well? I looked up the UTC to Atlantic Time converter, and if I want 10:30 pm Atlantic time on July 30, 2015, then I would need to stamp the time 2:30 am UTC on July 31, 2015.
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Add "" around the mp4box.exe like

    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"
    Quote Quote  
  5. 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
    I double checked by opening MediaInfo and the date is for today. So it didn't tag the date. So how would I do the format to make it work, and how would I add the time as well?
    Quote Quote  
  6. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    I think

    Code:
    "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"
    Will work better.

    It should be the Recorded date in MediaInfo.
    Quote Quote  
  7. 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?
    Quote Quote  
  8. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Okey. It seems much more complex then I thought.

    Maybe can this utility change those dates https://forum.videohelp.com/threads/361679-Please-Help%21-Date-and-Time-issues-mp4-Enco...=1#post2300155
    Quote Quote  
  9. 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."
    Quote Quote  
  10. 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!
    Quote Quote  
  11. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM


    I hope your videos aren't several GBs....but at least it works!
    Quote Quote  
  12. Originally Posted by Baldrick View Post


    I hope your videos aren't several GBs....but at least it works!
    Nope. They're several hundred MBs.
    Quote Quote  
  13. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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:
    https://files.secureserver.net/0sE1d56pH8vH3j

    This version has the created -> Recorded feature

    Click image for larger version

Name:	ScreenHunter_166 Sep. 21 13.16.jpg
Views:	2575
Size:	58.5 KB
ID:	33780

    Click image for larger version

Name:	ScreenHunter_165 Sep. 21 13.15.jpg
Views:	2510
Size:	18.7 KB
ID:	33781Click image for larger version

Name:	ScreenHunter_166 Sep. 21 13.15.jpg
Views:	2419
Size:	18.4 KB
ID:	33782
    Last edited by Budman1; 6th Oct 2015 at 15:50.
    Quote Quote  
  14. 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.
    Quote Quote  
  15. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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:

    Code:
    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"
    Quote Quote  
  16. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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:
    Click image for larger version

Name:	ScreenHunter_166 Sep. 27 21.35.jpg
Views:	2456
Size:	33.5 KB
ID:	33839

    Upon searching for mvhd you will find (example):
    Click image for larger version

Name:	ScreenHunter_166 Sep. 27 21.37.jpg
Views:	2486
Size:	37.3 KB
ID:	33840

    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:
    2015-09-05 21:40:50


    General
    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
    Quote Quote  
  17. 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!

    Thanks!
    Quote Quote  
  18. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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:
    Click image for larger version

Name:	Before.jpg
Views:	809
Size:	73.6 KB
ID:	33906

    CONVERT HERE:
    Click image for larger version

Name:	ScreenHunter_166 Oct. 02 00.34.jpg
Views:	2328
Size:	69.6 KB
ID:	33907


    AFTER CREATING NEW FILE WITH UNDERSCORE OR DATE IS FRONT OF ORIGINAL NAME:
    Click image for larger version

Name:	After.jpg
Views:	801
Size:	73.6 KB
ID:	33908

    BEAR IN MIND THE ENCODED IS ALMOST ALWAYS UTC and the created is usually local:
    Click image for larger version

Name:	ScreenHunter_166 Oct. 02 00.36.jpg
Views:	2362
Size:	22.3 KB
ID:	33909
    Quote Quote  
  19. Thanks for the quick reply.

    It doesn't seem to be working for me (see image below)...used your process/settings...any ideas?


    Click image for larger version

Name:	snap1110.jpg
Views:	631
Size:	188.4 KB
ID:	33911
    Quote Quote  
  20. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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

    Code:
    ffmpeg -y -i "D:\datetime\UnderwaterMusic480p[2].mp4" -c copy -map 0 -metadata creation_time="2013-05-06 21:41:00" "D:\datetime\2013-05-06 16-41-00_UnderwaterMusic480p[2].mp4"
    I have also uploaded a separate program that will allow the CMD window to remain open so you can see what is actually happening during FFMpeg portion. It is at https://files.secureserver.net/0sYxbHFr3A7U5t

    Click image for larger version

Name:	ScreenHunter_167 Oct. 02 11.52.jpg
Views:	2346
Size:	24.3 KB
ID:	33912Click image for larger version

Name:	ScreenHunter_167 Oct. 02 11.51.jpg
Views:	2483
Size:	102.9 KB
ID:	33913

    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.
    Thanks
    Budman1
    Last edited by Budman1; 3rd Oct 2015 at 15:23.
    Quote Quote  
  21. So, I guess I didn't realize I already needed to have ffmpeg...I downloaded it and put the .exe in the same directory as your program, and now it's doing something...but it seems to be wiping out the Encoded Date field in the header/metadata.

    Click image for larger version

Name:	snap1111.jpg
Views:	583
Size:	255.3 KB
ID:	33914

    Click image for larger version

Name:	snap1112.jpg
Views:	572
Size:	232.9 KB
ID:	33915
    Quote Quote  
  22. Member NiGHT-WiNG's Avatar
    Join Date
    May 2015
    Location
    Some sort of cave with bats flying around
    Search PM
    ...
    Last edited by NiGHT-WiNG; 21st Feb 2016 at 09:05. Reason: .
    Quote Quote  
  23. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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.

    UPDATE:
    Fixed FFMPEG -metadata format from YYYY/MM/DD HH:MM:SS to correct YYYY-MM-DD HH:MM:SS
    Last edited by Budman1; 5th Oct 2015 at 23:13.
    Quote Quote  
  24. Thanks for the new version and for checking in. It set the dates to midnight on 12/31/14 (see below).

    Click image for larger version

Name:	Capture02.JPG
Views:	2389
Size:	51.2 KB
ID:	33947

    Click image for larger version

Name:	Capture01.JPG
Views:	517
Size:	208.3 KB
ID:	33946
    Quote Quote  
  25. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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.

    Click image for larger version

Name:	ScreenHunter_167 Oct. 05 22.51.jpg
Views:	525
Size:	41.7 KB
ID:	33949

    Click image for larger version

Name:	ScreenHunter_167 Oct. 05 22.55.jpg
Views:	2429
Size:	83.1 KB
ID:	33950
    Quote Quote  
  26. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Previous link above has been updated (https://files.secureserver.net/0sE1d56pH8vH3j) and changes were added to it.
    Last edited by Budman1; 5th Oct 2015 at 23:36.
    Quote Quote  
  27. Looks like that latest build is working for me...thanks so much for the help and the nice toolset!
    Quote Quote  
  28. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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
    Bud
    Quote Quote  
  29. 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).
    Quote Quote  
  30. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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
    Yes, That was to protect anyone making the From and To folders the same with their one of a kind videos that might be overlaid. Just a debug caution.

    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)
    I don't know what Google does or where but the UTC and Local time are NOT the same. When you create a file in Windows it is in Local time Created but cameras and MP4 formats always reference the Date time in UTC. Notice in the the ffmpeg - metadata entry there is no 'UTC' shown but it shows up that way. I can change it but if your Camera puts UTC 15:00:00 time for a video that was shot at 10:00 AM. then the file will show created (Windows) at 10:00:00 but the CORRECT UTC time would be UTC 15:00:00. I knowmaking the UTC 10:00:00 would make it nicer visually but that is not the correct UTC time. I thought it was more ACCURATE to show it accurately (Daylight Savings Time and all).

    Maybe your checkbox for "UTC --> Local" could cover this?
    I can make it do that but does everyone want 10:00:00 AM in USA Central Daylight Time to show the England time (UTC) as 10:00:00 also? Looks nice but it isn't correct. In my example above, UTC 15:00:00 is the correct time the video would have been encoded.

    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!