2017-04-27 15:05 GMT+08:00 白 桦 <closezl...@outlook.com>: > hmmm, i checked ffmpeg document again > > hls_init_time seconds > > Set the initial target segment length in seconds. Default value is 0. > Segment will be cut on the next key frame after this time has passed on the > first m3u8 list. After the initial playlist is filled ffmpeg will cut > segments at duration equal to hls_time > > i think i find the problem, maybe hls_init_time is not what i want > > as you know, in order to open his video as fast as possible > i need the first segment to be a small size > > so, i just need the first segment to be 2 seconds or 5 seconds and every > segment after it can be 60 seconds (larger than the first one as the video > play has always begun) > > does ffmpeg has some options like this? > Not yet now, maybe you can try -f segment, maybe it can do that.
> > > > On 26 Apr 2017, at 7:53 AM, Steven Liu <lingjiujia...@gmail.com<mailto: > lingjiujia...@gmail.com>> wrote: > > 2017-04-14 16:46 GMT+08:00 ? ? <closezl...@outlook.com<mailto: > closezl...@outlook.com>>: > > Hi, > > I’m record a stream from ip camera with H264 video encoding & PCMA audio > encoding to m3u8 > Ffmpeg version:3.2.4 > OS:OSX > > Here is my command: > > ffmpeg -rtsp_transport tcp -i rtsp://192.168.0.40/1/h264major -vcodec > copy -acodec aac -hls_init_time 2 -hls_time 60 > -hls_list_size 0 -hls_flags +single_file+round_durations > -hls_segment_filename test.ts -t 3600 test.m3u8 > > But in the m3u8 file,every segment entry’s duration is 2 seconds > > Which part did I do wrong? > > you should not use both -hls_init_time 2 and -hls_list_size 0, > -hls_init_time 2 is enabled on first hls m3u8 window(before sequence(# > EXT-X-MEDIA-SEQUENCE) value change.) > > > Thx in advance! > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org<mailto:ffmpeg-user@ffmpeg.org> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org<mailto:ffmpeg-user@ffmpeg.org> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".