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

Metadata example #26

Open
fouadkada opened this issue Apr 14, 2021 · 1 comment
Open

Metadata example #26

fouadkada opened this issue Apr 14, 2021 · 1 comment

Comments

@fouadkada
Copy link

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"

@elboletaire
Copy link

Same here, plus there's stuff not considered (thus not being parsed) like the language of the streams.

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

No branches or pull requests

2 participants