# Read metadata

## Component/part description

Read metadata info from input video or audio file, minimum required.

* Card name (known as reel name)
* Timecode offset
* File name

Altho card name seems to be optional in Adobe Premiere.

This info is then added to the transcription json in autoEdit.

This info is used when making an EDL, as timecode offset, clip and card name are used to reconnect the video sequence in the video editing software of choice.

See [EDL format in appendix](/documentation/appendix/edl-format.md), as well as [EDL composer module](https://github.com/OpenNewsLabs/autoEdit_2/tree/master/lib/edl_composer)

{% embed url="<https://trello.com/c/Ev4LqgAY>" %}

## Related projects

NA

## Implementations Options considered

NA

## Current implementation

Uses `ffprobe`, through fluent-ffmpeg.

Example of [output in autoEdit transcription json](/documentation/appendix-data-structures/autoedit-transcription-json.md) of metadata info.

```javascript
"metadata": {
        "filePathName": "/Users/pietropassarelli/Downloads/Jesselyn Radack-Mobile.mp4",
        "fileName": "Jesselyn Radack-Mobile.mp4",
        "date": "2016-02-29 12:52:17",
        "reelName": "NA",
        "timecode": "NA",
        "fps": "1/50",
        "duration": 1618.16
    },
```

[see metadata reader component for more info](https://github.com/OpenNewsLabs/autoEdit_2/tree/master/lib/interactive_transcription_generator/video_metadata_reader)

## What needs refactoring

Need more clarity on how to get`fps` in `ffprobe`, what is `r_frame_rate` and why sometime it can be equal to `0/0`. Once figured that out, can refactor appropriately.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://autoedit.gitbook.io/documentation/transcriptions/transcriptions-intro/read-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
