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

Allow passing ffmpeg options #124

Open
TatriX opened this issue Dec 26, 2021 · 1 comment
Open

Allow passing ffmpeg options #124

TatriX opened this issue Dec 26, 2021 · 1 comment

Comments

@TatriX
Copy link

TatriX commented Dec 26, 2021

Hi! The tool works great, thank you!

I wanted to change default audio stream so I had to patch source code and rebuild:

func (a *Application) serveLiveStreaming(w http.ResponseWriter, r *http.Request, filename string) {
	cmd := exec.Command(
		"ffmpeg",
		"-re", // encode at 1x playback speed, to not burn the CPU
		"-i", filename,
		"-vcodec", "h264",
		"-acodec", "aac",
		"-ac", "2", // chromecasts don't support more than two audio channels
/**/		"-map", "0:v", // Select video
/**/		"-map", "0:2", // Select second stream with specific audio track
		"-f", "mp4",
		"-movflags", "frag_keyframe+faststart",
		"-strict", "-experimental",
		"pipe:1",
	)

It would be super cool if one could pass something like --audio-track "title" to select a specific audio track.
Otherwise ability to pass custom ffmpeg flags would solve that as well. For example castnow allows for --ffmpeg-<option> <arg>.

Thank you!

@vishen
Copy link
Owner

vishen commented Dec 26, 2021

This would be quite a cool and useful feature!

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

No branches or pull requests

2 participants