GStreamer Command for streaming (Youtube)

Hello everyone,

I’m working on a GStreamer pipeline that streams an HLS playlist, which is being continuously generated with 10-second segments, to YouTube. The command works perfectly on Windows and Android, but when executed on iOS or MacBook, the stream only lasts for 15-20 seconds before stopping. Here is the command I am currently using:

“StreamingYouTubeGstParams”: “-v compositor name=comp ! video/x-raw ! queue max-size-time=200000000 max-size-buffers=10000 max-size-bytes=0 ! x264enc bitrate=1500 key-int-max=30 tune=zerolatency speed-preset=ultrafast ! queue ! flvmux name=mux ! rtmpsink location="rtmp://a.rtmp.youtube.com/live2/{2}" sync=true async=false filesrc location="path/to image" ! decodebin ! imagefreeze ! videoconvert ! comp. souphttpsrc location="https://path/to/playlist.m3u8\” ! decodebin name=dec ! audioconvert ! audioresample ! voaacenc bitrate=128000 ! queue ! mux."

Problem:

  • Windows and Android: Stream works fine, with continuous segment updates being read from the .m3u8 playlist and sent to YouTube.
  • iOS and MacBook: The stream begins, but after 15-20 seconds, it stops. The stream seems to halt after processing the first few segments.

Requirements:

I need the pipeline to continuously read and process the .m3u8 playlist as new segments are generated and send the data to YouTube without interruption, specifically ensuring smooth operation on iOS and MacOS devices.

What I’ve Tried:

  • Adjusting the queue settings for buffer management.
  • Adding sync=true and async=false to rtmpsink to prevent synchronization issues.
  • Ensuring the souphttpsrc correctly fetches the .m3u8 playlist.

Request:

I’m seeking advice on how to optimize this pipeline, especially for iOS and MacOS compatibility. Has anyone encountered similar issues with HLS and GStreamer on iOS/MacBook? Any suggestions for tweaking the pipeline to ensure continuous streaming without stopping would be greatly appreciated.

Thank you in advance for any help or insights!