Skip to content
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

Bundle libsrt (support SRT protocol) #1619

Closed
wants to merge 156 commits into from
Closed

Conversation

JoeSchiff
Copy link
Contributor

This will solve: #1503

Notes

SRT requires GnuTLS. Is there a cleaner way to install the package without globbing?

Testing

I would like to set up a test for this, but I don't know how to start streaming a video from within pyav. I was able to create a network live stream with ffmpeg like this:
ffmpeg -i local_file.mp4 -c:v libx264 -f mpegts 'srt://127.0.0.1:40052?mode=listener&latency=2000000'

I then opened the network stream in pyav with:

path = "srt://127.0.0.1:40052?mode=caller"
container = av.open(path)

Pyav decoded the network stream and everything seemed to work.

If anyone knows how to create a network stream in pyav, I could write a test for this.

jlaine added 30 commits April 25, 2020 14:42
For some reason on OS X the .dylib is not found at runtime, try to use
CMAKE_INSTALL_RPATH_USE_LINK_PATH.
This avoids picking up homebrew's libpng on OS X which may not be built
for the target OS X version.
This avoids picking up homebrew's libintl on OS X which may not be built
for the target OS X version.
- use Windows builds from gyan.dev
- update to FFmpeg 4.3.2
- install ninja using pip
- install zlib instead of building it
- pin dav1d to version 0.9.2
- explicitly disable libxcb on Linux
cibuildwheel already sets MACOSX_DEPLOYMENT_TARGET
WyattBlue added 12 commits July 13, 2024 21:47
Implements the "mpeg4" codec that ffmpeg can already do.
We want to parse ASS/SSA, but we don't need rendering.
The old Docker environment must have changed. Moving libraries now doesn't work so
stage 1 and 2 have been combined. I also cut out unneeded/problematic libraries like freetype.
I'll see if libbluray and gnutls can be enabled again. openjpeg only implements jpeg2000, not jpeg or jpegxl,
so that's why it's removed.
@JoeSchiff JoeSchiff force-pushed the srt branch 4 times, most recently from c9a54a3 to ed063e6 Compare November 7, 2024 21:04
@JoeSchiff JoeSchiff marked this pull request as ready for review November 7, 2024 21:16
@WyattBlue WyattBlue changed the title Add support for SRT protocol Bundle libsrt (support SRT protocal) Nov 7, 2024
@WyattBlue WyattBlue changed the title Bundle libsrt (support SRT protocal) Bundle libsrt (support SRT protocol) Nov 7, 2024
@WyattBlue
Copy link
Member

It looks like PyAV already supports SRT (at least for decoding) if the user compiles libSRT in. This code installs libsrt for testing, but you don't need that right unless you have a srt protocol test.

Look at https://github.com/PyAV-Org/PyAV-ffmpeg if you want to bundle libSRT in the pypi binary wheels.

@JoeSchiff
Copy link
Contributor Author

Thanks for the feedback. I'll check it out.

Do you think an srt protocol test is necessary (or feasible)?

@WyattBlue
Copy link
Member

Thanks for the feedback. I'll check it out.

Do you think an srt protocol test is necessary (or feasible)?

Feasible? Yes.
Necessary? No, but a nice to have.

@JoeSchiff JoeSchiff marked this pull request as draft November 14, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants