Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to convert .mts files to .mp4 and retain the 'creation date' and 'modified date' metadata. I found the following post How to make Handbrake preserve capture time / creation time? that explains how to do it in one step with ffmpeg. The suggested code is

ffmpeg -i in.mp4 -i out.mp4 -map 1 -map_metadata 0 -c copy fixed.mp4

I modified the code to indicate that my input file is .mts (not .mp4).

However, this code is not working for me. The metadata of the output file contains the current date, not the date of the original file. Is this because my input file is .mts instead of .mp4? If so, what can I do to make this code work in my situation?

share|improve this question
1  
Please include the complete ffmpeg console output. –  LordNeckbeard Apr 1 '13 at 19:38
    
I don't know how to copy the console output. It is in a DOS window where I run the command line. However, I looked over the output and noticed that ffmpeg is indeed copying the creation_date tag in the metadata from the input file to the output file. The problem is that when I view the properties of the output file in Windows Explorer, the Date Modified tag shows the time of the conversion. How do I get Date Modified to equal creation_date? –  Danny DeLoach Apr 2 '13 at 6:41
    
Then we're talking about different things. The file's modification time is changed by Windows whereas the creation date metadata is written by FFmpeg. Might want to clarify your question. –  slhck Apr 2 '13 at 7:04
    
I have done a little more investigation. Yes, I now realize that I was talking about two different things. I guess some date/time info is stored as tags on the video data inside the file. Other date/time info is stored as a property of the whole file itself. I need to think through this more, so that I can ask a clear question later. Sorry for my confused question. –  Danny DeLoach Apr 2 '13 at 16:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.