<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>I'm trying to capture RTSP (H264 / AAC) stream with GStreamer and save it to HLS. The command I'm trying to use is:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>gst-launch-1.0 -v -e rtspsrc protocols=tcp  location=rtsp://${AXIS_CAMERA_ADDR}/axis-media/media.amp ! queue ! rtph264depay ! h264parse ! mpegtsmux ! hlssink location="%06d.ts" target-duration=5</div></div></blockquote><div><br></div><div>At first glance everything looks fine: *.ts files and playlist are generated. But *.ts are invalid - no player can play them (VLC, Safari, MPV). Interestingly, that the very first 000000.ts file can be played.</div><div><br></div><div>I also tried to perform same job with FFMPEG:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">ffmpeg -rtsp_flags prefer_tcp \<br>    -i rtsp://${AXIS_CAMERA_ADDR}/axis-media/media.amp \<br>    -acodec copy -vcodec copy -f ssegment \<br>    -segment_list ffmpeg.m3u8 \<br>    -segment_list_flags +live \<br>    -segment_time 5 \<div><div>    ffmpeg%06d.ts</div></div></blockquote><div><br></div><div>- and it's working as expected.</div><div><br></div><div>What is wrong with my GStreamer command? Also I noticed that GStreamer and FFMPEG produces different *.ts files headers.</div><div><br></div><div>GStreamer TS-header: 4740 003a a600 ffff ffff ffff ffff ffff</div><div>ffff ffff ffff ...</div><div><br></div><div>FFMPEG TS-header: 4740 1110 0042 f03b 0001 c100 00ff 01ff</div><div>0001 fc80 2a48 2801 0646 466d 7065 671f</div><div>5365 7373 696f 6e20 7374 7265 616d 6564</div><div>2077 6974 6820 4753 7472 6561 6d65 7251</div><div>f383 85ff ffff ffff ffff ffff ffff ffff</div><div>ffff ffff ffff ffff</div><div><br></div><div>- looks like FFMPEG produces headers with more info.</div><div><br></div><div>Any help would be appreciated.</div><div><br></div>Alexey<div>///</div></div>