Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Metadata example #26

@fouadkada

Description

@fouadkada

Is it possible to have a working example on how to use metadata, especially the duration.
While testing this module, I get an empty string for duration.

	transcoder := ffmpeg.New(ffmpegConf).Input(in)

	metadata, err := transcoder.GetMetadata()
	if err != nil {
		return err
	}
	duration := metadata.GetFormat().GetDuration()
	fmt.Println(duration)

	_, err = transcoder.
		Output(out).
		WithOptions(opts).
		Start(opts)
	 
        if err != nil {
		return err
	}

why is the duration an empty string? and how to fix it?

FWIW the input parameter is a file path something like "/tmp/jfkldflas.webm"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions