obs-outputs: Enable eRTMP Flac and Opus support#11462
obs-outputs: Enable eRTMP Flac and Opus support#11462yuriy-chumak wants to merge 1 commit intoobsproject:masterfrom
Conversation
| .encoded_video_codecs = "h264;av1", | ||
| #endif | ||
| .encoded_audio_codecs = "aac", | ||
| .encoded_audio_codecs = "aac;flac;opus", |
There was a problem hiding this comment.
This requires to update the services.json to not allow FLAC and Opus on every RTMP service.
|
Does this require OBS to be built against a patched FFmpeg to work? Or is the patch being used as a demonstration for receiving the stream? Has this patch been submitted to FFmpeg? As mentioned in the existing review, |
No
Yes, just a way to check is a PR code workable.
No.
Ok... I need to check. Will comment shortly. |
|
This pr almost works perfectly just one issue we found while testing against our RTMP Enhanced v2 impl (ScuffleCloud/scuffle#396) using https://github.com/lennartkloock/poc-rtmp-server Tested using the artifacts generated by https://github.com/TroyKomodo/obs-studio/actions/runs/13859647197/job/38784696062 This implementation is not working correctly with enhanced audio enabled.
This points to obs-studio/plugins/obs-outputs/flv-mux.c Line 231 in 1f70c3f |
|
There are many media servers which did implement flac via ertmp in the last year e.g. mediamtx and it is supported in ffmpeg without any need for additional patches. So it would nice to get this PR merged, because I really would like to offer flac on my own plattform without the need to have users build a modified OBS version. |
Description
This PR enables Flac and Opus audio codecs for the eRTMP protocol according the spec.
Note: the eRTMP backend may not accept both codecs.
Motivation and Context
Add more audio codecs to the stream.
How Has This Been Tested?
It has been tested using:
The provided FFMpeg patch makes the modified ffmpeg server accept flac and opus audio codecs inside the eRTMP stream.
Types of changes
Checklist:
Testing
The PR can be tested using a modified FFmpeg library. Modified FFmpeg accept flac and opus audio codecs inside the eRTMP stream.
The following steps are a working example of the testing pipeline.
Preparation
Configure and Run Backend (Linux)
8889.${port-number}to the port number, change the${the_folder_with_ffmpeg}to the real modified FFmpeg path).rtmp-server.sh.Configure and Run OBS Studio (any OS)
Custom...rtmp://localhost:8889/live(the port value must be a port of a backend)We must see the running logs in the backend console, and a proper status notifications in the OBS-Studio.
We must hear the proper audio with automatically runned FFplay.