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

Encoding not working because of volume argument on FFmpeg command #28

Open
matthew-balzan opened this issue Sep 2, 2023 · 2 comments · May be fixed by #32
Open

Encoding not working because of volume argument on FFmpeg command #28

matthew-balzan opened this issue Sep 2, 2023 · 2 comments · May be fixed by #32

Comments

@matthew-balzan
Copy link

matthew-balzan commented Sep 2, 2023

I was always getting an empty session when encoding, without getting any errors.

I manually tried the command used to encode and got this:

Unrecognized option 'vol'.
Error splitting the argument list: Option not found

So i checked the arguments the package is sending (encode.go):

// Launch ffmpeg with a variety of different fruits and goodies mixed togheter
	args := []string{
		"-stats",
		"-i", inFile,
		"-reconnect", "1",
		"-reconnect_at_eof", "1",
		"-reconnect_streamed", "1",
		"-reconnect_delay_max", "2",
		"-map", "0:a",
		"-acodec", "libopus",
		"-f", "ogg",
		"-vbr", vbrStr,
		"-compression_level", strconv.Itoa(e.options.CompressionLevel),
		"-vol", strconv.Itoa(e.options.Volume),
		"-ar", strconv.Itoa(e.options.FrameRate),
		"-ac", strconv.Itoa(e.options.Channels),
		"-b:a", strconv.Itoa(e.options.Bitrate * 1000),
		"-application", string(e.options.Application),
		"-frame_duration", strconv.Itoa(e.options.FrameDuration),
		"-packet_loss", strconv.Itoa(e.options.PacketLoss),
		"-threads", strconv.Itoa(e.options.Threads),
		"-ss", strconv.Itoa(e.options.StartTime),
	}

I dont know if this was working for an older version of FFmpeg, or it's just a Windows problem, but vol does not exists as an argument.

Removing it correctly encodes the file.

@JadeMin
Copy link

JadeMin commented Oct 18, 2023

which ffmpeg versions are compatible?

@matthew-balzan
Copy link
Author

I linked the pull request #32 with the correct volume setting, instead of just removing the line.

which ffmpeg versions are compatible?

I assume old versions had that argument as valid, since now it doesn't exist in their documentation. I'm not sure when it changed.

Unfortunately I'm using windows for this project, so the version I'm printing is something weird, like ffmpeg version 2023-07-16-git-c541ecf0dc-full_build-www.gyan.dev.

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

Successfully merging a pull request may close this issue.

2 participants