bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.74k stars 1.4k forks source link

read SRT not work with interlaced video #3238

Closed calanor closed 2 months ago

calanor commented 2 months ago

Which version are you using?

v1.6.0

Which operating system are you using?

Describe the issue

I am testing mediamtx to use as a SRT relay. If I use a progressive h.264 video it works fine and the srt clients correctly receive the video and audios. But if I send an interlaced video, the SRT clients cannot decode the video stream. The same happens if it is published with rtsp, rtmp or udp and the source is interlaced, it cannot be decoded with srt clients. RTSP clients correctly read the same interleaved streams.

Describe how to replicate the issue

publish: srt-live-transmit <udp h264 mpgts source> srt://localhost:10099?streamid=publish:mystream&pkt_size=1316 read : ffprobe srt://xxxxxxxx.xx:10099?streamid=read:mystream

Did you attach the server logs?

ffprobe receibed by SRT client with progressive video (work fine):

Input #0, mpegts, from 'srt://xxxxxxxx.xx:10099?streamid=read:mystream':
  Duration: N/A, start: 17.877322, bitrate: N/A
  Program 1
  Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
  Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 128 kb/s
  Stream #0:2[0x102]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 128 kb/s

ffprobe received by SRT client with interlaced video fails (observe the "none" in codec descritption):

Input #0, mpegts, from 'srt://xxxxxxxx.xx:10099?streamid=read:mystream':
  Duration: N/A, start: 657.450656, bitrate: 256 kb/s
  Program 1
  Stream #0:0[0x100]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn
  Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 128 kb/s
  Stream #0:2[0x102]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 127 kb/s

ffprobe received by RTSP client with the same interlaced video works fine:

Input #0, rtsp, from 'rtsp://xxxxxxxx.xxx:8554/mystream':
  Metadata:
    title           :
  Duration: N/A, start: -0.080000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, top first), 1920x1080, 25 fps, 25 tbr, 90k tbn
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
  Stream #0:2: Audio: aac (LC), 48000 Hz, stereo, fltp
github-actions[bot] commented 2 months ago

This issue is being automatically closed because it does not follow the issue template. Please reopen the issue and make sure to include all sections of the template.