Dne 14.2.2017 v 04:59 Steven Liu napsal(a):
2017-02-13 21:15 GMT+08:00 Miroslav Slugeň <thunde...@email.cz>:

This patch will fix cutting hls segments into exactly same length. Because
it will intialize only on first ref_packet, which is video frame, not audio
frame (old behavior)

Now it should be possible to create segments at exactly same length if we
use new -force_key_frames hls:time_in_seconds parameter.

This is required to support adaptive HLS.

This patch was splitted to two parts, this is first independent part

--
Miroslav Slugeň












_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Patch can compile passed, but i cannot reproduce the problem before your
patch, can you send a reproduce step and test file?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
I can provide you with sample. But this explanation should be enough:

When you use -copyts for long time audio/video sync when transcoding from MPEGTS stream, audio comes always sooner than video (it is around 1-2 s), so hlsenc is initialized with audio packet PTS instead of video packet PTS. That is not correct if you wan't to have all segments with same length -forced_keyframes to force keyframe at video position. Every other calculations of hls_time is done only on ref_packets which is video. This scenario is problematic when encoder is also inserting keyframes by its own decision (libx264 default behavior).

M.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to