THETA V Linux live streaming with HLS - HTTP Live Streaming sink/server

@craig I am trying to build a simple streaming testbed from Theta V to web browser using HLS protocol.
For that purpose, I uses Gstreamer’s hlssink2 to generate HLS segments from camera input as follows. (gst_viewer.c)

pipe_proc = " h264parse ! hlssink2 max-files=100 target-duration=1 playlist-length=0 location=segment_%03d.ts playlist-location=output.m3u8 

When running gst_viewer, it does produce HLS segment files (.ts) but problem occurs at the fifth segment (segment_004.ts). The size of the file segment_004.ts keeps increasing but never stops.

Do you have any idea why this problem is occurring?
For my test-bed, I connects ThetaV to a Ubuntu 20.04 PC.

1 Like

Hi @craig , I examined the fifth segment (segment_004.ts) using ffprobe and found that there is a problem with the timestamps (pts/dts) of that segment.
Then, I modified line #145 in gst_viewer.c to disable manually setting of pts value as follows.
OLD:
GST_BUFFER_PTS(buffer) = frame->sequence * s->dwFrameInterval*100;
NEW:
GST_BUFFER_PTS(buffer) = GST_CLOCK_TIME_NONE

After doing this, my test-bed is now working properly.

2 Likes

Way to go! Thanks so much for reporting back on this. I would have not been able to have figured it out. Congratulations on getting it to work!

2 Likes