Skip to content

refactor(ffmpeg): use pyav ffmpeg instead of own version#236

Closed
mutlusun wants to merge 1 commit intokaixxx:mainfrom
mutlusun:refactor/ffmpeg
Closed

refactor(ffmpeg): use pyav ffmpeg instead of own version#236
mutlusun wants to merge 1 commit intokaixxx:mainfrom
mutlusun:refactor/ffmpeg

Conversation

@mutlusun
Copy link
Copy Markdown
Contributor

This PR introduces a new audio conversion module that uses pyav to convert audio files to the wave format. pyav bundles it's own version of ffmpeg, thus, we don't need to ship our own (outdated) version. In addition, pyav is already a dependency of faster-whisper, thus no real new dependencies are introduced.

This has the following advantage:

  • ffmpeg is automatically updated from pyav
  • The resulting release files will be smaller (around 240MB)

Tested the current changes with:

python3 noScribe.py --no-gui Audiofile_03.mp3 output.html
python3 -m noScribe --no-gui --start 00:01:00 --stop 00:02:00 Audiofile_03.mp3 output-short.html

Unfortunately, I couldn't test whether cancelling an audio file conversion works properly. Conversion was so fast, that I never managed to press fast enough "cancel". Maybe you have a long enough audio file to test that?

Maybe it's safer to merge this after the new release. This way, the changes can be tested over a longer time.

This commit introduces a new audio conversion tool that uses pyav to
convert audio files to the wave format. pyav bundles it's own version of
ffmpeg, thus, we don't need to ship our own (outdated) version. In
addition, pyav is already a dependency of faster-whisper, thus no real
new dependencies are introduced.
@mutlusun
Copy link
Copy Markdown
Contributor Author

Maybe it's best to merge #230 before, so tests can run properly.

@kaixxx
Copy link
Copy Markdown
Owner

kaixxx commented Mar 8, 2026

Hey Rudi,
this works fine and makes it much easier to keep ffmpeg up to date, thank you. At some point, we should make this switch with the noScribe Editor as well.
I have resolved the conflicts with the current code on my local machine, but I cannot push the changes to this PR because this would mean changing your branch which I don't have the rights to do. GitHub can be complicated at times... Anyhow, I've created a new branch and a new PR with these changes in place: #280
Would you mind if I close this PR and accept the new one? Your contributions (commits) would still be in the history. Or do you want to update your PR with the changes I did to make it compatible with the current codebase?

@gernophil: I've tested the code (#280) on my Mac Mini, and it works fine. But I am not sure how to test if we can really get away without Rosetta in this case. We still need Rosetta for ffmpeg in the Editor anyway. But we could switch to PyAV there too.

@gernophil
Copy link
Copy Markdown
Collaborator

I'll try that later today. Seems like by starting it using

% arch -arm64 python noscribe.py

it should not be able to use Rosetta2 even, if it's installed

@mutlusun
Copy link
Copy Markdown
Contributor Author

mutlusun commented Mar 9, 2026

Hey Rudi, this works fine and makes it much easier to keep ffmpeg up to date, thank you. At some point, we should make this switch with the noScribe Editor as well. I have resolved the conflicts with the current code on my local machine, but I cannot push the changes to this PR because this would mean changing your branch which I don't have the rights to do. GitHub can be complicated at times... Anyhow, I've created a new branch and a new PR with these changes in place: #280 Would you mind if I close this PR and accept the new one? Your contributions (commits) would still be in the history. Or do you want to update your PR with the changes I did to make it compatible with the current codebase?

Thanks for your feedback! Sorry, I thought, I had edits allowed by maintainers but not sure, maybe I forgot it. It's fine for me, if you merge #280. thanks for testing and merging! :)

@mutlusun mutlusun closed this Mar 9, 2026
@obitwrite
Copy link
Copy Markdown

We still need Rosetta for ffmpeg in the Editor anyway. But we could switch to PyAV there too.

This would be great, if the whole of noScribe on macOS is Rosetta-free. I think this would be the most user-friendly solution. With the release of macOS 27, Rosetta will also be gone from macOS. Would this be an easy addition now that the 'main app' has already switched to PyAV @kaixxx @gernophil ?

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

Successfully merging this pull request may close these issues.

4 participants