video - FFmpeg HLS Segmenting start time miscalculated -


trying re-stream , record hikvision ip camera ffmpeg via hls.

so works fine, however, when trying calculate duration of entire day of record, results in mismatches between segmented ts files.

so doing in ffmpeg:

"ffmpeg", "-rtsp_transport", "tcp", "-stimeout", "3000000", "-re", "-i", stream, "-vcodec", "copy", "-acodec", "libfdk_aac", "-f", "segment", "-segment_list_type", "m3u8", "-segment_list", name, "-segment_list_size", "1", "-segment_format", "mpegts", "-segment_time", "5", segment_filename, 

and result is:

filename   cam1-1502731225-000018.ts start_time 90.128000 end_time   96.150489  filename    cam1-1502731225-000019.ts start_time  96.128000 end_time    102.150489  filename    cam1-1502731225-000020.ts start_time  102.128000 end_time    105.150489 

so each end_time of file should same start_time of next file. though not so.

have lost days find solution - far no luck! did observe, if output video mp4 file , proceed input (for same command line) - ok.

i assuming has issue pts of original rtsp url. when tried apply -filter_complex setpts=n/(16*tb) - fixed issue draws cpu resources encoding.

audio frames , video not exact same length. start , end times calculated based on whatever stream starts first, , ends last. if audio ends 20ms before video in 1 segment, must start 20ms in next.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -