My Camera wasnt set up correctly and time was on 2000 Jan 01. How can i offset each file and have the time stored correctly on the video files timestamps? So lets say i calculate the time diference and i find its 26 years + some months + some day etc. How do i go about adding this differential to each file with one click
+ Reply to Thread
Results 1 to 10 of 10
-
-
I did a search for this & exiftool & ffmpeg were suggested.
I'm not sure if they can be used as batch for this.
It also depends on which type timestamp.
The ones that come up in Windows properties ?
Or burned in visible timestamps on the video itself.
I do not know a program that can do this with the second kind of timestamps. -
If you want to change both use ffmpeg first.
If you want to change the metadata that MediaInfo detects with ffmpeg then:
I'm not good with script to do batch files but with this ffmpeg code you or someone should be able to.Code:ffmpeg -i input.mp4 -c copy -metadata creation_time=2012-12-17T21:30:00Z output.mp4
This tool should do what you want:
https://www.nirsoft.net/utils/bulk_file_changer.html
The above program is supposed to do batch or bulk but I only tested with one video file.Last edited by cholla; 21st Oct 2026 at 18:05.
-
exiftool can do the whole batch with a fixed offset in one command, so you don't need to set each file's date by hand. The shift syntax is "+=Y:M
h:m
". For example, to add 26 years, 3 months and 14 days to every MP4/MOV in a folder:
exiftool -api QuickTimeUTC "-QuickTime:CreateDate+=26:3:14 0:0:0" "-QuickTime:ModifyDate+=26:3:14 0:0:0" "-QuickTime:TrackCreateDate+=26:3:14 0:0:0" "-QuickTime:TrackModifyDate+=26:3:14 0:0:0" "-QuickTime:MediaCreateDate+=26:3:14 0:0:0" "-QuickTime:MediaModifyDate+=26:3:14 0:0:0" -ext mp4 -ext mov "D:\Videos\Camera"
Then copy the corrected date into the Windows file dates, which is what Explorer's "Date created" and "Date modified" columns show:
exiftool -api QuickTimeUTC "-FileCreateDate<QuickTime:CreateDate" "-FileModifyDate<QuickTime:CreateDate" -ext mp4 -ext mov "D:\Videos\Camera"
A few things to watch:
- Work out the exact offset from one clip whose real date and time you know, and put the hours and minutes in too if they're off.
- QuickTime dates are supposed to be stored in UTC. -api QuickTimeUTC makes exiftool convert to your local time. If the result is off by your time-zone offset, run it again without that option.
- exiftool keeps a backup of each file as *_original. Check a few clips first, then delete the backups or add -overwrite_original next time.
- If the camera wrote AVCHD .MTS files, exiftool can't write those. Remux them to MP4 first, or just fix the file dates with Bulk File Changer as cholla suggested. -
I tried fred_abila method & it works for the most part.
It did not change the Media Created date in Windows\Properties\Details.
It did not change the Tagged date in MediaInfo.
Unless all the video files have the same timestamps then the calculation will need to be done for each file individually.
I figured a way to batch change the dates in MediaInfo with ffmpeg.
You need to do this first.
1. Place video files in their own folder & copy ffmpeg.exe into this folder.
2. Create another new folder & name it.
Example to show how the code is done:Code:for %f in (*.mp4) do ffmpeg -i "%f" -c copy -metadata creation_time=year-month-dateT0hour:minutes:secondsZ "path to new folder\%f"
Then add the files in the "new folder" to BulkFileChanger.Code:for %f in (*.mp4) do ffmpeg -i "%f" -c copy -metadata creation_time=2026-10-22T04:08:00Z "C:\Users\USER\Desktop\TEST\1\%f"
It does batch to the files added.
EDIT pulldown/Select All
Actions pulldown/ Change Time/Attributes
Set the times you want.
Uncheck: Time is specified in GMT & Date/time sequence mode
Date/time sequence mode was already unchecked. I tried it checked & could not tell the difference. -
This is a test that I, sort of, have to sneak up on.
Set mediainfo to reflect the path yo your copy of MediaInfoCLI.exe
Change the video name to one of yours for testing.
get_dates- V01.cmd
Are any of the dates in test01.txt what you want? If so, which parameter(s) are they? Maybe post the content test01.txtCode:@echo off set mediainfo=C:\VidAud\MediaInfoCLI\MediaInfo.exe if exist test01.txt del /q test01.txt set all_dates=Recorded_Date Encoded_Date Tagged_Date Written_Date Mastered_Date File_Created_Date File_Created_Date_Local File_Modified_Date File_Modified_Date_Local Original Released_Date for %%a in (%all_dates%) do call :process1 "%%a" test01.txt Exit :process1 set param=%~1 echo %~1 >> "test01.txt" "%mediainfo%" "--Output=General;%%%~1%%" "My Best Video.mkv" >> "test01.txt"
Last edited by pcspeak; 22nd Oct 2026 at 20:58.
-
@ pcspeak,
I tried the batch file you posted.
All I get is a quick run & then the command prompt disappears.
No test01.txt file is created.
I changed the path for mediainfo.exe to my location & named one of my files in place of "My Best Video.mkv".
I do not know where it went wrong but no text file was created. -
Interesting. I copied the code from my post, ran it, and got a test01.txt file.
Code:Recorded_Date Encoded_Date Tagged_Date Written_Date Mastered_Date File_Created_Date 2025-07-25 19:50:34.617 UTC File_Created_Date_Local 2025-07-26 05:50:34.617 File_Modified_Date 2018-06-26 05:31:44.000 UTC File_Modified_Date_Local 2018-06-26 15:31:44.000 Original Released_Date
Last edited by pcspeak; 23rd Oct 2026 at 14:42.
-
If therock003 used any of the information posted would you post what you used & if it worked.
@ pcspeak,
I still can not get your code to work.
Using the method I posted in post #6 first on the .mov file.
It did lead me to try this: ( It is a command instead of a script batch file.)
This is the test01.txt file it created: (it is long & I used an early date. The camera in the text was not even made then.)Code:mediainfo --full "C:\Users\USER\Desktop\EDIT\MediaInfo_CLI\1\Test1.MOV" > "C:\Users\USER\Desktop\EDIT\MediaInfo_CLI\test.txt"
This is the video clip.Code:General Count : 359 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Count of video streams : 1 Count of audio streams : 1 Video_Format_List : AVC Video_Format_WithHint_List : AVC Codecs Video : AVC Video_Language_List : English Audio_Format_List : PCM Audio_Format_WithHint_List : PCM Audio codecs : PCM Audio_Language_List : English Audio_Channels_Total : 2 Complete name : C:\Users\USER\Desktop\EDIT\MediaInfo_CLI\1\Test1.MOV Folder name : C:\Users\USER\Desktop\EDIT\MediaInfo_CLI\1 File name extension : Test1.MOV File name : Test1 File extension : MOV Format : MPEG-4 Format : MPEG-4 Format/Extensions usually used : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v Commercial name : MPEG-4 Format profile : QuickTime Internet media type : video/mp4 Codec ID : qt Codec ID : qt 0000.02 (qt ) Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html CodecID_Version : 0000.02 CodecID_Compatible : qt File size : 80737977 File size : 77.0 MiB File size : 77 MiB File size : 77 MiB File size : 77.0 MiB File size : 77.00 MiB Duration : 17000 Duration : 17 s 0 ms Duration : 17 s 0 ms Duration : 17 s 0 ms Duration : 00:00:17.000 Duration : 00:00:17:00 Duration : 00:00:17.000 (00:00:17:00) Overall bit rate : 37994342 Overall bit rate : 38.0 Mb/s Frame rate : 24.000 Frame rate : 24.000 FPS Frame count : 408 Stream size : 7369 Stream size : 7.20 KiB (0%) Stream size : 7 KiB Stream size : 7.2 KiB Stream size : 7.20 KiB Stream size : 7.196 KiB Stream size : 7.20 KiB (0%) Proportion of this stream : 0.00009 HeaderSize : 28 DataSize : 80730616 FooterSize : 7333 IsStreamable : No Title, more info : FUJIFILM DIGITAL CAMERA FinePix XP140 XP141 XP145 Movie_More : FUJIFILM DIGITAL CAMERA FinePix XP140 XP141 XP145 Encoded date : 1970-10-22 04:08:00 UTC Tagged date : 1970-10-22 04:08:00 UTC File creation date : 1970-10-22 21:08:00.000 UTC File creation date (local) : 1970-10-22 16:08:00.000 File last modification date : 1970-10-22 21:08:00.000 UTC File last modification date (local) : 1970-10-22 16:08:00.000 Writing application : Lavf62.12.102 Writing application : Lavf62.12.102 Comment : FUJIFILM DIGITAL CAMERA FinePix XP140 XP141 XP145 Video Count : 399 Count of stream of this kind : 1 Kind of stream : Video Kind of stream : Video Stream identifier : 0 StreamOrder : 0 ID : 1 ID : 1 Format : AVC Format : AVC Format/Info : Advanced Video Codec Format/Url : http://developers.videolan.org/x264.html Commercial name : AVC Format profile : Constrained Baseline@L4.1 Format settings : 2 Ref Frames Format settings, CABAC : No Format settings, CABAC : No Format settings, Reference frames : 2 Format settings, Reference frames : 2 frames Format settings, GOP : M=1, N=12 Internet media type : video/H264 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 17000 Duration : 17 s 0 ms Duration : 17 s 0 ms Duration : 17 s 0 ms Duration : 00:00:17.000 Duration : 00:00:17:00 Duration : 00:00:17.000 (00:00:17:00) Bit rate : 36454874 Bit rate : 36.5 Mb/s Width : 1920 Width : 1 920 pixels Height : 1080 Height : 1 080 pixels Stored_Height : 1088 Sampled_Width : 1920 Sampled_Height : 1080 Pixel aspect ratio : 1.000 Display aspect ratio : 1.778 Display aspect ratio : 16:9 Rotation : 0.000 Frame rate mode : CFR Frame rate mode : Constant Frame rate : 24.000 Frame rate : 24.000 FPS FrameRate_Num : 24 FrameRate_Den : 1 Original frame rate : 29.970 Original frame rate : 29.970 (30000/1001) FPS FrameRate_Original_Num : 30000 FrameRate_Original_Den : 1001 Frame count : 408 Color space : YUV Chroma subsampling : 4:2:0 Chroma subsampling : 4:2:0 Bit depth : 8 Bit depth : 8 bits Scan type : Progressive Scan type : Progressive Bits/(Pixel*Frame) : 0.733 Stream size : 77466608 Stream size : 73.9 MiB (96%) Stream size : 74 MiB Stream size : 74 MiB Stream size : 73.9 MiB Stream size : 73.88 MiB Stream size : 73.9 MiB (96%) Proportion of this stream : 0.95948 Writing library : AVC Coding Writing library : AVC Coding Language : en Language : English Language : English Language : en Language : eng Language : en Encoded date : 1970-10-22 04:08:00 UTC Tagged date : 1970-10-22 04:08:00 UTC colour_description_present : Yes colour_description_present_Source : Container / Stream Color range : Full colour_range_Source : Stream Color primaries : BT.601 NTSC colour_primaries_Source : Container / Stream Transfer characteristics : BT.709 transfer_characteristics_Source : Container / Stream Matrix coefficients : BT.601 matrix_coefficients_Source : Container / Stream Codec configuration box : avcC Audio Count : 285 Count of stream of this kind : 1 Kind of stream : Audio Kind of stream : Audio Stream identifier : 0 StreamOrder : 1 ID : 2 ID : 2 Format : PCM Format : PCM Commercial name : PCM Format settings : Little / Signed Format settings, Endianness : Little Format settings, Sign : Signed Codec ID : sowt Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html Duration : 17000 Duration : 17 s 0 ms Duration : 17 s 0 ms Duration : 17 s 0 ms Duration : 00:00:17.000 Duration : 00:00:17.000 Bit rate mode : CBR Bit rate mode : Constant Bit rate : 1536000 Bit rate : 1 536 kb/s Channel(s) : 2 Channel(s) : 2 channels Channel positions : Front: L R Channel layout : L R Sampling rate : 48000 Sampling rate : 48.0 kHz Samples count : 816000 Bit depth : 16 Bit depth : 16 bits Stream size : 3264000 Stream size : 3.11 MiB (4%) Stream size : 3 MiB Stream size : 3.1 MiB Stream size : 3.11 MiB Stream size : 3.113 MiB Stream size : 3.11 MiB (4%) Proportion of this stream : 0.04043 Language : en Language : English Language : English Language : en Language : eng Language : en Default : Yes Default : Yes Alternate group : 1 Alternate group : 1 Encoded date : 1970-10-22 04:08:00 UTC Tagged date : 1970-10-22 04:08:00 UTC
Uploading & then downloading changed these in the test01.txt file .
Regular MediaInfo still shows only 1970-10-22 04:08:00 UTCCode:File creation date : 2026-10-24 16:20:51.250 UTC File creation date (local) : 2026-10-24 11:20:51.250 File last modification date : 2026-10-24 16:20:51.684 UTC File last modification date (local) : 2026-10-24 11:20:51.684
Windows/Properties shows all with the Current date. So the file would need to have BulkFileChanger used again.
Even before the upload & download as soon as opened with Windows/Properties the "Accessed" changed to the current date.Last edited by cholla; 24th Oct 2026 at 12:34.
Similar Threads
-
.mp4 files with different metadata
By awbowden in forum Newbie / General discussionsReplies: 6Last Post: 28th Feb 2025, 09:35 -
How do I get split video files to be renamed based on time length?
By Dolphine in forum Newbie / General discussionsReplies: 22Last Post: 6th Mar 2024, 13:57 -
Metadata for MKV files does not appear in Windows Explorer
By naoto89 in forum Software PlayingReplies: 6Last Post: 27th Oct 2023, 17:12 -
YouTube Channel Bulk Video Download
By takistexas in forum Video Streaming DownloadingReplies: 2Last Post: 13th Aug 2023, 09:21 -
Edit Metadata tag to add "maximum bit rate" for MKV file
By kalemvar1 in forum Video ConversionReplies: 2Last Post: 14th Feb 2023, 18:12



Quote