Message ID | CADxeRwkxMZXFeubQ9+x4MCh+dF9-n2rtMW-mWwg9eDZnMv7oCg@mail.gmail.com |
---|---|
State | Accepted |
Headers | show |
2016-09-08 16:01 GMT+02:00 Steven Liu <lingjiujianke@gmail.com>: > + if (seg->initial_offset > 0) { > + av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset will be > deprecated soon," "is deprecated" even if you decide not to ignore the value set. Carl Eugen
2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos <ceffmpeg@gmail.com>: > 2016-09-08 16:01 GMT+02:00 Steven Liu <lingjiujianke@gmail.com>: > > > + if (seg->initial_offset > 0) { > > + av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset will > be > > deprecated soon," > > "is deprecated" even if you decide not to ignore the value set. > > Carl Eugen > Sorry for my poor English, What about "be removed"?
On Fri, Sep 09, 2016 at 02:59:52AM +0800, Steven Liu wrote: > 2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos <ceffmpeg@gmail.com>: > > > 2016-09-08 16:01 GMT+02:00 Steven Liu <lingjiujianke@gmail.com>: > > > > > + if (seg->initial_offset > 0) { > > > + av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset will > > be > > > deprecated soon," > > > > "is deprecated" even if you decide not to ignore the value set. > > > > Carl Eugen > > > > Sorry for my poor English, fixed the english and applied > What about "be removed"? that would have worked too the option is deprecated see https://en.wiktionary.org/wiki/deprecate#English "To declare something obsolescent; to recommend against a function, technique, command, etc. that still works but has been replaced. " [...]
I tried to switch from -initial_offset to -output_ts_offset, but it does not work as expected. In Safari, the generated HLS stream stalls out and stops playing after the first segment. Aman On Thu, Sep 8, 2016 at 5:54 PM, Michael Niedermayer <michael@niedermayer.cc> wrote: > On Fri, Sep 09, 2016 at 02:59:52AM +0800, Steven Liu wrote: > > 2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos <ceffmpeg@gmail.com>: > > > > > 2016-09-08 16:01 GMT+02:00 Steven Liu <lingjiujianke@gmail.com>: > > > > > > > + if (seg->initial_offset > 0) { > > > > + av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset > will > > > be > > > > deprecated soon," > > > > > > "is deprecated" even if you decide not to ignore the value set. > > > > > > Carl Eugen > > > > > > > Sorry for my poor English, > > fixed the english and applied > > > > What about "be removed"? > > that would have worked too > > the option is deprecated > see https://en.wiktionary.org/wiki/deprecate#English > "To declare something obsolescent; to recommend against a function, > technique, command, etc. that still works but has been replaced. " > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Many things microsoft did are stupid, but not doing something just because > microsoft did it is even more stupid. If everything ms did were stupid they > would be bankrupt already. > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >
Yea this doesn't work at all. I wish someone had bothered to check before the patch was proposed or merged. With "-ss 20 -i file -segment_time 2 -segment_start_number 10 -initial_offset 20": #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-ALLOW-CACHE:YES #EXT-X-TARGETDURATION:3 #EXTINF:2.023344, out10.ts #EXTINF:2.002011, out11.ts #EXTINF:2.002011, out12.ts With "-ss 20 -i file -segment_time 2 -segment_start_number 10 -output_ts_offset 20": #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-ALLOW-CACHE:YES #EXT-X-TARGETDURATION:21 #EXTINF:20.200211, out10.ts #EXTINF:0.200211, out11.ts #EXTINF:0.200211, out12.ts The TARGETDURATION as well as the duration of the segments themselves is incorrect. Aman On Thu, Sep 8, 2016 at 6:48 PM, Aman Gupta <ffmpeg@tmm1.net> wrote: > I tried to switch from -initial_offset to -output_ts_offset, but it does > not work as expected. In Safari, the generated HLS stream stalls out and > stops playing after the first segment. > > Aman > > On Thu, Sep 8, 2016 at 5:54 PM, Michael Niedermayer < > michael@niedermayer.cc> wrote: > >> On Fri, Sep 09, 2016 at 02:59:52AM +0800, Steven Liu wrote: >> > 2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos <ceffmpeg@gmail.com>: >> > >> > > 2016-09-08 16:01 GMT+02:00 Steven Liu <lingjiujianke@gmail.com>: >> > > >> > > > + if (seg->initial_offset > 0) { >> > > > + av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset >> will >> > > be >> > > > deprecated soon," >> > > >> > > "is deprecated" even if you decide not to ignore the value set. >> > > >> > > Carl Eugen >> > > >> > >> > Sorry for my poor English, >> >> fixed the english and applied >> >> >> > What about "be removed"? >> >> that would have worked too >> >> the option is deprecated >> see https://en.wiktionary.org/wiki/deprecate#English >> "To declare something obsolescent; to recommend against a function, >> technique, command, etc. that still works but has been replaced. " >> >> [...] >> -- >> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB >> >> Many things microsoft did are stupid, but not doing something just because >> microsoft did it is even more stupid. If everything ms did were stupid >> they >> would be bankrupt already. >> >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> >
2016-09-09 9:59 GMT+08:00 Aman Gupta <ffmpeg@tmm1.net>: > Yea this doesn't work at all. I wish someone had bothered to check before > the patch was proposed or merged. > > With "-ss 20 -i file -segment_time 2 -segment_start_number 10 > -initial_offset 20": > > #EXTM3U > #EXT-X-VERSION:3 > #EXT-X-MEDIA-SEQUENCE:0 > #EXT-X-ALLOW-CACHE:YES > #EXT-X-TARGETDURATION:3 > #EXTINF:2.023344, > out10.ts > #EXTINF:2.002011, > out11.ts > #EXTINF:2.002011, > out12.ts > > > With "-ss 20 -i file -segment_time 2 -segment_start_number 10 > -output_ts_offset 20": > > #EXTM3U > #EXT-X-VERSION:3 > #EXT-X-MEDIA-SEQUENCE:0 > #EXT-X-ALLOW-CACHE:YES > #EXT-X-TARGETDURATION:21 > #EXTINF:20.200211, > out10.ts > #EXTINF:0.200211, > out11.ts > #EXTINF:0.200211, > out12.ts > > > The TARGETDURATION as well as the duration of the segments themselves is > incorrect. > > I've send a new patch to fix this issue, check it please, i have check it , no problem. > Aman > > On Thu, Sep 8, 2016 at 6:48 PM, Aman Gupta <ffmpeg@tmm1.net> wrote: > > > I tried to switch from -initial_offset to -output_ts_offset, but it does > > not work as expected. In Safari, the generated HLS stream stalls out and > > stops playing after the first segment. > > > > Aman > > > > On Thu, Sep 8, 2016 at 5:54 PM, Michael Niedermayer < > > michael@niedermayer.cc> wrote: > > > >> On Fri, Sep 09, 2016 at 02:59:52AM +0800, Steven Liu wrote: > >> > 2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos <ceffmpeg@gmail.com>: > >> > > >> > > 2016-09-08 16:01 GMT+02:00 Steven Liu <lingjiujianke@gmail.com>: > >> > > > >> > > > + if (seg->initial_offset > 0) { > >> > > > + av_log(s, AV_LOG_WARNING, "NOTE: the option > initial_offset > >> will > >> > > be > >> > > > deprecated soon," > >> > > > >> > > "is deprecated" even if you decide not to ignore the value set. > >> > > > >> > > Carl Eugen > >> > > > >> > > >> > Sorry for my poor English, > >> > >> fixed the english and applied > >> > >> > >> > What about "be removed"? > >> > >> that would have worked too > >> > >> the option is deprecated > >> see https://en.wiktionary.org/wiki/deprecate#English > >> "To declare something obsolescent; to recommend against a function, > >> technique, command, etc. that still works but has been replaced. " > >> > >> [...] > >> -- > >> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > >> > >> Many things microsoft did are stupid, but not doing something just > because > >> microsoft did it is even more stupid. If everything ms did were stupid > >> they > >> would be bankrupt already. > >> >
diff --git a/libavformat/segment.c b/libavformat/segment.c index bf29ef8..23e1abf 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -651,6 +651,11 @@ static int seg_init(AVFormatContext *s) seg->individual_header_trailer = 0; } + if (seg->initial_offset > 0) { + av_log(s, AV_LOG_WARNING, "NOTE: the option initial_offset will be deprecated soon," + "you can use output_ts_offset instead of it\n"); + } + if (!!seg->time_str + !!seg->times_str + !!seg->frames_str > 1) { av_log(s, AV_LOG_ERROR,
ffmpeg have a generic solution working with all muxer named output_ts_offset, output_ts_offset will instead of initial_offset Signed-off-by: LiuQi <liuqi@gosun.com> --- libavformat/segment.c | 5 +++++ 1 file changed, 5 insertions(+) "segment_time, segment_times, and segment_frames options "