Skip to content

Add libswresample to FFmpeg source build #560

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

Merged
merged 3 commits into from
Mar 14, 2025

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Mar 14, 2025

Similar to #219, but for libswresample which we'll use to resample audio and convert audio formats.

I took the liberty of pushing those builds to S3 already, and they work as expected as can be seen in #562 and #556

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 14, 2025
elif [[ ${major_ver} == 6 ]]; then
avutil=libavutil.58
avcodec=libavcodec.60
avformat=libavformat.60
avdevice=libavdevice.60
avfilter=libavfilter.9
swscale=libswscale.7
swresample=libswresample.4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, it's version 4 twice in a row, this isn't a typo (logs were previously failing)!

-id @rpath/${swresample}.dylib \
${prefix}/lib/${swresample}.dylib
${otool} -l ${prefix}/lib/${swresample}.dylib | grep -B2 ${prefix}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only a dependency on avutil:

~/dev/torchcodec (add_swresample*) » ldd $CONDA_PREFIX/lib/libswresample.so | grep av                                                                              nicolashug@nicolashug-fedora-PF2MMKSN
	libavutil.so.58 => /home/nicolashug/.miniconda3/envs/codec/lib/./libavutil.so.58 (0x00007f2924800000)

I don't have access to a mac so I cannot provide the output of otool on the actual dylib as requested on #219 (comment), but that should be fine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Mac wheel builds work on CI, we should be good.

@NicolasHug NicolasHug mentioned this pull request Mar 14, 2025
@NicolasHug NicolasHug merged commit aba6a05 into pytorch:main Mar 14, 2025
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants