VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 52 of 52
Thread
  1. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Just for grins, if anyone looks at my post #16, the MP4 atom calls Encoded and Tagged -> Creation and Modification just to dirty the water even farther. If you change those under MVHD as I have shown, the Encoded/Tagged in GENERAL will change. If you change the same under TKHD (ALL of them) the encoded/tagged will change in VIDEO and AUDIO.
    Quote Quote  
  2. I agree with you on all accounts. Better safe than sorry on the renaming. Times should be technically/literally correct...it's goofy that Google handles things they way they do (ignoring time zones).

    Thanks again for the utility and for helping me get it working...it's much appreciated.
    Quote Quote  
  3. Thank you so much. I'm so happy to have the timestamps fixed on my videos.
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Glad it works... It was a quick job and I thank everyone who helped debug it so it covers several request. I'll leave it up on my server because I am not sure how to upload to this site.
    Quote Quote  
  5. Could you add an option to preserve the original created/modified/accessed date?

    For being a quick job its pretty awesome.

    I'm taking a closer look at your example of finding the encoded date in the HEX. Is the date always found in the same spot? i.e, search for 6d 76 68 64 00 00 00 00 and then take the next QWORD? And modify it?

    Is it not as simple as modifying that QWORD to the correct number of seconds since Jan 1 1804? I'm wondering what the need for ffmpeg and MediaInfo is?
    Quote Quote  
  6. nm about the ffmpeg and MediaInfo. I see that you use MediaInfo to easily get the encoded date for use in copying to created instead of getting it directly from HEX. And ffmpeg is used i noticed in the .bat file that is generated to copy to video to the new directory.

    And I did play with a HEX editor and modify the QWORD. Worked perfectly. How did you learn that that QWORD contained the date? Looking forward tinkering with the HEX pragmatically. Thanks for the education.
    Quote Quote  
  7. How did you figure out that was where the encoded date was for the .mp4? Using your #16 post showing the example, I have been able to figure out how to correctly calculate the HEX value for a given date and modify a .mp4 file. So thanks for the insight there.

    What documentation did you look at to learn where the encoded date is? I checked a .mkv file hoping it was the same but it isn't.
    Quote Quote  
  8. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    How did you figure out that was where the encoded date was for the .mp4? Using your #16 post showing the example, I have been able to figure out how to correctly calculate the HEX value for a given date and modify a .mp4 file. So thanks for the insight there.

    What documentation did you look at to learn where the encoded date is? I checked a .mkv file hoping it was the same but it isn't.
    Got to the following site and it explains the location of MP4 'Atoms' and their location. I also have an HTML page that I have modified to decode 64 bit hex characters although it is fairly easy in Visual Basic to convert.

    https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html

    Each container for a video has its encoded date in a different place if it contains it at all. Media info will show this in the General are unless it is not contained at all. If it is empty, on an MP4, the hex data will contain all '00' but changing this to a valid entry will then display the encoded/tagged data.

    Click image for larger version

Name:	ScreenHunter_192 Jun. 10 23.03.jpg
Views:	361
Size:	115.1 KB
ID:	37352
    Quote Quote  
  9. Member
    Join Date
    Dec 2016
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by Budman1 View Post
    threehappypenguins, are you looking to just change the Recorded date?
    Hi Budman,
    I am uploading all my home videos to Google Photos, but
    1/ the date change there does not always work
    2/ when you upload to an album with 100 videos already in it, it is very hard to find the ones you have just uploaded, they could be anywhere, Photos is a bit of a mess in this regard.

    SO, I would like to change the date stamp so Google sorts it properly by date.
    I have noticed that the normal File properties Created Modified Accessed dates do not affect Google Photos sorting, it seems there is another Date Created one, which Adobe Bridge can see, but not edit... and I cannot seem to change that with any app...

    When I run your app on some files, they all come out as 0kb files, though the dates do seem to have changed. What am I doing wrong? Red writing says "Could not write header for file..."

    Click image for larger version

Name:	encode files.jpg
Views:	343
Size:	72.7 KB
ID:	40057

    tx
    Mark
    Last edited by fredphoesh; 27th Dec 2016 at 11:55.
    Quote Quote  
  10. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    @fredphoesh I've done a rewrite on my program and you should go to https://forum.videohelp.com/threads/373763-Tool-to-batch-rename-video-files-based-on-en...e?goto=newpost. I even have a newer version that I have yet to upload but I keep the link current there.

    Click image for larger version

Name:	Lates datetime.jpg
Views:	248
Size:	62.4 KB
ID:	40059

    I am interested in the 0 length file. Can you post the mediainfo for the original and the complete error with information before and after as to why it couldn't write the header? I would appreciate it.

    I don't know how the cloud works but I do know if you send a file even to a new drive, Windows likes to assume its a brand new file because it just showed up and set the created date, etc. as if it was just created. Could be something like that happening.

    Thanks
    Budman1
    Last edited by Budman1; 27th Dec 2016 at 14:27. Reason: New image
    Quote Quote  
  11. Member
    Join Date
    Dec 2016
    Location
    United Kingdom
    Search Comp PM
    Hi Budman,

    I don't see a download link to the new app version at that url... can you post it here please?

    Im writing to a sub folder in the same directory as the original, so I am not encoding to the cloud. The error message goes before I can copy it!! Makes it very hard to copy. I will do a long batch which will give me time to copy the first error.

    Click image for larger version

Name:	error batch change timestamp.jpg
Views:	266
Size:	52.5 KB
ID:	40060[/QUOTE]

    I also got this at the end of the batch:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: InvalidArgument=Value of '7' is not valid for 'index'.
    Parameter name: index
    at System.Windows.Forms.ListBox.ObjectCollection.get_ Item(Int32 index)
    at WindowsApplication1.Form1.SetDates()
    at WindowsApplication1.Form1.Timer1_Tick(Object sender, EventArgs e)
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndPr oc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Change Date Time Batch
    Assembly Version: 1.10.0.0
    Win32 Version: 1.10.0.0
    CodeBase: file:///D:/DOWNLOAD/browser%20downloads/1%20TO%20INSTALL/Change_Date_Time/Change%20Date%20Time%20Batch.exe
    ----------------------------------------
    Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8780 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.




    [QUOTE=Budman1;2471654]@fredphoesh I've done a rewrite on my program and you should go to https://forum.videohelp.com/threads/373763-Tool-to-batch-rename-video-files-based-on-en...e?goto=newpost. I even have a newer version that I have yet to upload but I keep the link current there.


    I am interested in the 0 length file. Can you post the mediainfo for the original and the complete error with information before and after as to why it couldn't write the header? I would appreciate it.

    I don't know how the cloud works but I do know if you send a file even to a new drive, Windows likes to assume its a brand new file because it just showed up and set the created date, etc. as if it was just created. Could be something like that happening.
    Quote Quote  
  12. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Okay the link and latest had a bug in it so I reposted at the above link so it isn't posted all over the place until it is finalized. Go to the link above and read comment 34. It should now work and I fixed a couple other problems so Change original, Change name, and manual should all work together. just be careful what you select.
    Quote Quote  
  13. Member
    Join Date
    Jul 2018
    Location
    Italia
    Search PM
    Budman1 I'm a caveman on computer but after some try with your tool I'm now fixing the date of more then 1000 clips of my childhood.
    I wonder why people like you spend so much time helping other people with no money involved. And nothing... I want to thank you, thats why i signup to this forum.
    Great job. Big !

    I kind of fall in love with your utility.. ahah tryied all the versions ahah followed the growth of this creature
    See yu
    Quote Quote  
  14. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Thank you so much for the kind words. Maybe this why we do it. It so nice to help people from knowledge many of us have gained over a lifetime. It does no good to not to give the information back to anyone who can use it. There are so many people here and other places that strive to help with free utilities and help but never get kind words for it.

    Your reply makes it all worthwhile. Thanks again and thanks for sticking with its earlier cousins that needed help and improvements.

    Working on a new utility that cuts more precisely than many and allows joining without the regular audio sync problems occurring with many tools. Probably not as sophisticated as some but a joy for me at least to cut segments without losing important frames or keeping unwanted frames.
    Quote Quote  
  15. Is this software still available?
    Quote Quote  
  16. By the way, since this thread has been “grave dug” anyway, if the correction of the files' (internal) metadata changes the files timestamps (modified date & access date stored in the filesystem's structures i.e. MFT records), which it most likely does, one way to restore those, on Windows, would be this :

    – Create an empty replication of the folder containing the files which have to be processed, with Robocopy /CREATE (it copies all the files inside but with a "0 byte" size).
    Code:
    set source="E:\TEMP1"
    set destin="E:\TEMP2"
    robocopy.exe %source% %destin% /E /B /DCOPY:T /TIMFIX /FFT /DST /XJ /R:0 /W:1 /CREATE
    
    Note : The other switches aren't mandatory here but I always set them except for specific cases :
    /E => processes subdirectories including empty ones
    /B => backup mode (I don't quite remember what the difference is between "backup mode" and "restart mode", see a detailed documentation)
    /DCOPY:T => preserves directories' timestamps (one of the rare tools on Windows allowing to do so)
    /TIMFIX => corrects timestamps for all files, even files which are ignored based on filters
    /FFT => ignores timestamps discrepancies of less than 2s, caused by the granularity of the FAT filesystem
    /DST => ignores timestamps discrepancies caused by daylight saving time
    /XJ => ignores junctions (some junctions can cause infinite loops)
    /R:0 & /W:1 => does not retry in case of failure -- default is a crazy 1 million retries with 30s of wait between retries
    – Then process the files as required.
    – Then re-apply Robocopy /CREATE, this time switching the source and destination directories.
    Code:
    set source="E:\TEMP1"
    set destin="E:\TEMP2"
    robocopy.exe %destin% %source% /E /B /DCOPY:T /TIMFIX /FFT /DST /XJ /R:0 /W:1 /CREATE
    Notes :
    It is important not to omit the /CREATE switch the second time around, otherwise it will replace the valid files by empty files. With /CREATE it only changes the timestamps. Do some tests before proceeding, and/or keep a backup.
    For this to work, the files in the source and destination directories must have the exact same name (otherwise the second command will create new empty files in the source directory instead of correcting the timestamps of the existing files), so if the metadata timestamp corrector creates new files with a prefix added to their names, this prefix has to be removed first (with any good batch renaming tool).
    Last edited by abolibibelot; 13th Aug 2020 at 20:22.
    Quote Quote  
  17. Member
    Join Date
    Apr 2021
    Location
    Netherlands
    Search PM
    Hi,
    You can also try to use MP4Workshop. It is a new software designed to edit the internal metadata of the MP4 file, and can also add timezone offset to make it align correctly with all other movies and pictures in for example GooglePhotos. It is free software, you can download from mp4workshop.com.
    It can handle single files, but in essence it is aimed at batches of files (including JPG and MOV), which is usually the case when you camera setting is wrong..
    It is free, GUI based, does NOT re-encode you video and has a preview window for the file you're working on. Ans it adds UTC and timezone offset: so no further weird effects in GooglePhotos or other programme used.

    See mp4workshop.com

    Greetings, John
    Image Attached Thumbnails Click image for larger version

Name:	Fig1.jpg
Views:	52
Size:	428.8 KB
ID:	58495  

    Quote Quote  
  18. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Since it is always preferable not to re-encode whenever possible, i will research if it possible to add a direct binary alter for changing encoded,tagged date fields.
    Quote Quote  
  19. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by JohnJackson View Post
    Hi,
    You can also try to use MP4Workshop. It is a new software designed to edit the internal metadata of the MP4 file, and can also add timezone offset to make it align correctly with all other movies and pictures in for example GooglePhotos. It is free software, you can download from mp4workshop.com.
    It can handle single files, but in essence it is aimed at batches of files (including JPG and MOV), which is usually the case when you camera setting is wrong..
    It is free, GUI based, does NOT re-encode you video and has a preview window for the file you're working on. Ans it adds UTC and timezone offset: so no further weird effects in GooglePhotos or other programme used.

    See mp4workshop.com

    Greetings, John
    Thanks for the free software.

    It works — but the interface is a mess
    — and as a consequence, even the manual page on your site is not clear enough.
    "Programmers are human-shaped machines that transform alcohol into bugs."
    Quote Quote  
  20. Member
    Join Date
    Apr 2021
    Location
    Netherlands
    Search PM
    El,
    Thanks for trying the software! Yes, I can imagine the interface is complex if you use it for the first time. One of the problems is the many possible sources of 'original time'. I think you should be able to see them in an overview so you can pick your 'source time'. When I also added the possibility to change JPG files it became even more complex...Is it this large number of columns that makes it messy? I could autohide columns that contain no data. I'm also trying to introduce checkboxes above the columns to make selection look more logical.

    Since I worked on the software, it now looks logical to me. But it's work in progress.. I'm also working on some YouTube video to add more clarity. It is difficult to make a simple interface for such a complex task...
    Can you explain what is really messy or unclear? If you have suggestions I could make changes, but I dont want to add many more tabs...

    Greetings, John
    Last edited by JohnJackson; 22nd Apr 2021 at 16:09.
    Quote Quote  
  21. Member
    Join Date
    Apr 2021
    Location
    Netherlands
    Search PM
    Hi all,

    A new version of MP4Workshop (see above) is published. There is less clutter in the GUI and has a built-in tutorial call-outs to show how to change the timestamp of a file. You can switch off the tutorial call-outs under the Help menu. See MP4Workshop.com.

    It can handle single files, but in essence it is aimed at batches of files (mp4,mov and jpg), which is usually the case when you camera setting is wrong..

    Important to note: the software adds timezone offset! Many mp4/mov files only contain a timestamp in the mvhd atom, and this is only UTC time. Files from Apple devices usually contain the Quicktime tag/key ‘com.apple.quicktime.creationdate’ and this seems to be the only key that is widely used by many softwares (like GooglePhotos) to read the time including offset (e.g. 2021-03-04 12:18:02+01:00). When not present, MP4Workshop adds this key to your video file so it can store the time correctly, including the offset. For jpg files it adds Exif GPSTime (UTC) and local time.

    It is free, GUI based, does NOT re-encode you video and has a preview window for the file you're working on. There is a tutorial on the website, and it has built-in tutorial hints for first-time use.


    Greetings, John
    Image
    [Attachment 58579 - Click to enlarge]
    Last edited by JohnJackson; 25th Apr 2021 at 19:02.
    Quote Quote  



Similar Threads

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