Message ID | 1585556574-31762-1-git-send-email-mypopydev@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,V1,1/4] lavf/flvdec: set AVFMT_TS_DISCONT flag on FLV demuxer | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | fail | Make fate failed |
On Mon, Mar 30, 2020 at 4:30 PM Jun Zhao <mypopydev@gmail.com> wrote: > > From: Jun Zhao <barryjzhao@tencent.com> > > There have been some reports about FLV timestamp discontinuities present. > e,g, the file recorded from live RTMP FLV streaming, so add > AVFMT_TS_DISCONT flag on FLV demuxer and also update the fate test > fate-filter-aresample for test sample nellymoser-discont.flv. > > BTW: live_flv demuxer also enabled the AVFMT_TS_DISCONT flag. > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > --- > libavformat/flvdec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c > index 7c3e5b0..82afc31 100644 > --- a/libavformat/flvdec.c > +++ b/libavformat/flvdec.c > @@ -1365,6 +1365,7 @@ AVInputFormat ff_flv_demuxer = { > .read_close = flv_read_close, > .extensions = "flv", > .priv_class = &flv_class, > + .flags = AVFMT_TS_DISCONT > }; > > static const AVClass live_flv_class = { > -- > 2.7.4 > Need to update the fate test ref file from: https://drive.google.com/file/d/1hRKzJlkX-EIcV9SJnL5fnK4zx6QecgyC/view?usp=sharing for this patch
On Mon, Mar 30, 2020 at 04:22:51PM +0800, Jun Zhao wrote: > From: Jun Zhao <barryjzhao@tencent.com> > > There have been some reports about FLV timestamp discontinuities present. > e,g, the file recorded from live RTMP FLV streaming, so add > AVFMT_TS_DISCONT flag on FLV demuxer and also update the fate test > fate-filter-aresample for test sample nellymoser-discont.flv. > > BTW: live_flv demuxer also enabled the AVFMT_TS_DISCONT flag. Maybe i misunderstand but this sounds like you have a live_flv file and its demuxed by the non live demuxer. IIRC AVFMT_TS_DISCONT is the main difference between the 2 [...]
On Tue, Mar 31, 2020 at 5:29 AM Michael Niedermayer <michael@niedermayer.cc> wrote: > > On Mon, Mar 30, 2020 at 04:22:51PM +0800, Jun Zhao wrote: > > From: Jun Zhao <barryjzhao@tencent.com> > > > > There have been some reports about FLV timestamp discontinuities present. > > e,g, the file recorded from live RTMP FLV streaming, so add > > AVFMT_TS_DISCONT flag on FLV demuxer and also update the fate test > > fate-filter-aresample for test sample nellymoser-discont.flv. > > > > BTW: live_flv demuxer also enabled the AVFMT_TS_DISCONT flag. > > Maybe i misunderstand but this sounds like you have a live_flv > file and its demuxed by the non live demuxer. > IIRC AVFMT_TS_DISCONT is the main difference between the 2 > Yes, it's as you think, and I think we can merge/combine the flv demuxer and live_flvdec demuxer with AVFMT_TS_DISCONT flag
On Tue, Mar 31, 2020 at 9:20 AM mypopy@gmail.com <mypopy@gmail.com> wrote: > > On Tue, Mar 31, 2020 at 5:29 AM Michael Niedermayer > <michael@niedermayer.cc> wrote: > > > > On Mon, Mar 30, 2020 at 04:22:51PM +0800, Jun Zhao wrote: > > > From: Jun Zhao <barryjzhao@tencent.com> > > > > > > There have been some reports about FLV timestamp discontinuities present. > > > e,g, the file recorded from live RTMP FLV streaming, so add > > > AVFMT_TS_DISCONT flag on FLV demuxer and also update the fate test > > > fate-filter-aresample for test sample nellymoser-discont.flv. > > > > > > BTW: live_flv demuxer also enabled the AVFMT_TS_DISCONT flag. > > > > Maybe i misunderstand but this sounds like you have a live_flv > > file and its demuxed by the non live demuxer. > > IIRC AVFMT_TS_DISCONT is the main difference between the 2 > > > Yes, it's as you think, and I think we can merge/combine the flv > demuxer and live_flvdec demuxer with AVFMT_TS_DISCONT flag BTW: in the FLV file, it's not having the string "NGINX RTMP" in Metadata part, so the live_flvdec can't probe the file.
On Tue, Mar 31, 2020 at 09:20:34AM +0800, mypopy@gmail.com wrote: > On Tue, Mar 31, 2020 at 5:29 AM Michael Niedermayer > <michael@niedermayer.cc> wrote: > > > > On Mon, Mar 30, 2020 at 04:22:51PM +0800, Jun Zhao wrote: > > > From: Jun Zhao <barryjzhao@tencent.com> > > > > > > There have been some reports about FLV timestamp discontinuities present. > > > e,g, the file recorded from live RTMP FLV streaming, so add > > > AVFMT_TS_DISCONT flag on FLV demuxer and also update the fate test > > > fate-filter-aresample for test sample nellymoser-discont.flv. > > > > > > BTW: live_flv demuxer also enabled the AVFMT_TS_DISCONT flag. > > > > Maybe i misunderstand but this sounds like you have a live_flv > > file and its demuxed by the non live demuxer. > > IIRC AVFMT_TS_DISCONT is the main difference between the 2 > > > Yes, it's as you think, and I think we can merge/combine the flv > demuxer and live_flvdec demuxer with AVFMT_TS_DISCONT flag How does seeking by time instead of by file position work if its not known if a file can contain discontinuities ? iam asking because if the 2 cases are merged that could become a problem thx [...]
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 7c3e5b0..82afc31 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1365,6 +1365,7 @@ AVInputFormat ff_flv_demuxer = { .read_close = flv_read_close, .extensions = "flv", .priv_class = &flv_class, + .flags = AVFMT_TS_DISCONT }; static const AVClass live_flv_class = {