Preserve file creation date when transcoding

Video files from my smart phone are in VFR, and Shotcut asks me to convert them when I add then to the playlist. This is all fine, except that the output .mov file’s creation date is the date/time it was transcoded and it loses its original date.

This is a problem because 1) I can’t sort such clips by date properly, and 2) the #localfiledate# field in the Text filter now shows the transcoded date and not the date of the video.

Is there a workaround to this, or better, a way to preserve the original date for the transcoded file?

This is a fair request. I’ll try to look into it in the next couple of weeks. Unfortunately, in the mean time, the only option is to modify the file creation date on the transcoded file by hand.

Thanks for considering this feature. I used a program called Bulk File Changer to change the date of a trancoded video and that resolves both issues for that clip. However, it seems that #localfiledate# reads the Modified date, not the Created date. I had to change the Modified date for it to make a different in the video. It might be better if that field used the file’s Created date.

Luckily my phone saves the date and time stamp as part of the filename for videos, so it was easy to choose the right date.

I considered both dates for the #localfiledate# keyword. Modified date ended up being the right answer for some reason. I think that if you copy/paste a file, it gets a new created date, but the modified date does not change - something like that anyway on Windows or Linux. I would have to experiment to create the exact scenario that was problematic with “created date”.

I have used the same tool in the past. I ended up writing a python script to transcode my files and copy the file date info to the new file:

I looked into what is needed to change Shotcut to copy the file dates and it looks straightforward. I hope to get it done in the next week.

Ah, I know exactly what you mean about the Modified Date being the correct one. For me the Created Date sometimes gets reset when restoring from a backup or syncing files over the network. Since that’s how the OS works, using the Modified date is the best solution. It’s too bad video files don’t have a good metadata standard, like Exif for photos, that would remove the need to rely on the file information.

Thanks a lot for looking into the issue and I’m glad this is something that is easy to implement.

I submitted a change to modify the file date when transcoding:

This change will be in the next release (June 2018).

1 Like

That’s awesome. Thanks!