Re: [FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Steven Liu
2016-09-09 9:59 GMT+08:00 Aman Gupta :

> 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  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 <
> > mich...@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 :
> >> >
> >> > > 2016-09-08 16:01 GMT+02:00 Steven Liu :
> >> > >
> >> > > > +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


Re: [FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Aman Gupta
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  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 <
> mich...@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 :
>> >
>> > > 2016-09-08 16:01 GMT+02:00 Steven Liu :
>> > >
>> > > > +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
>>
>>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Aman Gupta
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 
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 :
> >
> > > 2016-09-08 16:01 GMT+02:00 Steven Liu :
> > >
> > > > +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
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Michael Niedermayer
On Fri, Sep 09, 2016 at 02:59:52AM +0800, Steven Liu wrote:
> 2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos :
> 
> > 2016-09-08 16:01 GMT+02:00 Steven Liu :
> >
> > > +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.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Steven Liu
2016-09-08 22:52 GMT+08:00 Carl Eugen Hoyos :

> 2016-09-08 16:01 GMT+02:00 Steven Liu :
>
> > +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"?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Carl Eugen Hoyos
2016-09-08 16:01 GMT+02:00 Steven Liu :

> +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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] avformat/segment: give a warning message for remove initial_offset option

2016-09-08 Thread Steven Liu
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 
---
 libavformat/segment.c | 5 +
 1 file changed, 5 insertions(+)

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,
"segment_time, segment_times, and segment_frames options "
-- 
2.7.4 (Apple Git-66)


0001-avformat-segment-give-a-warning-message-for-remove-i.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel