EXIF - Aufnahmezeitpunkt verschieben

Aktuelle Version: 12.7 (23.11.2017)
Alles zum Thema Directory Opus
Antworten
scoin
Beiträge: 42
Registriert: 8. Apr 2006 17:36
Betriebssystem: Windows 10 Pro 64bit
Produkt: aktuelle Opus 11
Version DOpus: Pro

EXIF - Aufnahmezeitpunkt verschieben

Beitrag von scoin » 8. Jan 2016 20:16

Hallo,
ich habe nach meinem letzten Urlaub festgestellt, das die Uhr in meiner Kamera mehrere Stunden verstellt war. Nun möchte ich mehre hundert Aufnahmen korrigieren. Die genaue Differenz habe ich ermittelt, ist natürlich bei allen Bildern gleich. Ich habe zwar die Metadatenanzeige schon ausprobiert, aber jedes Bild einzeln umrechnen und die neue Zeit eingeben ist doch sehr Zeitintensiv. Kann Opus das leisten?

Benutzeravatar
tbone
Berater
Beiträge: 404
Registriert: 22. Nov 2014 21:16
Betriebssystem: 7*64
Produkt: aktuelle Beta-Version
Version DOpus: Pro

Re: EXIF - Aufnahmezeitpunkt verschieben

Beitrag von tbone » 8. Jan 2016 20:24

DOpus kann, aber nur für JPGs und andere "normale" Bildformate. Wenn Du auch in RAW fotographierst, musst Du etwas härtere Geschütze auffahren. Ich verwende Exiftool.exe und diesen Knopf, weil ich auch manchmal vergesse die Uhren der Kameras zu synchronisieren/nachzustellen.

Den Pfad zu Exiftool.exe bitte noch anpassen, er zeigt hier auf "<DO Installations-Verzeichnis>\tb_tools\exiftool.exe"
Den Download-Link für Windows findest Du hier: http://www.sno.phy.queensu.ca/~phil/exiftool/

Standard Button:

Code: Alles auswählen

@filesonly 
@nodeselect 
@nofilenamequoting 
@runmode:hide

@set timespan={dlgstring|Enter timespan to shift (example adds 48mins):|AllDates+=0:48}
@sync:/home\tb_tools\exiftool.exe "-{$timespan}" "{f}"
 

scoin
Beiträge: 42
Registriert: 8. Apr 2006 17:36
Betriebssystem: Windows 10 Pro 64bit
Produkt: aktuelle Opus 11
Version DOpus: Pro

Re: EXIF - Aufnahmezeitpunkt verschieben

Beitrag von scoin » 8. Jan 2016 21:35

Das probiere ich gleich mal aus. Wenn ich das + im Abfragefenster gegen ein Minus austausche kann ich auch zurückstellen? Dann gibt es wohl auch noch andere Parameter als AllDates?

Danke schon mal!!

Benutzeravatar
tbone
Berater
Beiträge: 404
Registriert: 22. Nov 2014 21:16
Betriebssystem: 7*64
Produkt: aktuelle Beta-Version
Version DOpus: Pro

Re: EXIF - Aufnahmezeitpunkt verschieben

Beitrag von tbone » 9. Jan 2016 03:23

Ja, Exiftool hat eine ganze Latte Parameter, siehe:
>exiftool.exe -h

Die Zeit mit "-" zurückdrehen sollte gehen, ja.

Mein "EXIF" Menuknopf hat noch einige andere Einträge, u.a. um das EXIF-Datum mit dem Dateidatum abzugleichen.
Das kommt bei mir oft als zweiter Schritt, weil das File-CreationDate sonst nicht mit dem EXIF-DateTaken übereinstimmt.
Hier mal der komplette MenuKnopf, vll ist noch etwas nützlich für Dich dabei.
Falls Du DO v10 verwendest, musst Du die mit "(Script)" bezeichneten Varianten wählen (falls vorhanden).

Code: Alles auswählen

<?xml version="1.0"?>
<button backcol="none" display="both" separate="yes" textcol="none" type="menu">
	<label>exif</label>
	<tip>EXIF data handling</tip>
	<icon1>#default:importexport</icon1>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>Set File-Created from EXIF-ShootingTime</label>
		<tip>Set Created file timestamps to EXIF Shooting Time</tip>
		<icon1>#default:importexport</icon1>
		<function type="normal">
			<instruction>@filesonly </instruction>
			<instruction>@nodeselect</instruction>
			<instruction>SetAttr META createdate:datetaken</instruction>
		</function>
	</button>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>(Script) Set File-Created from EXIF-ShootingTime</label>
		<tip>Set Created file timestamps to EXIF Shooting Time</tip>
		<icon1>#default:importexport</icon1>
		<function type="normal">
			<instruction>Rename FILEINFO TO="D_{shootingtime|D#yyyy-MM-dd} T_{shootingtime|T#HH.mm.ss}" RECURSE </instruction>
			<instruction>@script vbscript</instruction>
			<instruction>Option Explicit</instruction>
			<instruction>&apos; For information on the technique used in this button see:</instruction>
			<instruction>&apos; "Abusing" Rename Scripts to do other things with file info</instruction>
			<instruction>&apos; http://resource.dopus.com/viewtopic.php?t=8034</instruction>
			<instruction>&apos; Change the path below if you haven&apos;t installed Opus to the default location:</instruction>
			<instruction>dim DOpusRTPath</instruction>
			<instruction>DOpusRTPath = "d:\bin\file\dopus\dopusrt.exe"</instruction>
			<instruction>Dim Shell</instruction>
			<instruction>Set Shell = </instruction>
			<instruction>CreateObject("WScript.Shell")</instruction>
			<instruction>Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)</instruction>
			<instruction>	Dim strInfoArray</instruction>
			<instruction>	Dim name</instruction>
			<instruction>	Dim value</instruction>
			<instruction>	Dim strDate</instruction>
			<instruction>	Dim strTime</instruction>
			<instruction>	Dim strDateTime</instruction>
			<instruction>	Dim strCommand</instruction>
			<instruction>	Dim x</instruction>
			<instruction>	&apos; The strNewName we&apos;re given should be something like "D_2007-07-15 T_15.23.59"</instruction>
			<instruction>	&apos; We split this into an array of words, e.g. "D_2007-07-15", "T_15.23.59"</instruction>
			<instruction>	strInfoArray = split(strNewName, " ")</instruction>
			<instruction>	&apos; Set strNewName to an empty string so that Opus does not rename the file.</instruction>
			<instruction>	strNewName = ""</instruction>
			<instruction>	strDate = ""</instruction>
			<instruction>	strTime = ""</instruction>
			<instruction>	&apos; Get the information we expect from the strInfoArray</instruction>
			<instruction>	if ubound(strInfoArray) > 0 then</instruction>
			<instruction>		for x = lbound(strInfoArray) to ubound(strInfoArray)</instruction>
			<instruction>			&apos; If strInfoArray(x) "D_2007-07-15" then we&apos;ll get name = "D_" and value = "2007-07-15"</instruction>
			<instruction>			name  = ucase(left(strInfoArray(x), 2))</instruction>
			<instruction>			value = right(strInfoArray(x), len(strInfoArray(x)) - 2)</instruction>
			<instruction>			select case name</instruction>
			<instruction>				case "D_"</instruction>
			<instruction>					strDate = value</instruction>
			<instruction>				case "T_"</instruction>
			<instruction>					strTime = value</instruction>
			<instruction>				case else</instruction>
			<instruction>					DOpus.OutputString strFileName & ": Unexpected info in new string argument"</instruction>
			<instruction>			end select</instruction>
			<instruction>		next</instruction>
			<instruction>	end if</instruction>
			<instruction>	if (strDate <> "" and strTime <> "" and len(strDate) = 10 and len(strTime) = 8) then</instruction>
			<instruction>		&apos; Set strDateTime to a string like "2007-07-15 18:49:35"</instruction>
			<instruction>		strDateTime = strDate & " " & replace(strTime,".",":")</instruction>
			<instruction>		&apos;DOpus.OutputString "DT = " & strDateTime</instruction>
			<instruction>		strCommand = """" & DOpusRTPath & """ /cmd SetAttr FILE=""" & strFilePath & "\" & strFileName & """ CREATED=""" & strDateTime & """"		&apos;DOpus.OutputString "CMD = " & strCommand</instruction>
			<instruction>		Shell.Run strCommand,0,true</instruction>
			<instruction>	end if</instruction>
			<instruction>End Function</instruction>
		</function>
	</button>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>Set File-Created/Modified from EXIF-ShootingTime</label>
		<tip>Set Created and Modified file timestamps to EXIF Shooting Time</tip>
		<icon1>#default:importexport</icon1>
		<function type="normal">
			<instruction>@filesonly </instruction>
			<instruction>@nodeselect</instruction>
			<instruction>SetAttr META createdate:datetaken lastmodifieddate:datetaken</instruction>
		</function>
	</button>
	<button backcol="none" display="both" label_pos="right" textcol="none">
		<label>(Script) Set File-Created/Modified from EXIF-ShootingTime</label>
		<tip>Set Created and Modified file timestamps to EXIF Shooting Time</tip>
		<icon1>#default:importexport</icon1>
		<function type="normal">
			<instruction>Rename FILEINFO TO="D_{shootingtime|D#yyyy-MM-dd} T_{shootingtime|T#HH.mm.ss}" RECURSE </instruction>
			<instruction>@script vbscript</instruction>
			<instruction>Option Explicit</instruction>
			<instruction>&apos; For information on the technique used in this button see:</instruction>
			<instruction>&apos; "Abusing" Rename Scripts to do other things with file info</instruction>
			<instruction>&apos; http://resource.dopus.com/viewtopic.php?t=8034</instruction>
			<instruction>&apos; Change the path below if you haven&apos;t installed Opus to the default location:</instruction>
			<instruction>dim DOpusRTPath</instruction>
			<instruction>DOpusRTPath = "d:\bin\file\dopus\dopusrt.exe"</instruction>
			<instruction>Dim Shell</instruction>
			<instruction>Set Shell = </instruction>
			<instruction>CreateObject("WScript.Shell")</instruction>
			<instruction>Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)</instruction>
			<instruction>	Dim strInfoArray</instruction>
			<instruction>	Dim name</instruction>
			<instruction>	Dim value</instruction>
			<instruction>	Dim strDate</instruction>
			<instruction>	Dim strTime</instruction>
			<instruction>	Dim strDateTime</instruction>
			<instruction>	Dim strCommand</instruction>
			<instruction>	Dim x</instruction>
			<instruction>	&apos; The strNewName we&apos;re given should be something like "D_2007-07-15 T_15.23.59"</instruction>
			<instruction>	&apos; We split this into an array of words, e.g. "D_2007-07-15", "T_15.23.59"</instruction>
			<instruction>	strInfoArray = split(strNewName, " ")</instruction>
			<instruction>	&apos; Set strNewName to an empty string so that Opus does not rename the file.</instruction>
			<instruction>	strNewName = ""</instruction>
			<instruction>	strDate = ""</instruction>
			<instruction>	strTime = ""</instruction>
			<instruction>	&apos; Get the information we expect from the strInfoArray</instruction>
			<instruction>	if ubound(strInfoArray) > 0 then</instruction>
			<instruction>		for x = lbound(strInfoArray) to ubound(strInfoArray)</instruction>
			<instruction>			&apos; If strInfoArray(x) "D_2007-07-15" then we&apos;ll get name = "D_" and value = "2007-07-15"</instruction>
			<instruction>			name  = ucase(left(strInfoArray(x), 2))</instruction>
			<instruction>			value = right(strInfoArray(x), len(strInfoArray(x)) - 2)</instruction>
			<instruction>			select case name</instruction>
			<instruction>				case "D_"</instruction>
			<instruction>					strDate = value</instruction>
			<instruction>				case "T_"</instruction>
			<instruction>					strTime = value</instruction>
			<instruction>				case else</instruction>
			<instruction>					DOpus.OutputString strFileName & ": Unexpected info in new string argument"</instruction>
			<instruction>			end select</instruction>
			<instruction>		next</instruction>
			<instruction>	end if</instruction>
			<instruction>	if (strDate <> "" and strTime <> "" and len(strDate) = 10 and len(strTime) = 8) then</instruction>
			<instruction>		&apos; Set strDateTime to a string like "2007-07-15 18:49:35"</instruction>
			<instruction>		strDateTime = strDate & " " & replace(strTime,".",":")</instruction>
			<instruction>		&apos;DOpus.OutputString "DT = " & strDateTime</instruction>
			<instruction>		strCommand = """" & DOpusRTPath & """ /cmd SetAttr FILE=""" & strFilePath & "\" & strFileName & """ MODIFIED=""" & strDateTime & """ CREATED=""" & strDateTime & """"</instruction>
			<instruction>		&apos;DOpus.OutputString "CMD = " & strCommand</instruction>
			<instruction>		Shell.Run strCommand,0,true</instruction>
			<instruction>	end if</instruction>
			<instruction>End Function</instruction>
		</function>
	</button>
	<button backcol="none" display="both" textcol="none">
		<label>Set EXIF-ShootingTime from File-Created</label>
		<icon1>#default:customize</icon1>
		<function type="normal">
			<instruction>@nodeselect</instruction>
			<instruction>SetAttr META datedigitized:createdate datetaken:createdate</instruction>
		</function>
	</button>
	<button backcol="none" display="both" separate="yes" textcol="none">
		<label>Set EXIF-ShootingTime from File-Modified</label>
		<icon1>#default:customize</icon1>
		<function type="normal">
			<instruction>@nodeselect</instruction>
			<instruction>SetAttr META datedigitized:modifydate datetaken:modifydate</instruction>
		</function>
	</button>
	<button backcol="none" display="both" textcol="none">
		<label>Copy EXIF to Clip (tmpfile)</label>
		<icon1>#default:clipcopy</icon1>
		<function type="batch">
			<instruction>@runmode:hide</instruction>
			<instruction>@filesonly </instruction>
			<instruction>@firstfileonly </instruction>
			<instruction>@nodeselect </instruction>
			<instruction>@nofilenamequoting </instruction>
			<instruction />
			<instruction>// o = force overwriting of existing tags</instruction>
			<instruction>// b = do not create backup of destination image</instruction>
			<instruction>copy "{filepath$}" to "%temp%" as "exifcopy_dummy.img" COPYATTR=yes COPYCREATIONTIME=yes COPYFILETIMES=yes WHENEXISTS=replace </instruction>
			<instruction>{alias|home}\tb_tools\exifcopy.exe /o /b "{filepath$}" "%temp%\exifcopy_dummy.img"</instruction>
		</function>
	</button>
	<button backcol="none" display="both" separate="yes" textcol="none">
		<label>Paste EXIF from Clip (tmpfile)</label>
		<icon1>#default:clippaste</icon1>
		<function type="normal">
			<instruction>@runmode:hide</instruction>
			<instruction>@filesonly </instruction>
			<instruction>@firstfileonly </instruction>
			<instruction>@nodeselect </instruction>
			<instruction>@nofilenamequoting </instruction>
			<instruction />
			<instruction>// o = force overwriting of existing tags</instruction>
			<instruction>// b = do not create backup of destination image</instruction>
			<instruction>LockOff</instruction>
			<instruction>{alias|home}\tb_tools\exifcopy.exe /o /b "%temp%\exifcopy_dummy.img" "{filepath$}"</instruction>
			<instruction>LockOn</instruction>
		</function>
	</button>
	<button backcol="none" display="both" textcol="none">
		<label>Copy EXIF from selected Src-Image to selected Dst-Image</label>
		<icon1>#default:copy</icon1>
		<function type="normal">
			<instruction>@runmode:hide</instruction>
			<instruction>@filesonly </instruction>
			<instruction>@firstfileonly </instruction>
			<instruction>@nodeselect </instruction>
			<instruction>@confirm </instruction>
			<instruction>// o = force overwriting of existing tags</instruction>
			<instruction>// b = do not create backup of destination image</instruction>
			<instruction>/home\tb_tools\exifcopy.exe /o /b {filepath$} {filepathdest$} </instruction>
		</function>
	</button>
	<button backcol="none" display="both" separate="yes" textcol="none">
		<label>Dump Exif-Data</label>
		<icon1>#newcommand</icon1>
		<function type="batch">
			<instruction>@filesonly </instruction>
			<instruction>@leavedoswindowopen</instruction>
			<instruction>@nodeselect </instruction>
			<instruction>/home\tb_tools\exiftool.exe -s -a -u -g1 {f}</instruction>
		</function>
	</button>
	<button backcol="none" display="both" separate="yes" textcol="none">
		<label>Shift Exif-Dates</label>
		<icon1>#setdate</icon1>
		<function type="normal">
			<instruction>@filesonly </instruction>
			<instruction>@nodeselect </instruction>
			<instruction>@nofilenamequoting </instruction>
			<instruction>@runmode:hide</instruction>
			<instruction />
			<instruction>@set timespan={dlgstring|Enter timespan to shift (example adds 48mins):|AllDates+=0:48}</instruction>
			<instruction />
			<instruction>@sync:/home\tb_tools\exiftool.exe "-{$timespan}" "{f}"</instruction>
			<instruction> </instruction>
		</function>
	</button>
</button>

scoin
Beiträge: 42
Registriert: 8. Apr 2006 17:36
Betriebssystem: Windows 10 Pro 64bit
Produkt: aktuelle Opus 11
Version DOpus: Pro

Re: EXIF - Aufnahmezeitpunkt verschieben

Beitrag von scoin » 9. Jan 2016 17:13

Hallo tbone,
klappt wunderbar mit dem Verschieben der Zeit. Mir ist aber aufgefallen das die Schalter

(Script) Set File-Created from EXIF-ShootingTime
(Script) Set File-Created/Modified from EXIF-ShootingTime
- ich benutze Opus 10

nicht wie erwartet funktionieren: Diese Befehle bennen die Datei um und zwar von Bild.JPG in "D_2015-12-20 T_00.33.43" (das ist der Aufnahmezeitpunkte, die Endung geht verloren). Ich hatte eher erwartet das diese Befehle das Dateierstellungs/Geändert - Attribut der Datei anpassen anhand des (nun neuen) Aufnahmezeitpunktes in der Exif. Hab ich das was verkehrt gedacht :?

Viele Grüße

Antworten

Wer ist online?

Mitglieder in diesem Forum: rven und 3 Gäste