-
-
Notifications
You must be signed in to change notification settings - Fork 9k
libobs,obs-ffmpeg: Add option for recording lossless audio #8289
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
Conversation
2c31ffe to
0707e86
Compare
db95485 to
02c0219
Compare
|
Crash on open settings. |
3cac02c to
7428878
Compare
I believe this was due to no default config entry for |
|
One thing that is left to be done (ignoring conflicts with #8090) is a compatibility check. Right now we have the following situation:
The following issues are worth noting:
Edit: I've listed all valid audio, video, and container combinations with this PR here: https://github.com/derrod/obs-studio/wiki/Container-Codec-Support Footnotes
|
|
Drafting until RFC 45 stuff (especially #8090) is merged so it can be rebased and adjusted to those changes (if they make it into 29.1, otherwise I'd prefer if we can get this in first). Edit: On second thought, let's leave it open in case 45-5 needs more time. |
7428878 to
661d247
Compare
|
I don't have anything to contribute except that I'm very excited about this. i've been recording audio separately to get 32-bit floating point audio from my audio interface (zoom f3), so this would simplify my recording setup pretty dramatically. thank you so much for doing the legwork on this |
f87b1b1 to
799061d
Compare
|
Updated to split out FFmpeg and PCM32 into their own commits to make them easier to skip. I'm personally not entirely sold on keeping FLAC around. Support for it in MP4 seems bad in editing software and we already have ALAC anyway. Also added a compatibility error message in case a non-supported combination of codec and container is chosen: In my testing I've found that with multiple audio tracks you can get stuck on starting the recording, but #8175 fixes that. |
|
Can you add |
tytan652
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of nitpik.
799061d to
888fca5
Compare
888fca5 to
6807009
Compare
pkviet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thought it would take more code.
6807009 to
3de1773
Compare
- Do not set sample rate (not required here, but can be 24/32 now) - Only set bit_rate for lossless codecs - Only set frame_size for codecs using a fixed one
This is useful for formats such as 32-bit float PCM which providers greater flexibility in editing by retaining information that would otherwise be clipped.
3de1773 to
1a51aad
Compare
RytoEX
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed fine at a glance.

Description
Adds support for manually selecting the recording audio encoder in the UI.
Currently adds 16, 24, and 32 bit PCM as well as 24-bit ALAC and 16-bit FLAC (their respective default bit-depths in FFmpeg's order of formats).
Screenshot (note: out of date, minor changes with RFC 45, but overall still the same UX):

#8498 adds the necessary UI to prevent users from selecting invalid container and audio codec combinations.
Motivation and Context
Lossless audio recording is a highly requested feature (e.g. ideas page posts 271, 1342, 1680, and probably many more) due to the additional flexibility in editing and avoidance of generational loss.
Additionally, PCM floating point audio allows for some additional flexibility when it comes to editing and fixing of audio in post, as clipping audio (i.e. >1.0f or <-1.0f) is retained and can be adjusted down to no longer be clipping. Aside from being able to make up for wrong recording levels in editing, this is also useful in situations where constructive interference resulted in the final output clipping while individually sources were fine (this currently happens invisibly due to the lack of a master mixer).
How Has This Been Tested?
Recorded some videos.
Types of changes
Checklist: