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

Support LectureMix SRT streams in worker #1422

Open
hmelder opened this issue Dec 6, 2024 · 0 comments
Open

Support LectureMix SRT streams in worker #1422

hmelder opened this issue Dec 6, 2024 · 0 comments
Labels
enhancement New feature or request priority:high

Comments

@hmelder
Copy link

hmelder commented Dec 6, 2024

LectureMix's streamd outputs three SRT streams. A camera, presentation, and combined stream. Audio is encoded into AAC-LC, 2 Channel, 48khz, CBR and video into h264 1080p30.

Here is the output when probing the stream with ffprobe:

hugo@Hugos-MacBook-Pro-2 ~ % ffprobe "srt://[fdf7:2667:aa31::c50]:7000"
ffprobe version 7.1 Copyright (c) 2007-2024 the FFmpeg developers
  built with Apple clang version 16.0.0 (clang-1600.0.26.4)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.100 / 61. 19.100
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
[matroska,webm @ 0x153e05d50] Unknown element A3 at pos. 0x1b904 with length 0x61b2 considered as invalid data. Last known good position 0x1dd, 20 unknown elements in a row
[matroska,webm @ 0x153e05d50] Seek to desired resync point failed. Seeking to earliest point available instead.
Input #0, matroska,webm, from 'srt://[fdf7:2667:aa31::c50]:7000':
  Metadata:
    encoder         : GStreamer matroskamux version 1.24.7
    creation_time   : 2024-12-06T16:47:56.284628Z
  Duration: N/A, start: 72.000000, bitrate: N/A
  Stream #0:0(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
      Metadata:
        title           : Audio
  Stream #0:1(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn (default)
      Metadata:
        title           : Video
        ENCODER         : "VA-API\ H.264\ Encoder\ in\ AMD\ Radeon\ Graphics"
hugo@Hugos-MacBook-Pro-2 ~ %

Should be just a matter of checking the URI scheme for srt and rtsp, and tuning the probing. Also, please stop re-encoding the video streams. SMP and LectureMix streams have a known codec config. Re-encoding is a waste of power, cpu-time, and increases latency dramatically.

To test this locally, I'd recommend spinning up a test server using GStreamer:

gst-launch-1.0 matroskamux name=m ! srtsink wait-for-connection=false uri="srt://127.0.0.1:7001?mode=listener" videotestsrc ! video/x-raw,width=1920,height=1080,framerate=30/1 ! x264enc tune=zerolatency bitrate=2048 ! m. audiotestsrc ! audio/x-raw,rate=48000,channels=2 ! fdkaacenc bitrate=96000 rate-control=cbr ! m.

@hmelder hmelder added the enhancement New feature or request label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:high
Projects
None yet
Development

No branches or pull requests

2 participants