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

Change vcodec before -i #625

Closed
EliasDeVos opened this issue Jan 29, 2019 · 3 comments
Closed

Change vcodec before -i #625

EliasDeVos opened this issue Jan 29, 2019 · 3 comments
Milestone

Comments

@EliasDeVos
Copy link

EliasDeVos commented Jan 29, 2019

Q A
Bug? yes
New Feature? no
Version Used 0.9.5
FFmpeg Version FFmpeg and version
OS mac os mojave

Actual Behavior

Right now it is not possible to change a video codec before opening a file

Expected Behavior

For my use case i need to get the alpha layer of a webm file. for this i need to add this before the file gets opend: -vcodec libvpx-vp9

Steps to Reproduce

All the time

Possible Solutions

So right now in 0.9.5 (and also in master) you can only apply filters after the -y -i {path} option
see here and here

but for me if i execute this ffmpeg -i mov_ffmpeg.webm -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -vf “split[a][b];[a]pad=iw:ih*2[src];[b]alphaextract[filt];[src][filt]overlay=0:h” test.mp4 without -vcodec libvpx-vp9 before the -i throws an error (because my webm's are vp9 and not vp8.

Any suggestions on this ? or maybe i can create a pull request for this if you want this fixed ?
or you don't see this as an issue ? let me know

@jens1o
Copy link
Member

jens1o commented Feb 6, 2019

I'm sorry for the late reply, I was disconnected from the Internet, because my new ISP wasn't able to set-up my connection properly.

I actually like this idea. This is also already (partly) implemented in the upcoming version branch. I want to make it possible to insert custom filters at truly any location through filters(#464). This would also fix your problem. Let us keep it open still. :)

@jens1o jens1o added this to the 1.x milestone Feb 6, 2019
@throttlehead
Copy link

throttlehead commented Feb 14, 2019

I actually like this idea. This is also already (partly) implemented in the upcoming version branch. I want to make it possible to insert custom filters at truly any location through filters(#464). This would also fix your problem. Let us keep it open still. :)

The library definitely needs this option!!! I'm using opus pretty heavily in my application and need to be able to set '-acodec libopus' in the ffmpeg command to properly transcode to AAC with fewer audio issues.

After digging through the code I was thinking the easiest way to implement would be to a '->setInitialParams()' method that would be used when forming the base command with '->basePartOfCommand()'.

For now I'm going to sideline using the library for this and just running custom ffmpeg commands but please consider this feature!

@Romain
Copy link
Member

Romain commented Mar 2, 2021

Solved with PR #703

@Romain Romain closed this as completed Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants