Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

FFmpeg audio export fails with -22 (Invalid Argument) #22

Closed
generic-pers0n opened this issue Jan 6, 2022 · 2 comments · Fixed by #31
Closed

FFmpeg audio export fails with -22 (Invalid Argument) #22

generic-pers0n opened this issue Jan 6, 2022 · 2 comments · Fixed by #31
Assignees
Labels
bug Something isn't working

Comments

@generic-pers0n
Copy link
Member

Describe the bug
When exporting audio, avcodec_encode_audio2 fails with a return value AVERROR(EINVAL) (or -22). This indicates an invalid argument being passed to avcoded_encode_audio2().

To Reproduce
Steps to reproduce the behavior (as tested by me):

  1. Record or open (obtain) some audio
  2. Go to Export > Export Audio...
  3. Select 'Custom FFmpeg Export
  4. For the format, select 'OGG'. For the codec, select either codec available for the OGG format (either libvorbis or flac).
  5. Click 'Save'
  6. Fill in the metadata fields with any value (or leave them blank)
  7. See error

Expected behavior
The export should succeed, providing completely exported audio.

Additional information (please complete the following information):

  • OS: Pop!_OS 21.10
  • Version: Latest Saucedacity git

Additional context
This issue was discovered while reorganizing FFmpeg support in Saucedacity. It was originally thought that the reorganization caused the error, but further investigation found that this error persisted in builds without any reorganization work (i.e. before the reorganization work was done).

@generic-pers0n generic-pers0n self-assigned this Jan 6, 2022
@generic-pers0n generic-pers0n added this to the Saucedacity 1.2 milestone Jan 6, 2022
@generic-pers0n generic-pers0n added the bug Something isn't working label Apr 19, 2022
@generic-pers0n
Copy link
Member Author

Good news! FFmpeg works again in Saucedacity, after switching Saucedacity over to Audacity's lib-ffmpeg-support. Rather than keeping that as a library, however, it has been integrated into Saucedacity's core (i.e., src/ffmpeg). This issue will be closed once lib-ffmpeg-support is merged into main.

@generic-pers0n
Copy link
Member Author

Oh yeah, funny coincidence I just realized: this issue (#22) involves an error code of -22. Nice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant