Feature: Add option to unwrap MPEG-TS from RTSP#5476
Conversation
|
This feature is quite useful, the implementation needs some work. The first step is probably to move the MPEG-TS demuxer and muxer inside gortsplib. This allows to have access to raw 188-long MPEG-TS packets. These can then be fed into the MPEG-TS reader inside MediaMTX. |
|
thanks for the feedback @aler9 , Let me get to work on migrating that over |
d142f02 to
464fa1a
Compare
go.mod
Outdated
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| ) | ||
|
|
||
| replace github.com/bluenviron/gortsplib/v5 => github.com/EricHenry/gortsplib/v5 v5.0.0-20260222205204-d23437b42934 |
There was a problem hiding this comment.
I'll make sure to remove this once bluenviron/gortsplib#1007 looks good and is merged.
|
@aler9 I got rid of the separate mpegts reader after I made the changes to bluenviron/gortsplib#1007 let me know how the latest update looks and if you'd like to see any additional changes. Thanks!! |
464fa1a to
efabafa
Compare
|
updated to use the latest changes from bluenviron/gortsplib#1007 thanks for the feedback on that one! |
|
@aler9 We've been testing this extensively in production and haven't had any issues so far, are there any additional considerations to merging it? |
use the decoder from gortsplib in the demuxer
f977674 to
f321a54
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5476 +/- ##
==========================================
- Coverage 62.51% 62.51% -0.01%
==========================================
Files 202 203 +1
Lines 17131 17226 +95
==========================================
+ Hits 10709 10768 +59
- Misses 5547 5572 +25
- Partials 875 886 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I refactored a little in order to conform to standards and cover some edge cases that would have caused a panic (i.e. PAUSE + MPEG-TS demuxing). In the process we lost the ability to impose a timeout to MPEG-TS track recognition, you can readd it in a following PR if you want. This has been merged, thank you very much. |
Closes: #3811
I took the advice of the comment: #3811 (comment) to handle unwrapping of the MPEG-TS container into it's individual tracks. This feature is contained behind a configuration flag and is an opt-in only feature. This feature should not effect user's who do not need it.
Summary of changes:
rtp_mpegts_reader: Used to extract mpegts payloads from the RTP packets.mpegts_demuxer: setups up and runs the demuxing flow