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

关于Encoder下的encode扩展 #9

Open
zywayh opened this issue Jan 7, 2020 · 3 comments
Open

关于Encoder下的encode扩展 #9

zywayh opened this issue Jan 7, 2020 · 3 comments

Comments

@zywayh
Copy link

zywayh commented Jan 7, 2020

可否添加一个encode的重载方法,里面可以自定义传命令,或者直接暴露一个可以自定义命令的接口,我读了一遍源码,里面没有类似的方法。FFMPEGLocator里面的createExecutor和FFMPEGExecutor因为没有定义public,所以也无法使用,是否可以将这两个这个定义为public呢?这样使用起来更灵活(想将mp4转为m3u8格式,现存的方法没办法支撑这个转换)
如:
public void encode(String[] cmd) throws EncoderException {
FFMPEGExecutor ffmpeg = locator.createExecutor();
for (String s : cmd) {
ffmpeg.addArgument(s);
}
try {
ffmpeg.execute();
} catch (IOException e) {
throw new EncoderException(e);
}
}
这样可以完全自己去添加任何自定义的命令,后续的很多操作都可以实现了

@dadiyang
Copy link
Owner

dadiyang commented Jan 8, 2020

可以的,你发一个pull request吧,我合进来

@zywayh
Copy link
Author

zywayh commented Jan 16, 2020

前几天发了pull request,其中开放了几个方法和在VideoUtil里加了一个装m3u8的方法

@dadiyang
Copy link
Owner

不好意思,我最近在出差。
前些天看了一下,你的代码中,有个枚举类的用法和枚举的命名不是很直观,我再找时间review一下。你先看一下能不能再改一改,尽量实现简单易读一些,关键环节加下注释。

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