-
Notifications
You must be signed in to change notification settings - Fork 34
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
Added FFmpegController class #28
Conversation
Hi @andcscott, thanks for this good start! After thinking about this more, I think the best solution is to add an FFmpegController controller;
controller.setFFmpegPath("/path/to/ffmpeg")
.setAudioCodec("aac")
// ... This would offload a lot of work from this class and help with maintenance down the road, especially if we need to do frequent changes. The main point missing in the current PR is that the controller isn’t orchestrating the actions as expected. The user shoould interface with // set the settings on controller and then
controller.extractAudio(inputVideoPath, outputAudioPath); Then you'd have a method I was also kind of thinking that the user may pass 3 structs in the ctor, and we make the structs public, but we can come back this again, as it ties with the point above. Otherwise thanks a lot for the good start, and please let me know if anything is unclear and if you have any feedback! |
Sure, it makes sense to make it modular from the start. Is this builder the same as #31 or are you thinking of a new class altogether?
Sorry, I guess I had the backwards. I had thought the user would interface with
The declaration of the structs is in the |
Hi @andcscott Yes, this would be a new builder specifically for constructing the Let's revisit the rest after you introduce this change, which should make it easier to assess how we want to move forward. Thanks a lot! |
Heya @omeryusufyagci , so I was working through this today and I'm a little paranoid that it won't adhere to the goals. Well paranoid is maybe too strong, but anyway here's what I have planned so far:
If that all looks OK I can proceed, however I'm still not sure about Sorry for the brain dump, I realize that's a lot of info so no hurry getting back to me. I mainly want to be sure I'm going in the right direction. Thanks! |
Just FYI @omeryusufyagci I didn't mean to close this, synced my fork without thinking yesterday, sorry for any confusion... future PRs will be on a dev branch |
Hi @andcscott, thanks for the update and no worries on the PR! You're right, the user will deal with So yes, the builder is for setup, and the controller is for executing commands. This decouples the setup of ffmpeg from using it. Just a remark on the Using the issue branch would be ideal indeed. Does this help? I'm happy to go over it again. |
Hi @omeryusufyagci yes that helps, thank you. The separate class for |
Closes #4
I suspect there might be some back and forth on this so we can get it exactly how you want, however a summary of changes is below. Note that I haven't added anything for ffprobe, since it might be more appropriate for the
FFmpegCommandBuilder
class?Summary:
FFmpegController
classFFmpegGlobalConfig
,FFmpegAudioConfig
, andFFmpegVideoConfig
AudioProcessor
andVideoProcessor
as well as an additional constructor that accepts the 3 structs as parameters