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

How would you run a screen capture ffmpeg command #4

Closed
RoughIndustries opened this issue May 17, 2021 · 1 comment
Closed

How would you run a screen capture ffmpeg command #4

RoughIndustries opened this issue May 17, 2021 · 1 comment

Comments

@RoughIndustries
Copy link

RoughIndustries commented May 17, 2021

This is for doing a screen capture on a mac but it is a universal screen capture problem.

So I have this command:

ffmpeg -f avfoundation -i "2" -c:v h264 -crf 15 -vf "scale=1920:1280,fps=60,format=yuv420p" output.mp4

How would it get the avfoundation into the input stream?

I am trying to use this:

`
input := ffmpeg_go.Input(""2"", ffmpeg_go.KwArgs{"f": "avfoundation", "c:v": "h264", "crf": "15", "vf": ""scale=1920:1280,fps=60,format=yuv420p""})

output := input.Output("output.mp4")

output.Run()
`

@u2takey
Copy link
Owner

u2takey commented May 20, 2021

This is for doing a screen capture on a mac but it is a universal screen capture problem.

So I have this command:

ffmpeg -f avfoundation -i "2" -c:v h264 -crf 15 -vf "scale=1920:1280,fps=60,format=yuv420p" output.mp4

How would it get the avfoundation into the input stream?

I am trying to use this:

`
input := ffmpeg_go.Input(""2"", ffmpeg_go.KwArgs{"f": "avfoundation", "c:v": "h264", "crf": "15", "vf": ""scale=1920:1280,fps=60,format=yuv420p""})

output := input.Output("output.mp4")

output.Run()
`

your example is right, but you maybe mixed output args with input args? this works for me:

out := Input("default:none", KwArgs{"f": "avfoundation", "framerate": "30"}).
		Output("output.mp4", KwArgs{"format": "mp4"}).
		OverWriteOutput()

@u2takey u2takey closed this as completed Jun 29, 2021
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