Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata for MTS / M2TS files #102

Open
luxzg opened this issue Apr 3, 2023 · 4 comments
Open

Metadata for MTS / M2TS files #102

luxzg opened this issue Apr 3, 2023 · 4 comments
Assignees

Comments

@luxzg
Copy link

luxzg commented Apr 3, 2023

AVCHD video files used a lot by Sony and Panasonic.
File info: https://fileinfo.com/extension/mts

Doesn't contain much data in my case, but I'd love to have at least the date/time of the recording shown in the file info.

Thanks for a nice app!

@gino0631
Copy link
Owner

gino0631 commented Apr 4, 2023

@luxzg thanks for the request. Maybe you also have a sample, and could attach it to the issue?

@luxzg
Copy link
Author

luxzg commented Apr 4, 2023

Sure, file is bit larger even though it's very short so I have uploaded to wetransfer here:
link

I've also noticed that in Memories I get at least basic info, but still that requires switching apps all the time. Anyway, if it will help you can also peek at their code. Image below from Memories web page for this same file that I've put on wetransfer.
image

Edit: note that file info says "9 days ago" which is what Files app shows, but Info tab shows "Sun, Jan 8, 2012 6:07 PM" which is when it was actually recorded

Thank you for looking into this :)

@gino0631
Copy link
Owner

gino0631 commented Apr 4, 2023

Thanks for the information.

MPEG TS files do not support any metadata as such (you can check this ExifTool Forum thread) - it can only be contained in elementary audio, video etc. streams they contain. This means the support is limited to certain cases - that's why I asked for a sample.

In this case, the recording time most probably comes from H.264 video stream, as explained here. I'll try to implement a similar logic.

@gino0631 gino0631 self-assigned this Apr 4, 2023
@luxzg
Copy link
Author

luxzg commented Apr 5, 2023

Ah, interesting, I did not know that. I've read the link finally, so if it helps - camera for that sample was Panasonic TM-700 (since thread says each manufacturer does it slightly differently).

If you're also looking at the video stream to get this data, I assume you can also fetch the resolution and similar (not very important in my case, as I record 99,999% with same settings, but might be useful to someone else). Windows (File Explorer & File Properties) usually display this information for audio and video.

Thank you again, so very nice for picking this up! If I can help in any other way let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants