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

TCPAVSource crashed the core on reconnections #335

Open
baldurmen opened this issue Jul 26, 2024 · 2 comments
Open

TCPAVSource crashed the core on reconnections #335

baldurmen opened this issue Jul 26, 2024 · 2 comments

Comments

@baldurmen
Copy link
Contributor

Hello!

When using the TCPAVSource, when the machine that pushes the datastream stops and then starts pushing again, voctocore crashes:

This first part happens when the source stops sending data:

WARNING TCPAVSource[cam2]: scheduling source restart
   DEBUG TCPAVSource[cam2]: restarting source 'cam2'
   DEBUG Pipeline: element state changed to 'PAUSED' by element 'tcpsrc-cam2'
   DEBUG Pipeline: element state changed to 'READY' by element 'tcpsrc-cam2'
   DEBUG Pipeline: element state changed to 'PAUSED' by element 'demux-cam2'
   DEBUG Pipeline: element state changed to 'READY' by element 'demux-cam2'
   DEBUG Pipeline: element state changed to 'PAUSED' by element 'demux-cam2'
   DEBUG Pipeline: element state changed to 'PLAYING' by element 'demux-cam2'
   DEBUG Pipeline: element state changed to 'PAUSED' by element 'tcpsrc-cam2'
   DEBUG Pipeline: element state changed to 'PLAYING' by element 'tcpsrc-cam2'

When it starts again, this happens:

   DEBUG TCPAVSource[cam2]: demuxer added pad w/ caps: video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)30/1
   DEBUG TCPAVSource[cam2]: new demuxer-pad is a video-pad, testing against configured video-caps
Traceback (most recent call last):
  File "/usr/share/voctomix/voctocore/lib/sources/tcpavsource.py", line 137, in on_pad_added
    self.demux.link(self.queue_audio)
TypeError: Argument 1 does not allow None as a value
   DEBUG TCPAVSource[cam2]: demuxer added pad w/ caps: audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, rate=(int)48000
   DEBUG TCPAVSource[cam2]: new demuxer-pad is an audio-pad, testing against configured audio-caps
Traceback (most recent call last):
  File "/usr/share/voctomix/voctocore/lib/sources/tcpavsource.py", line 137, in on_pad_added
    self.demux.link(self.queue_audio)
TypeError: Argument 1 does not allow None as a value
 WARNING TCPAVSource[cam2]: scheduling source restart
   DEBUG Pipeline: ../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:TCPAVSource-cam2/GstTCPServerSrc:tcpsrc-cam2:
streaming stopped, reason not-linked (-1)
   ERROR Pipeline: GStreamer pipeline element 'tcpsrc-cam2' signaled an error #1: Internal data stream error.

This basically makes TCPAVSource unusable :(

We're running voctomix 2.1.0 and gstreamer 1.22.0.

@markvdb
Copy link

markvdb commented Jul 26, 2024

See also:

At FOSDEM, we are successfully playing around with voctomix 2 ingesting from tcp sources with reconnect before voctomix using the gstreamer fallbacksrc plugin. Debian packaging situation still a PITA, but a possible workaround. See also:

@stefanor
Copy link
Contributor

Our current workaround is: ffmpeg (that can die / restart) -> MPEG-TS stream -> Python Proxy that feeds incoming connections into a long-lived ffmpeg -> MKV -> Voctocore.
Eeeeeew, but it handles restarts gracefully, which is what production needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants