StartTimecode and Duration in HH:MM:SS:FF format for video files

Started by hippo, June 06, 2024, 09:49:36 AM

Previous topic - Next topic

hippo

Huge thanks for the fantastic tool, it's a really impressive bit of work!

I work with lots of different video formats and am hoping to use ExifTool as part of my workflow for extracting metadata about the video file. A key piece of information for the video files needed is timecode information in the format of HH:MM:SS:FF, particularly for both StartTimecode and Duration.

In all the cases I've tried I've either found:
- No time fields at all
- Duration provided but just in a `10s` style format
- Timecode field provided but in a h:mm:ss format, without frame number.
- StartTimecode field provided with correct format, but incorrect value compared to a tool like Davinci Resolve (this was seen in an R3D file).

I was wondering what the feasibility of collecting this kind of data would be for exiftool?

StarGeek

Quote from: hippo on June 06, 2024, 09:49:36 AMIn all the cases I've tried I've either found:
- No time fields at all

Exiftool only reads the metadata in the file and doesn't process the streams for the most part. If you have a file you know has a StartTimecode and exiftool doesn't find it with the command in FAQ #30, "How do I extract absolutely all metadata from a file?", then a sample to look at would be helpful in case Phil wants to look at it.

Quote- Duration provided but just in a `10s` style format

Yes, it depends upon the video type and how long the video is. Shorter videos will show up as seconds like that. You can get the total raw value in seconds with the -n (--printConv) option, which can be applied on a per tag bases by appending a hashtag to the tag name
C:\>exiftool -G1 -a -s -Duration -Duration# test.mp4
[QuickTime]     Duration                        : 12.43 s
[QuickTime]     Duration                        : 12.425

C:\>exiftool -G1 -a -s -duration -Duration# test2.mp4
[Flash]         Duration                        : 0:04:00
[Flash]         Duration                        : 240.072

Also note that exiftool doesn't read the stream to figure out the duration, and can return incorrect on some videos. See this GitHub post.

Quote- Timecode field provided but in a h:mm:ss format, without frame number.

This isn't my best area of knowledge, but it sounds like this might require more processing of the streams than exiftool does.

Quote- StartTimecode field provided with correct format, but incorrect value compared to a tool like Davinci Resolve (this was seen in an R3D file).

If you can provide a sample, Phil might be interested in trying to fix this. Unless it's a situation similar to the Duration issue above.

QuoteI was wondering what the feasibility of collecting this kind of data would be for exiftool?

In case you haven't check them out already, you might look into MediaInfo or ffprobe (part of ffmpeg), as those are more video centric than exiftool.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype