From: spartazhc
This patch fixes Bug #9237
In some bitstream, pts of some video packet can be N/A, which will set
start_pts to AV_NOPTS_VALUE. Adding an if condition can fix it.
Signed-off-by: spartazhc
---
libavformat/hlsenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
algorithms to ffabr.
Describe my work in detail
I have written some more details about my work on this posted in my
blog:
https://spartazhc.github.io/2020/08/23/ABR-meets-FFmpeg-in-detail/. You
could read it if you are interested.
Regards,
Hongcheng Zhong
From: spartazhc
Add abr option, ffplay can play hls using abr by:
ffplay -i http://xxx/master.m3u8 -abr
Structure ABRList is added to save stream type and index, it is
used to allow packet_queue_put function to put pkt which from same
type(for example: video pkt) but different stream index to
From: spartazhc
For example, ffabr:crypto+http://xxx.m3u8
Signed-off-by: spartazhc
---
libavformat/hls.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4e760f8e8a..37a5a017b1 100644
--- a/libavformat/hls.c
+++
From: spartazhc
HLS use abr may switch streams, ffplay should allow pkt whic same type
(for example: video pkt) but different stream index to queue.
But in the begining, avformat_find_stream_info() will add pkts to
packet_buffer from all streams to find info. This will cause problem
because
From: spartazhc
Add an AVDictionary option "abr_initial", which could be used to send
message to ffplay. Currently, the first entry "abr_init_duration" is
added.
Signed-off-by: spartazhc
---
doc/demuxers.texi | 3 +++
libavformat/hls.c | 14 ++
2 files changed, 17 insertions(+)
From: spartazhc
Add abr module for hls/dash.
Signed-off-by: spartazhc
v1 fixed:
1. add an "ff" prefix to the protocol name to mark it internal.
2. use 1.2f for float constant 1.2.
3. simplify abr_seek for we just need AVSEEK_SIZE only.
v2 fixed:
1. fix error return
2. simplify abr_seek
v3
From: spartazhc
add ffabr protocol to the default_whitelist of http and https
Signed-off-by: spartazhc
---
libavformat/http.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 6c39da1a8b..88e69114a2 100644
---
From: spartazhc
When abr is enable, it will take over the task to call http to
download segments, and will return a switch-request for hls to
switch streams.
For reason not to waste segments that have been downloaded,
switch will become effective after old segments is used out.
Abr cannot work
On Thu, 2020-07-16 at 18:11 +0200, Andreas Rheinhardt wrote:
> Hongcheng Zhong:
> > From: spartazhc
> >
> > hls_read_header will add all streams to s->internal->packet_buffer.
> > Use av_packet_buffer_filter to remove the AVPackets from other
> > streams
From: spartazhc
Add av_packet_buffer_filter to remove AVPackets whose stream_index is not
in st_index list. st_index has length of AVMEDIA_TYPE_NB, contains
the stream_index of all these media types.
Generally s->internal->packet_buffer may have pkts from different
stream, and stream_index will
From: spartazhc
hls_read_header will add all streams to s->internal->packet_buffer.
Use av_packet_buffer_filter to remove the AVPackets from other streams that
are not needed, otherwise abr will allow them to be added to ffplay's
packet_queue.
Signed-off-by: spartazhc
---
fftools/ffplay.c | 4
From: spartazhc
Add abr option, ffplay can play hls using abr by:
ffplay -i http://xxx/master.m3u8 -abr
Structure ABRList is added to save stream type and index, it is
used to allow packet_queue_put function to put pkt which from same
type(for example: video pkt) but different stream index to
From: spartazhc
add abr protocol to http's whitelist
Signed-off-by: spartazhc
---
libavformat/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 6c39da1a8b..b77517ff51 100644
--- a/libavformat/http.c
+++
From: spartazhc
When abr is enable, it will take over the task to call http to
download segments, and will return a switch-request for hls to
switch streams.
For reason not to waste segments that have been downloaded,
switch will become effective after old segments is used out.
Abr cannot work
7699b9baef
--- /dev/null
+++ b/libavformat/abr.c
@@ -0,0 +1,249 @@
+/*
+ * Adaptive Bitrate Module for HLS / DASH
+ * Copyright (c) 2020 Hongcheng Zhong
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Less
From: spartazhc
Add abr option, ffplay can play hls using abr by:
ffplay -i http://xxx/master.m3u8 -abr
Structure ABRList is added to save stream type and index, it is
used to allow packet_queue_put function to put pkt which from same
type(for example: video pkt) but different stream index to
From: spartazhc
hls_read_header will add all streams to s->internal->packet_buffer.
Use av_packet_buffer_filter to remove the AVPackets from other streams that
are not needed, otherwise abr will allow them to be added to ffplay's
packet_queue.
Signed-off-by: spartazhc
---
fftools/ffplay.c | 4
From: spartazhc
add abr protocol to http's whitelist
Signed-off-by: spartazhc
---
libavformat/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 6c39da1a8b..b77517ff51 100644
--- a/libavformat/http.c
+++
From: spartazhc
Add av_packet_buffer_filter to remove AVPackets whose stream_index is not
in st_index list. st_index has length of AVMEDIA_TYPE_NB, contains
the stream_index of all these media types.
Generally s->internal->packet_buffer may have pkts from different
stream, and stream_index will
From: spartazhc
When abr is enable, it will take over the task to call http to
download segments, and will return a switch-request for hls to
switch streams.
For reason not to waste segments that have been downloaded,
switch will become effective after old segments is used out.
Abr cannot work
to.o
OBJS-$(CONFIG_BLURAY_PROTOCOL) += bluray.o
diff --git a/libavformat/abr.c b/libavformat/abr.c
new file mode 100644
index 00..e201d3edda
--- /dev/null
+++ b/libavformat/abr.c
@@ -0,0 +1,250 @@
+/*
+ * Adaptive Bitrate Module for HLS / DASH
+ * Copyright (c) 2020 Hongc
On Sun, 2020-07-05 at 15:42 +0200, Manolis Stamatogiannakis wrote:
> Hello,
>
> I'm trying to submit a patch for adding a "shift" option to
> subtitles/ass
> filters. Initial submission was ok, but resubmitting after addressing
> some
> emails didn't go as expected.
>
> I have the following two
- On Jul 5, 2020, at 9:14 PM, Andreas Rheinhardt
andreas.rheinha...@gmail.com wrote:
> Hongcheng Zhong:
>> From: spartazhc
>>
>> Add av_packet_clean to remove AVPackets whose stream_index is not
>> in st_index list.
>>
>> Generally s->internal-&
From: spartazhc
hls_read_header will add all streams to s->internal->packet_buffer.
Use av_packet_clean to remove the AVPackets from other streams that
are not needed, otherwise abr will allow them to be added to ffplay's
packet_queue.
Signed-off-by: spartazhc
---
fftools/ffplay.c | 4
1
/libavformat/abr.c
@@ -0,0 +1,282 @@
+/*
+ * Adaptive Bitrate Module for HLS / DASH
+ * Copyright (c) 2020 Hongcheng Zhong
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License
From: spartazhc
Add av_packet_clean to remove AVPackets whose stream_index is not
in st_index list.
Generally s->internal->packet_buffer may have pkts from different
stream, and stream_index will be used to discard pkt that is not
needed. But in case of abr, several streams may pass the
From: spartazhc
Add abr option, ffplay can play hls using abr by:
ffplay -i http://xxx/master.m3u8 -abr
Structure ABRList is added to save stream type and index, it is
used to allow packet_queue_put function to put pkt which from same
type(for example: video pkt) but different stream index to
From: spartazhc
When abr is enable, it will take over the task to call http to
download segments, and will return a switch-request for hls to
switch streams.
For reason not to waste segments that have been downloaded,
switch will become effective after old segments is used out.
Abr cannot work
From: spartazhc
add abr protocol to http's whitelist
Signed-off-by: spartazhc
---
libavformat/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 6c39da1a8b..6a58c9afef 100644
--- a/libavformat/http.c
+++
-by: Hongcheng Zhong
---
libavformat/hlsenc.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index f6dd894..19aa2b1 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -126,6 +126,7 @@ typedef struct VariantStream {
int has_video
- On Mar 6, 2020, at 11:08 AM, Andreas Rheinhardt
andreas.rheinha...@gmail.com wrote:
> Hongcheng Zhong:
>> - On Mar 6, 2020, at 12:55 AM, Andreas Rheinhardt
>> andreas.rheinha...@gmail.com wrote:
>>
>>> Hongcheng Zhong:
>>>> - On Mar 5,
- On Mar 6, 2020, at 12:55 AM, Andreas Rheinhardt
andreas.rheinha...@gmail.com wrote:
> Hongcheng Zhong:
>> - On Mar 5, 2020, at 11:38 PM, lq l...@chinaffmpeg.org wrote:
>>
>>>> 2020年3月5日 下午9:41,Hongcheng Zhong 写道:
>>>>
>>>> This
- On Mar 5, 2020, at 11:38 PM, lq l...@chinaffmpeg.org wrote:
>> 2020年3月5日 下午9:41,Hongcheng Zhong 写道:
>>
>> This patch fixes Bug #8469
>> If x264 baseline profile is used with other profiles,
>> start_pts will be initialized to audio stream's first pts,
>&
-by: Hongcheng Zhong
---
libavformat/hlsenc.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index f6dd894..3b2434f 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -126,6 +126,7 @@ typedef struct VariantStream
35 matches
Mail list logo