[FFmpeg-devel] Compensating for mistakes of video encoder rtsp server implementations

Michael Niedermayer michael at niedermayer.cc
Tue Jun 29 21:00:35 EEST 2021


On Mon, Jun 28, 2021 at 08:37:57PM +0000, Hayden Myers wrote:
> How does one approach the problem of an encoder's incorrect implementation of the rtsp protocol?  My non-working example here is a Coretec mpeg-4 encoder.  I'm not sure the manufacturer is still in business, but they're still in use.  Using rtsp, the encoder sends no response to a setup message.  After debugging, I learned the encoder wants the client_port pair parameter, a valid item for unicast streams.  This is a multicast stream and client_port doesn't apply.
> 
> This isn't the first time I've experienced encoders not implementing the spec as written with regards to the port / client_port parameter.  The client_port parameter has shown up in the setup reply for multicast streams instead of the port parameter.  This results in a proper non matching transport in server reply error from ffmpeg.  If udp_multicast is set as the rtsp_transport, the transport is set properly.
> 
> I'd like to patch, but see the solution as dirty and likely not accepted by the masses.

for decoders we have generally done whatever is needed to workaround encoder
bugs. Now rtsp is not what i meant with "decoder" so there is less precedent
also rtsp code in ffmpeg is not as actively maintained.
But i would say the reasons why we try to support buggy encoders on the
decoder side also apply here so i would be in favor of supporting broken
"rtsp counterparties" too
Can you think of a way to add a simple regression test for this ?
because with encoder bug workarounds regression tests are very simple
without a regression test its unclear how long a workaround would stay
functional.

thx

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210629/ba4c4ec0/attachment.sig>


More information about the ffmpeg-devel mailing list