VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Member
    Join Date
    May 2017
    Location
    Denmark
    Search PM
    Hi,

    I am trying to do away with Apple Photos as tool to manage all my pictures and videos. I have a big folder with videos and have only realized now that Apple Photos in some cases overwrites the original creation date of your videos. I don't want to go back having to go through various libraries to extract my videos again so I would like to batch update the videos in my source folder so they show the right dates. I found a tool do this for JPGs and this works fine.

    I used Budman1's tool, but I can't make it work. I am not a programmer so only have basic understanding. Below is the output of the test I did, but the new file does still not show the correct creation date. I want the encoded date in 2014 to show as creation date. How do I do this?

    General
    Complete name : C:\Users\xxx\Documents\_IMG_0077-4.mp4
    Format : MPEG-4
    Format profile : QuickTime
    Codec ID : qt 2005.03 (qt )
    File size : 24.6 MiB
    Duration : 1 min 7 s
    Overall bit rate : 3 040 kb/s
    Encoded date : UTC 2017-04-15 18:43:05
    Tagged date : UTC 2017-04-15 18:43:07
    Writing library : Apple QuickTime

    Video
    ID : 2
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 1 min 7 s
    Source duration : 1 min 8 s
    Bit rate : 2 970 kb/s
    Width : 720 pixels
    Height : 1 280 pixels
    Display aspect ratio : 0.563
    Frame rate mode : Variable
    Frame rate : 29.970 (29970/1000) FPS
    Minimum frame rate : 28.571 FPS
    Maximum frame rate : 30.000 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.108
    Stream size : 24.1 MiB (98%)
    Source stream size : 24.1 MiB (98%)
    Encoded date : UTC 2014-03-21 10:21:01
    Tagged date : UTC 2017-04-15 18:43:07
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 1
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 1 min 7 s
    Source duration : 1 min 7 s
    Bit rate mode : Constant
    Bit rate : 64.0 kb/s
    Channel(s) : 1 channel
    Channel positions : Front: C
    Sampling rate : 44.1 kHz
    Frame rate : 43.066 FPS (1024 spf)
    Compression mode : Lossy
    Stream size : 522 KiB (2%)
    Source stream size : 522 KiB (2%)
    Encoded date : UTC 2014-03-21 10:21:01
    Tagged date : UTC 2017-04-15 18:43:07
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    @ArieTillens, I have redone the date change program and cleaned up the code and added a guide to it but still need a few tests to run on it. It takes the Windows Created date OR Modified Date (Modified checkbox overrides Created) and sets it into the Video Metadata Encoded and Tagged dates.

    It also Reads the Video Encoded date, Tagged date, and Recorded date and uses whichever comes first in that order and changes the Windows Created date and/or Modified date. So it works both directions. You can also set Dates manually (encoded/Tagged/Created/Modified).

    Basic instructions are:

    Manual Alter Encoded checked
    Encoded set to Manually set Date/Time
    Created set to Original video Created Date/Time
    Modified set to Original Video modified Date/Time

    Manual Alter Created checked
    Encoded remains the same as set Manually or from Original Copy
    Created set to Manual Date/Time if {Date Coded <-> Created} checked, else Original video date/time
    Modified set to Manual Date/Time if {Date Coded <-> Modified} checked, else Original Date/Time

    If changing both Encoded and Windows Created times, manually, set Encoded first then Alter Created
    --------------------------------------

    Auto Alter Encoded checked, Only {Date coded <-> Created} checked
    Encoded will be set to the Original Created Time
    Created set to Original video Created Date/Time
    Modified set to Original Video modified Date/Time

    Auto Alter Encoded checked, {Date coded <-> Modified} checked, OVERRIDES {Date coded <-> Created}
    Encoded will be set to the Original Modified Time
    Created set to Original video Created Date/Time
    Modified set to Original Video modified Date/Time
    --------------------------------------

    Auto Alter Created and/or Modified checked
    Encoded remain the Original Encoded Time
    Created set to video Encoded Date/Time, if {Date coded <-> Created} checked, Else Original Video Created
    Modified set to video Encoded Date/Time, if {Date coded <-> Modified} checked, Else Original Video Created
    --------------------------------------

    Silence Warnings eliminates Popups telling you that the file already exists as when you manually change the
    encoded and the wish to change the Created on the same files. It also stops warning that no data was found during
    Encoded to Created methods. A summary window will show this information instead.
    --------------------------------------

    UTC <-> Local makes Video UTC and the Local time zone time of your computer the same.
    THIS IS NOT A NORMAL SETTING SINCE VIDEOS ARE ALMOST ALWAYS IN UTC DATE/TIME FORMAT.
    WINDOWS CRATED/MODIFED/ACCESSED ARE ALWAYS IN LOCAL DATE TIME FORMAT.
    The only reason this is here is someone requested it even though it makes their Metadata invalid.
    --------------------------------------
    The Latest download is posted below but the new one will be posted soon. It also allows to set the language of the Video and/or Audio Track.

    Click image for larger version

Name:	main.jpg
Views:	501
Size:	98.2 KB
ID:	41701Click image for larger version

Name:	command.jpg
Views:	446
Size:	36.3 KB
ID:	41702Click image for larger version

Name:	proof.jpg
Views:	526
Size:	103.6 KB
ID:	41703
    Last edited by Budman1; 25th May 2017 at 08:53.
    Quote Quote  
  3. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    @ArieTillens,, In the mean time download the program from https://files.secureserver.net/0shb4dnzGQzyPe and set up as shown in the attached image. I tested in on mp4 Videos and it worked correctly. It will also do a folder at a time.

    Click image for larger version

Name:	ScreenHunter_1.jpg
Views:	521
Size:	257.2 KB
ID:	41704
    Last edited by Budman1; 25th May 2017 at 08:54.
    Quote Quote  
  4. Member
    Join Date
    May 2017
    Location
    Denmark
    Search PM
    Hi Budman1, awesome, thanks for the help!

    It seems like the link to the new version of the program is missing in your last post?

    Arie
    Quote Quote  
  5. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    @ArieTillens the current version has not been uploaded yet but should be available today. I edited my post above to display this correctly. The old version should work til i have tested and posted a link to the new version.
    Thanks
    Budman1
    Quote Quote  
  6. Member
    Join Date
    May 2017
    Location
    Denmark
    Search PM
    Hi Budman1, i have tried multiple times again but it won't find the right date to overwrite the wrong date. Just sake good order. If you look at the file report in my first post, I am not looking to find the first Encoded date, but the one that is below under the Video header. Could it be that the app only look at the one in the General section?
    Quote Quote  
  7. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Just so i have it right, you wish to find the encoded date in the video metadata and change the windows created date to the same correct? The program uses media info to find "ENCODED DATE = YYYY-MM-DD HH:MMD" . This should be showing in tbe lower box of the command window.

    Click image for larger version

Name:	cmd.jpg
Views:	415
Size:	26.5 KB
ID:	41716

    Setting the checkboxes is critical to cause the search and replace functions to occur in the right direction. If you use manual the checkbox for that is also necessary. other information is shown below. Can you post pictures or let me know what it says?
    Click image for larger version

Name:	minfo.jpg
Views:	400
Size:	36.5 KB
ID:	41717Click image for larger version

Name:	final.jpg
Views:	386
Size:	29.6 KB
ID:	41718

    Bear in mind ENCODED is in UTC time and the created date for windows will be off whatever your time zone is. THIS IS NORMAL If you want otherwise use manual or check UTC <--> Local checkbox. Noticed in my example created date is -6 hours behind and on the 2nd of march at 21xx because Encoded date is the on the 3rd of March at 03xx. I am in the USA Central time zone -6 hours from UTC.

    The new version is almost ready except for final test which i am doing as we speak.
    Budman1
    Last edited by Budman1; 27th May 2017 at 16:39. Reason: pictures added
    Quote Quote  
  8. Member
    Join Date
    May 2017
    Location
    Denmark
    Search PM
    Yes, that is correct. I want to find the right encoded date (2014 in the example above) and take this to overwrite the windows created date.

    In the lower left box of the command window it does not show any date in 2014, only 2017. So it seems the tool (or me) is not able to find the right date. Actually, when I try to run Mediainfo from your download directly the program doesnt open any new window. Maybe my problem is here.

    I set the checkboxes exactly as in your screenshot.

    I will await your new version to try again.
    Quote Quote  
  9. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    @ArieTillens I see the video Date/Time Metadata is different than the Header Date/Time Metadata. This would be harder to do unless a routine was written especially to change certain BYTES in a video file. MP4 data is written in 'Atoms' and the date and time is 4 bytes for encoded and 4 bytes for tagged. It is a binary representation, for all extents and purposes, to be the number of seconds since midnight 01/01/1904.

    The header Date/Time is stored inside the MVHD atom(s) and can be found with a hex editor.
    The Video and Audio is stored inside the TKHD atom(s) and can be found with a hex editor.
    There is also Date and Time stored in the MDHD atom(s) but MediaInfo does not report this Date/Time.

    So to change your date and time you would need to convert 2014-03-21 10:21:01 to seconds and search for the 4 byte offset from TKHD and input the 4 byte binary designation for Encoded, followed by the 4 Byte Tagged Binary designation. TKHD is most often stored in multiple places(2). It would most likely be a different program to do that. OR use the Manual function with the boxes set to 2014/03/21 10:21:01.
    Click image for larger version

Name:	atom.jpg
Views:	538
Size:	111.7 KB
ID:	41724
    Last edited by Budman1; 27th May 2017 at 23:07.
    Quote Quote  
  10. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    UPDATE: I stand corrected. I can set a video from the VIDEO encoded date but would need to adjust my program. I just need to have MediaInfo query from a different area. I created a video with a hex editor so the dates are different:
    Click image for larger version

Name:	MIDual.jpg
Views:	610
Size:	90.7 KB
ID:	41743

    Then I altered the Created with the regular method:
    Click image for larger version

Name:	General.jpg
Views:	405
Size:	32.2 KB
ID:	41744Click image for larger version

Name:	02created.jpg
Views:	416
Size:	33.3 KB
ID:	41745

    Then I changed the query for the Video:
    Click image for larger version

Name:	Video.jpg
Views:	423
Size:	32.3 KB
ID:	41746Click image for larger version

Name:	07created.jpg
Views:	416
Size:	32.0 KB
ID:	41747

    I guess he doesn't need the new version:
    Click image for larger version

Name:	New.jpg
Views:	476
Size:	80.5 KB
ID:	41797

    Thanks
    Budman1
    Last edited by Budman1; 2nd Jun 2017 at 22:25. Reason: Added new Version Image.
    Quote Quote  
  11. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    For anyone reading this thread, I have made numerous changes and tested as best I can with generous help from Barmaley. You can select which area to obtain the Encoded Date from, Check the setup, posting the scripts used without actually changing anything, Save your most liked settings to an INI file and more. I use the CMD Windows to change code pages and send data to. The only problem so far is Do Not Use Your Mouse or Keyboard during that activity. The Beta can be downloaded at https://files.secureserver.net/0sxRCIsdlEVFXT.

    Changing code pages and sending data to the CMD Windows allows for using Cyrillic Filenames also. This program never alters your original files but always use a copy to test in case your computer is different than mine and it causes a glitch.

    Thanks
    Budman1
    Quote Quote  
  12. Originally Posted by Budman1 View Post
    For anyone reading this thread, I have made numerous changes and tested as best I can with generous help from Barmaley. You can select which area to obtain the Encoded Date from, Check the setup, posting the scripts used without actually changing anything, Save your most liked settings to an INI file and more. I use the CMD Windows to change code pages and send data to. The only problem so far is Do Not Use Your Mouse or Keyboard during that activity. The Beta can be downloaded at https://files.secureserver.net/0sxRCIsdlEVFXT.

    Changing code pages and sending data to the CMD Windows allows for using Cyrillic Filenames also. This program never alters your original files but always use a copy to test in case your computer is different than mine and it causes a glitch.

    Thanks
    Budman1
    Thanks a lot for your wonderfull software. I was going mad uploading videos to Google Photos with their horrific system to order the videos using "Encoded Date" tag. Using your software has solved that irritating matter.

    Do you have a specific thread for your software? Could you share the link, please?

    Thanks again for your help.
    Quote Quote  
  13. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    In trying to make my program accept Cyrillic characters, it works for some, for others there appears to be a problem of noisy busses or I/O because extra characters are being dropped and/or added to the string being sent to the CLI(CMD) Window. For that reason I pulled the links and am rewriting back the way it was. If Cyrillic is needed, you can copy the script from the media Info window and copy straight to a CMD window and it should work.

    I should have a new link in a couple days.
    Thanks
    Quote Quote  



Similar Threads

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