Keeping DV files Record date metadata while converting while converting to QT movie files

I'm currently building a home video archive in FCP out of the hundreds of DV movie files I have already digitized.


The DV files are impractically large for editing purposes so I have been converting them to Quicktime files in Compressor.


The issue is I want to keep the recorded date metadata for organizational reasons but it is lost in compression. I have too many files to manually change their creation dates so preserving the pre-existing metadata on the DV files seems like the only way to go.


I also tried to add the date in the metadata annotation section but it doesn't seem to be recognizable to Final Cut (Again, is also impractical to do manually). I have also tried to compress them in MXF 525i29.97 DV, DVCPRO25 files but that failed for reasons that are probably obvious to someone who understands what an MXF file is.


Is there anyway to keep this Recorded date metadata through the compression process?


Thanks so much!

Posted on Sep 9, 2020 10:36 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 19, 2020 2:32 AM

I tested a few .dv files from my archive and this seems to work:


It might be best to rename .dv files based on their date so you can later readily see the date if you want to re-edit them:


cd exiftool to a folder that has the .dv files and use the following command to show the relevant date tags of movies (or images) in that folder (the dot at the end means "this folder"):


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all .

[System] FileModifyDate : 2011:02:26 15:19:16+02:00

[System] FileAccessDate : 2020:09:19 11:43:25+03:00

[System] FileInodeChangeDate : 2020:09:19 11:43:04+03:00

[DV] DateTimeOriginal : 2001:06:22 12:50:21


Check a few files and see if "DV:DateTimeOriginal" is the date you want (like images, .dv seems to use local time, not UTC time like many current movies, BTW). This command shows also other dates like MacOS:FileCreateDate but the instructions below assume "DV:DateTimeOriginal" is the correct date.


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all -api RequestAll=2 .

[ExifTool] Now : 2020:09:19 11:43:56+03:00

[System] FileModifyDate : 2011:02:26 15:19:16+02:00

[System] FileAccessDate : 2020:09:19 11:43:56+03:00

[System] FileInodeChangeDate : 2020:09:19 11:43:04+03:00

[MacOS] FileCreateDate : 2004:02:22 23:42:39+02:00

[MacOS] MDItemContentCreationDate : 2004:02:22 23:42:39+02:00

[MacOS] MDItemContentCreationDate_Ranking: 2004:02:22 02:00:00+02:00

[MacOS] MDItemContentModificationDate : 2011:02:26 15:19:16+02:00

[MacOS] MDItemDateAdded : 2020:09:19 11:41:20+03:00

[MacOS] MDItemDateAdded_Ranking : 2020:09:19 03:00:00+03:00

[MacOS] MDItemFSContentChangeDate : 2011:02:26 15:19:16+02:00

[MacOS] MDItemFSCreationDate : 2004:02:22 23:42:39+02:00

[MacOS] MDItemInterestingDate_Ranking : 2004:02:22 02:00:00+02:00

[DV] DateTimeOriginal : 2001:06:22 12:50:21


Make a backup of the .dv files (just in case) and put the copies in a folder and cd exiftool to that folder.


Then rename a folder full of .dv files as YYYY-MM-DD hh.mm.ss (2001-06-22 12.50.21.dv for example). The "-ext dv" switch processes only files with .dv suffix so adjust it if necessary:


exiftool '-FileName<DateTimeOriginal' -d '%Y-%m-%d %H.%M.%S%%-c.%%e' -ext dv .


If you like, you can use another filename pattern. I dislike spaces in these filenames so my default for all images and movies is YYYY-MMDD-hhmm-ss (2001-0622-1250-21.dv, for example):


exiftool '-FileName<DateTimeOriginal' -d '%Y-%m%d-%H%M-%S%%-c.%%e' -ext dv .


Then use Compressor (* next message) to convert to .mp4 (or .m4v or .mov) while preserving those filenames.


Then put all .mp4 movies to the same folder.


Then cd exiftool to that folder and set the movie dates to [Keys], [UserData], [QuickTime], [FileCreateDate] and [FileModifyDate] from the YYYY-MMDD-hhmm-ss filename for 1904-0101-0139-50 [QuickTime] 1677-0921-0152-33 [Keys] and [UserData] or later movies (the command does not add any new tags. If you want to add only [Keys] and not [UserData], then delete "-wm w" switch and [UserData] part from the third command at the end):


exiftool -api QuickTimeUTC=1 '-CreateDate<filename' '-ModifyDate<filename' '-Track*Date<filename' '-Media*Date<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -execute '-Keys:CreationDate<FileModifyDate' '-UserData:DateTimeOriginal<FileModifyDate' -common_args -m -P -overwrite_original_in_place -wm w .


(The Keys and UserData tags are not needed here but that command can be used for movies that happen to have those tags).


More info here:


https://discussions.apple.com/docs/DOC-250002750

5 replies
Question marked as Top-ranking reply

Sep 19, 2020 2:32 AM in response to Rillican

I tested a few .dv files from my archive and this seems to work:


It might be best to rename .dv files based on their date so you can later readily see the date if you want to re-edit them:


cd exiftool to a folder that has the .dv files and use the following command to show the relevant date tags of movies (or images) in that folder (the dot at the end means "this folder"):


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all .

[System] FileModifyDate : 2011:02:26 15:19:16+02:00

[System] FileAccessDate : 2020:09:19 11:43:25+03:00

[System] FileInodeChangeDate : 2020:09:19 11:43:04+03:00

[DV] DateTimeOriginal : 2001:06:22 12:50:21


Check a few files and see if "DV:DateTimeOriginal" is the date you want (like images, .dv seems to use local time, not UTC time like many current movies, BTW). This command shows also other dates like MacOS:FileCreateDate but the instructions below assume "DV:DateTimeOriginal" is the correct date.


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all -api RequestAll=2 .

[ExifTool] Now : 2020:09:19 11:43:56+03:00

[System] FileModifyDate : 2011:02:26 15:19:16+02:00

[System] FileAccessDate : 2020:09:19 11:43:56+03:00

[System] FileInodeChangeDate : 2020:09:19 11:43:04+03:00

[MacOS] FileCreateDate : 2004:02:22 23:42:39+02:00

[MacOS] MDItemContentCreationDate : 2004:02:22 23:42:39+02:00

[MacOS] MDItemContentCreationDate_Ranking: 2004:02:22 02:00:00+02:00

[MacOS] MDItemContentModificationDate : 2011:02:26 15:19:16+02:00

[MacOS] MDItemDateAdded : 2020:09:19 11:41:20+03:00

[MacOS] MDItemDateAdded_Ranking : 2020:09:19 03:00:00+03:00

[MacOS] MDItemFSContentChangeDate : 2011:02:26 15:19:16+02:00

[MacOS] MDItemFSCreationDate : 2004:02:22 23:42:39+02:00

[MacOS] MDItemInterestingDate_Ranking : 2004:02:22 02:00:00+02:00

[DV] DateTimeOriginal : 2001:06:22 12:50:21


Make a backup of the .dv files (just in case) and put the copies in a folder and cd exiftool to that folder.


Then rename a folder full of .dv files as YYYY-MM-DD hh.mm.ss (2001-06-22 12.50.21.dv for example). The "-ext dv" switch processes only files with .dv suffix so adjust it if necessary:


exiftool '-FileName<DateTimeOriginal' -d '%Y-%m-%d %H.%M.%S%%-c.%%e' -ext dv .


If you like, you can use another filename pattern. I dislike spaces in these filenames so my default for all images and movies is YYYY-MMDD-hhmm-ss (2001-0622-1250-21.dv, for example):


exiftool '-FileName<DateTimeOriginal' -d '%Y-%m%d-%H%M-%S%%-c.%%e' -ext dv .


Then use Compressor (* next message) to convert to .mp4 (or .m4v or .mov) while preserving those filenames.


Then put all .mp4 movies to the same folder.


Then cd exiftool to that folder and set the movie dates to [Keys], [UserData], [QuickTime], [FileCreateDate] and [FileModifyDate] from the YYYY-MMDD-hhmm-ss filename for 1904-0101-0139-50 [QuickTime] 1677-0921-0152-33 [Keys] and [UserData] or later movies (the command does not add any new tags. If you want to add only [Keys] and not [UserData], then delete "-wm w" switch and [UserData] part from the third command at the end):


exiftool -api QuickTimeUTC=1 '-CreateDate<filename' '-ModifyDate<filename' '-Track*Date<filename' '-Media*Date<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -execute '-Keys:CreationDate<FileModifyDate' '-UserData:DateTimeOriginal<FileModifyDate' -common_args -m -P -overwrite_original_in_place -wm w .


(The Keys and UserData tags are not needed here but that command can be used for movies that happen to have those tags).


More info here:


https://discussions.apple.com/docs/DOC-250002750

Sep 18, 2020 11:46 PM in response to Rillican

You could try to convert .dv to .mp4 and use exiftool to read the date from the .dv (I believe the date is in the metadata) and write it to the corresponding .mp4's QuickTime date tag. Or alternatively use exiftool to put the date to the .dv filenames, then convert to .mp4 and let exiftool write the .mp4 filename to QuickTime date tag.


I did a similar task a few years ago but I already had the date in the .dv filename which made the task easier.


Ask exiftool forums for details, if necessary.


See also:


https://discussions.apple.com/docs/DOC-250002750

Sep 25, 2020 11:44 AM in response to Matti Haveri

Thank so much for all the response Matti, I very much appreciate the effort you put into helping me with this.


So the good news is that the DV files are already dated and are in this format "clip-2002-01-11 19;33;39-HD 1080p" Which is great for our archives and I believe should be helpful in the metadata process.


In your Movie dates Discussion post you mention that "Graphic Converter" can edit Metadata via filename.


"To set metadata dates via filename in movies and images choose GraphicConverter > Camera menu > Set Exif Date from Filename... > Match string default: YYYY-MM-DD hh.mm.ss (or YYYY-MMDD-hhmm-ss or almost anything you prefer), Set movie dates, Use UTC, Set the file date identical to the Exif date."


Does this mean I can change the metadata in my compressed MP4 file using information found in the filename? Will the format of the filename interfere with this process because of where it says "Clip-" and "HD-1080"? Is the filename an easy thing to change in bulk?


The bad news is I know nothing about terminal and Exiftool is a complete maze for me. If the Graphic Converter is able to get the job done for me I think I can manage it if it has a navigable UI.


Lastly, I didn't really understand what you were talking about with MPEG streamclip and what its purpose was.


I really do appreciate your response. Thanks for anymore advice you might have for me.

Sep 19, 2020 2:24 AM in response to Matti Haveri

(*) I used the following MPEG Streamclip 1.9.3b8 (sadly the last version of this great app) preset as a base to batch convert my .dv files to H.264 .mp4. I use PAL (25fps, 720x576 rectangular pixel .dv, commonly 768x576 square pixel 4:3 mp4) but those MPEG Streamclip presets should pick the correct values for NTSC (29.97fps, 720x480 rectangular pixels, commonly 640x480 square pixel 4:3 mp4) as well as 16:9 square pixel mp4 (PAL 1024x576, NTSC 854x480).


MPEG Streamclip > File > Export to MPEG-4... > iTunes... > Apple TV 4:3 (SD) (or Apple TV 16:9 (SD) if you have widescreen project -- I guess you didn't have HD projects?).


Then choose "Deinterlace Video" (if you are 100% sure that there are NO interlaced clips, you might leave that setting off and deselect "Interlaced Scaling". But usually some clips are interlaced and you want to deinterlace them because otherwise you get awful "comb lines" with moving objects on a computer monitor).


I have found that preset's 5 Mbps Data Rate a good compromise between quality and file size (I recently did a test and higher bitrates only bloated the file size with practically no gain in quality).


Then just click "Make MP4". The output is H.264 with the original frame rate and audio sampling (48 kHz audio recommended although some iMovie versions erroneously set it to 32 kHz).


MPEG Streamclip has also an option for batch (List > Batch List) if you have many small files that can have the same settings.


I hope this helps.

Sep 25, 2020 1:05 PM in response to Rillican

GraphicConverter can also change the filenames in bulk but that is not necessary. The setting below seems to work with your naming scheme (I guess I could have used X as a placeholder there. exiftool via the Terminal recognized the date by default).


Below is the edited metadata by GraphicConverter 11.2.2 as shown in the Terminal by exiftool. The file's modification (and creation) time is set correctly at 19:33:39 but the important 'QuickTime:CreateDate' that Photos.app uses is off -1hour at 18:33:39 because the movie is in January and currently it is September (i.e. the DST differs). This is fixed in the latest GraphicConverter 11.2.3beta.


exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all 'clip-2002-01-11 19;33;39-HD 1080p.mp4'

[System] FileModifyDate : 2002:01:11 19:33:39+02:00

[QuickTime] CreateDate : 2002:01:11 18:33:39+02:00


Notice that QuickTime movie times should be at UTC time, not local time. The command above with the '-api QuickTimeUTC=1' switch adjusts the displayed time for the computer's current local time. The command below with '-api QuickTimeUTC=0' switch displays the UTC time:


exiftool -a -G1 -s -api QuickTimeUTC=0 -time:all 'clip-2002-01-11 19;33;39-HD 1080p.mp4'

[System] FileModifyDate : 2002:01:11 19:33:39+02:00

[QuickTime] CreateDate : 2002:01:11 16:33:39


p.s. The MPEG Streamclip part meant only that I used it to convert .dv to .mp4.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Keeping DV files Record date metadata while converting while converting to QT movie files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.