-
Notifications
You must be signed in to change notification settings - Fork 481
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
Add support for RTSP PCM/WAV and G711/WAV #56
Conversation
Added PCM RTP packet reader and added support for PCM 8 bit, 16 bit, ALAW and MULAW playback through RTSP. Change-Id: If0a187b55faa89850a159e17eae28358d6634799
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/RtpPayloadFormat.java
Outdated
Show resolved
Hide resolved
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/RtspMediaTrack.java
Outdated
Show resolved
Hide resolved
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/RtpPayloadFormat.java
Outdated
Show resolved
Hide resolved
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/RtpPayloadFormat.java
Outdated
Show resolved
Hide resolved
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/reader/RtpPCMReader.java
Outdated
Show resolved
Hide resolved
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/reader/RtpPCMReader.java
Outdated
Show resolved
Hide resolved
libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/reader/RtpPCMReader.java
Outdated
Show resolved
Hide resolved
Rename a few variable to be more relevant Add detailed java docs
Add RtpPcmReader tests and warning for out of order packets in RtpPcmReader. Change-Id: I1554fa0a944dad00248a0a41fefad958da073a21
LG w/ nits, will fix in our internal processes. |
...ies/exoplayer_rtsp/src/test/java/androidx/media3/exoplayer/rtsp/reader/RtpPcmReaderTest.java
Outdated
Show resolved
Hide resolved
Create FakeTrackOutput with deduplicateConsecutiveFormats as false Change-Id: Id3d551465a77d5148638b00ae2b164b505044ae2
Merged internally. The issue will be marked as merged automatically when we do a push. Thanks for the contribution! |
Question: how did you test the PCM streams? Especially for PCMU, they have static payload types. Did you manage to generate a dynamic payload type for PCMU? |
I tried to play this media using a local live555, and it didn't work. The cause is you are not handling static payload types. And even after I hardcoded the format ( |
This is the diff I used:
Edit: I noticed the test clip is little-endian signed PCM, I edited this and still no good. media/libraries/exoplayer_rtsp/src/main/java/androidx/media3/exoplayer/rtsp/RtpPayloadFormat.java Line 119 in f8f1a4d
|
The test stream that you have shared, I wasn't able to run it on VLC player as well. (Used live555 server) |
Maybe you have used an old version of VLC/live555? My live555 binary (mac) works with the audio file I provided. if you want to have a try I'll try your clip. That said, it's questionable to only support dynamic payload type as PCM audio streams can and are being served with static payload type. |
Re-uploading the audio file |
I am able to play the audio file on exoplayer, after applying the diff you have shared. |
Added PCM RTP packet reader and added support for PCM 8 bit,
16 bit, ALAW and MULAW playback through RTSP.
Change-Id: If0a187b55faa89850a159e17eae28358d6634799