Skip to content

Conversation

@elthariel
Copy link
Contributor

As mentioned earlier, I want to support 2 pass VP9 encoding in my app, and the process produces a logfile in the current working directory.

Could have either somehow managed to pass an absolute path to the encoder, but it would have been a bit complicated or would have broken the re-usability of presets

Or I could just chdir the spawned process.

I went for the latter. This add a bit more code that I'd have liked, but when I added the spawn opt to FFMPEG::IO methods, I thought it would be better to add the option everywhere for homogeneity of the interface.

WDYT ?

to help managing the two pass encoding logfiles
@elthariel elthariel changed the title Draft: chore: Allow to change cwd of transcoder ffmpeg chore: Allow to change cwd of transcoder ffmpeg Oct 27, 2025
@bajankristof
Copy link
Collaborator

Hi again @elthariel! Thanks for opening the PR, I'll try to take a look at it next week!

@bajankristof
Copy link
Collaborator

Okay, so taking a better look I don't think this needs to be handled on the gem level. The way you should do it is by wrapping the transcoding calls in a Dir.chdir block. That way the FFmpeg process will execute in your desired location without needing to change the gem or expose anything else other than what's strictly needed.

Do you think this solves your problem? Or is there something very specific that I don't yet see about your workflow?

@bajankristof bajankristof added question Further information is requested wontfix This will not be worked on labels Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants