Sunshine
Sunshine copied to clipboard
FFMPEG dependency update
Describe the bug
Hi guys I would like to update ffmpeg library, but I'm facing this issues:
- CBS is now included into ffmpeg.
- cbs.h, cbs_h264.h and cbs_h265.h aren't copied into local64/include/libavcodec directory.
- Sunshine compilation fails during linking as cbs.o, cbs_h264.o and cbs_h265.o has been statically linked with ffmpeg. It conflicts with Sunshine's cbs.
Replacing current CBS implementation by ffmpeg one is a solution, only if I can fix the first issue.
I don't know how to add parameters to media-autobuild_suite so it can pass it to ffmpeg autoconf. It seems that options are into ffmpeg's CONFIG_EXTRA variable, but we can't set them externaly. Plus I don't know if it will copy right headers file to include directory.
To Reproduce Only for development purpose, then we must use Sunshine's Workflows.
- Execute media-autobuild_suite batch file
- Create a sunshine-prebuild.zip file (see SunshineStream/Sunshine-Windows-Prebuilt workflow to replicate the process localy)
- Comment CMakeList.txt sunshine-prebuild.zip
- Copy sunshine-prebuild.zip into Sunshine's build directory
- Execute Sunshine build.
Expected behavior Sunshine build and run correctly.
If you just need to change the options for ffmpeg ./autoconfig (like --enable-d3dv11a or --enable-amf or other similar options), you just need to edit the ffmpeg_options.txt inside the Sunshine-Windows-Prebuilt folder. These options are applied automatically by media-autobuild_suite
I know, but CBS is not available from command line as an --enable-* or --disable-*, it's specified into ffmpeg autoconf. This option is into CONFIG_EXTRA variable.
CBS obj are clearly compiled and linked into ffmpeg static library, but headers aren't copied into local64/include directory.
Another solution is to copy needed cbs*.h into local64/include, but it's an ugly solution.
Ok, CBS is not intended to be exposed outside libavcodec lib. That's why there's no reference into include directory. I've managed to build a version with an up to date ffmpeg builded with SunshineStream/Sunshine-Windows-Prebuilt default parameters. @ReenigneArcher is it possible to create a new release of SunshineStream/Sunshine-Windows-Prebuilt binary ? I will create a pull request.
I currently use my version to play some games from my streaming server, but I only have an AMD graphic card. So I could only test AMD and Software encoding.
For the moment everything seems to be fine.
Let's move development discussion on this to #50
This issue is stale because it has been open for 30 days with no activity. Remove the stale label or comment, otherwise this will be closed in 5 days.
We should probably use vcpkg to handle the ffmpeg dependency. It will make it more consistent between the different OSes.
Currently they are on 4.4.1, but have an open PR to update to 5.0. https://github.com/microsoft/vcpkg/pull/23312
Unfortunately it breaks a lot of other packages so they are currently blocking the PR from being merged.
This issue is stale because it has been open for 30 days with no activity. Remove the stale label or comment, otherwise this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
This issue has been fixed and will be available in the next release.