Re: [FFmpeg-devel] [RFC 00/13] flvdec/flvenc: add support for enhanced rtmp codecs and multitrack/multichannel
Timo Rothenpieler 于2024年5月21日周二 17:03写道: > > This is based on the preliminary spec for enhanced rtmp v2: > https://veovera.org/docs/enhanced/enhanced-rtmp-v2 > > The spec is not final, and can still undergo breaking changes, hence this set > is purely for comments and review, and not ready to be merged until the final > v2 spec is published. > > There are no samples out in the wild yet, so testing interoperability with > other software has not happened yet either. > Specially the two other multitrack modes, where multiple tracks are in the > same packet, have not been tested at all, since no software can write such > files. Yes, there have reconnect function in v2 And i cannot sure there maybe have some problem in multitrack mode, different codecs type, change amount the tracks, maybe need more process, need check GOP、 keyframes 、VFR mode, because they will get different timestamps. > > The set can also be found on GitHub, where ignoring whitespaces makes > specially the last patch a lot more readable: > https://github.com/BtbN/FFmpeg/tree/enhanced-flv > > > Dennis Sädtler via ffmpeg-devel (2): > avformat/flvenc: Implement support for multi-track video > avformat/flvdec: Add support for demuxing multi-track FLV > > Timo Rothenpieler (11): > avformat/flvenc: add enhanced audio codecs > avformat/flvenc: remove !size check for audio packets > avformat/flvdec: add enhanced audio codecs > avformat/flvenc: refactor fourcc writing > avformat/flvenc: write enhanced rtmp multichannel info for audio with > more than two channels > avformat/flvdec: parse enhanced rtmp multichannel info > avformat/flvenc: add support for writing multi track audio > avformat/flvdec: add support for reading multi track audio > avformat/rtmpproto: add more enhanced rtmp codecs > avformat/flvdec: stop shadowing local variables > avformat/flvdec: support all multi-track modes > > libavformat/flv.h | 21 ++ > libavformat/flvdec.c| 654 +++- > libavformat/flvenc.c| 443 +-- > libavformat/rtmpproto.c | 11 +- > 4 files changed, 819 insertions(+), 310 deletions(-) > > -- > 2.43.2 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 3/3] avformat/hlsenc: Remove dead ret stores
Michael Niedermayer 于2024年5月25日周六 19:18写道: > > Fixes: CID1529222 Unused value > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavformat/hlsenc.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 0e2843c6bc5..8a43ef6232a 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -1582,8 +1582,6 @@ static int hls_window(AVFormatContext *s, int last, > VariantStream *vs) > ret = hlsenc_io_open(s, byterange_mode ? &hls->m3u8_out : &vs->out, > temp_filename, &options); > av_dict_free(&options); > if (ret < 0) { > -if (hls->ignore_io_errors) > -ret = 0; > goto fail; > } > > @@ -1641,8 +1639,6 @@ static int hls_window(AVFormatContext *s, int last, > VariantStream *vs) > ret = hlsenc_io_open(s, &hls->sub_m3u8_out, temp_vtt_filename, > &options); > av_dict_free(&options); > if (ret < 0) { > -if (hls->ignore_io_errors) > -ret = 0; > goto fail; > } > ff_hls_write_playlist_header(hls->sub_m3u8_out, hls->version, > hls->allowcache, > -- > 2.45.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 7/9] MAINTAINERS: Update the entries for the release maintainer for FFmpeg
Michael Niedermayer 于2024年6月17日周一 07:09写道: > > Ive been told that someone at the BCN video tech meetup claimed to be the > "release maintainer for FFmpeg". > > If you have any doubt who maintains releases, just do something like the > following and look at the output: > VER=5.1 > echo commiters ; git shortlog --group=committer -s n$VER..release/$VER -n ;\ > echo authors ; git shortlog-s n$VER..release/$VER -n (base) MacBook-Pro:ffmpeg StevenLiu$ VER=5.1 (base) MacBook-Pro:ffmpeg StevenLiu$ echo committers ; git shortlog --group=committer -s n$VER..release/$VER -n ;echo authors ; git shortlog-s n$VER..release/$VER -n committers fatal: ambiguous argument 'n5.1..release/5.1': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' authors fatal: ambiguous argument 'n5.1..release/5.1': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' (base) MacBook-Pro:ffmpeg StevenLiu$ > > Signed-off-by: Michael Niedermayer > --- > MAINTAINERS | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 41a98744adf..a82fa58c69f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -536,10 +536,12 @@ wm4 > Releases > > > +7.0 Michael Niedermayer > +6.1 Michael Niedermayer > +5.1 Michael Niedermayer > +4.4 Michael Niedermayer > +3.4 Michael Niedermayer > 2.8 Michael Niedermayer > -2.7 Michael Niedermayer > -2.6 Michael Niedermayer > -2.5 Michael Niedermayer > > If you want to maintain an older release, please contact us > > -- > 2.45.2 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 7/9] MAINTAINERS: Update the entries for the release maintainer for FFmpeg
Steven Liu 于2024年6月18日周二 17:53写道: > > Michael Niedermayer 于2024年6月17日周一 07:09写道: > > > > Ive been told that someone at the BCN video tech meetup claimed to be the > > "release maintainer for FFmpeg". > > > > If you have any doubt who maintains releases, just do something like the > > following and look at the output: > > VER=5.1 > > echo commiters ; git shortlog --group=committer -s n$VER..release/$VER -n > > ;\ > > echo authors ; git shortlog-s n$VER..release/$VER -n > > (base) MacBook-Pro:ffmpeg StevenLiu$ VER=5.1 > (base) MacBook-Pro:ffmpeg StevenLiu$ echo committers ; git shortlog > --group=committer -s n$VER..release/$VER -n ;echo authors ; git > shortlog-s n$VER..release/$VER -n > committers > fatal: ambiguous argument 'n5.1..release/5.1': unknown revision or > path not in the working tree. > Use '--' to separate paths from revisions, like this: > 'git [...] -- [...]' > authors > fatal: ambiguous argument 'n5.1..release/5.1': unknown revision or > path not in the working tree. > Use '--' to separate paths from revisions, like this: > 'git [...] -- [...]' > (base) MacBook-Pro:ffmpeg StevenLiu$ This can fix the error message. not sure if this is right operation :D echo committers ; git shortlog --group=committer -s n$VER..remotes/origin/release/$VER -n ;echo authors ; git shortlog -s n$VER..remotes/origin/release/$VER -n > > > > > > > Signed-off-by: Michael Niedermayer > > --- > > MAINTAINERS | 8 +--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 41a98744adf..a82fa58c69f 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -536,10 +536,12 @@ wm4 > > Releases > > > > > > +7.0 Michael Niedermayer > > +6.1 Michael Niedermayer > > +5.1 Michael Niedermayer > > +4.4 Michael Niedermayer > > +3.4 Michael Niedermayer > > 2.8 Michael Niedermayer > > -2.7 Michael Niedermayer > > -2.6 Michael Niedermayer > > -2.5 Michael Niedermayer > > > > If you want to maintain an older release, please contact us > > > > -- > > 2.45.2 > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero
Nuo Mi 于2024年6月18日周二 19:51写道: > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili wrote: > > > > > > > > On Jun 17, 2024, at 16:45, Hendrik Leppkes wrote: > > > > > > On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili > > wrote: > > >> > > >> > > >> > > >>> On Jun 17, 2024, at 15:05, Anton Khirnov wrote: > > >>> > > >>> Quoting Zhao Zhili (2024-06-17 07:19:26) > > From: Zhao Zhili > > > > When thread_count be zero, it will be run on current thread like > > !HAVE_THREADS. > > >>> > > >>> Other APIs treat zero to mean "auto". > > >> > > >> executor don’t detect cpu cores by itself. It’s more low level than > > libavcodec. > > >> > > >> Zero thread is zero thread, literally. If we use thread_count one to > > mean > > >> run on current thread, how to create a single thread then? > > > > > > Whats the point of creating a single thread? Does the main thread ever > > > do something else in the meantime, or does it just wait for the job > > > anyway? > > > > Executor as a basic infrastructure should support such usage. The caller > > don’t need to wait for the job to finish. > > > Hi Zhili, > Thank you for the patch. > Could you explain more about its usage? > Why do we need to run everything in the main thread when we have pthread in > the system? Just control CPU resource be used by decoder, perhaps the computer is running some other applications. There are running more application in one computer, and the ffmpeg decoder is need not realtime. For example running machine learning traning some model, and use ffmpeg transcoding vod videos, but transcode functions is borrow machine learning's team computers :D. > > Thank you. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero
Nuo Mi 于2024年6月19日周三 16:40写道: > > On Tue, Jun 18, 2024 at 8:06 PM Steven Liu wrote: > > > Nuo Mi 于2024年6月18日周二 19:51写道: > > > > > > On Mon, Jun 17, 2024 at 5:28 PM Zhao Zhili > > wrote: > > > > > > > > > > > > > > > > On Jun 17, 2024, at 16:45, Hendrik Leppkes > > wrote: > > > > > > > > > > On Mon, Jun 17, 2024 at 10:03 AM Zhao Zhili > > > > wrote: > > > > >> > > > > >> > > > > >> > > > > >>> On Jun 17, 2024, at 15:05, Anton Khirnov > > wrote: > > > > >>> > > > > >>> Quoting Zhao Zhili (2024-06-17 07:19:26) > > > > >>>> From: Zhao Zhili > > > > >>>> > > > > >>>> When thread_count be zero, it will be run on current thread like > > > > >>>> !HAVE_THREADS. > > > > >>> > > > > >>> Other APIs treat zero to mean "auto". > > > > >> > > > > >> executor don’t detect cpu cores by itself. It’s more low level than > > > > libavcodec. > > > > >> > > > > >> Zero thread is zero thread, literally. If we use thread_count one to > > > > mean > > > > >> run on current thread, how to create a single thread then? > > > > > > > > > > Whats the point of creating a single thread? Does the main thread > > ever > > > > > do something else in the meantime, or does it just wait for the job > > > > > anyway? > > > > > > > > Executor as a basic infrastructure should support such usage. The > > caller > > > > don’t need to wait for the job to finish. > > > > > > > Hi Zhili, > > > Thank you for the patch. > > > Could you explain more about its usage? > > > Why do we need to run everything in the main thread when we have pthread > > in > > > the system? > > Just control CPU resource be used by decoder, perhaps the computer is > > running some other applications. > > There are running more application in one computer, and the ffmpeg > > decoder is need not realtime. > > For example running machine learning traning some model, and use > > ffmpeg transcoding vod videos, > > but transcode functions is borrow machine learning's team computers :D. > > > You can use "taskset" for CPU affinity. It will constrain the CPU resources > used by a process. it is one way, only ok out of containers, and that should can be control by ffmpeg self. maybe cpu_count is ok, but not only this one scene, as zhili said, that is the other scene. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/4] hlsenc: Fix setting vs->start_pos when not using HLS_SINGLE_FILE or hls_segment_size
> On Jun 24, 2024, at 16:49, Martin Storsjö wrote: > > When not using HLS_SINGLE_FILE or hls_segment_size, we're writing > each segment into a separate file. In that case, the file start pos for > each segment will be zero. > > This matches the case in (hls->max_seg_size > 0) above, where we > decide to switch to a new file. > > This fixes the calculation of "vs->size = new_start_pos - vs->start_pos" > at the start of hls_write_packet; previously, start_pos would > refer to the byte size of the previous segment file, giving > vs->size entirely bogus values here. > --- > libavformat/hlsenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 3d5eb47e84..0c72774e29 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -2659,7 +2659,7 @@ static int hls_write_packet(AVFormatContext *s, > AVPacket *pkt) > vs->start_pos = new_start_pos; > } > } else { > -vs->start_pos = new_start_pos; > +vs->start_pos = 0; > sls_flag_file_rename(hls, vs, old_filename); > ret = hls_start(s, vs); > } > -- > 2.39.3 (Apple Git-146) > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. patchset lgtm Thanks Martin Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] point releases
Michael Niedermayer 于2021年10月6日周三 下午5:35写道: > > Hi all > > I do plan to make releases from > 4.4, 4.2, 4.1, 4.0, 3.4, 3.2, 2.8 branches Why not include 4.3 or have some reason? Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] point releases
Steven Liu 于2021年10月7日周四 上午10:41写道: > > Michael Niedermayer 于2021年10月6日周三 下午5:35写道: > > > > Hi all > > > > I do plan to make releases from > > 4.4, 4.2, 4.1, 4.0, 3.4, 3.2, 2.8 branches > Why not include 4.3 or have some reason? Ok, i get it, because it have not present in downstreams page :D > > > > Thanks > Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] point releases
> 在 2021年10月7日,17:15,Jan Ekström 写道: > > On Thu, Oct 7, 2021 at 12:13 PM Jan Ekström wrote: >> >> On Thu, Oct 7, 2021 at 11:09 AM Steven Liu wrote: >>> >>> Steven Liu 于2021年10月7日周四 上午10:41写道: >>>> >>>> Michael Niedermayer 于2021年10月6日周三 下午5:35写道: >>>>> >>>>> Hi all >>>>> >>>>> I do plan to make releases from >>>>> 4.4, 4.2, 4.1, 4.0, 3.4, 3.2, 2.8 branches >>>> Why not include 4.3 or have some reason? >>> Ok, i get it, because it have not present in downstreams page :D >>>> >>>> >>>> >>>> Thanks >>>> Steven >> >> FYI someone popped up on IRC earlier requesting that >> https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/59032494e81a1a65c0b960aaae7ec4c2cc9db35a >> be back-ported to release/4.4 . you should evaluate this request and >> see whether it makes sense. > > As an additional note, it does seem to apply cleanly with `git > cherry-pick -x 59032494e81a1a65c0b960aaae7ec4c2cc9db35a` Done, Thanks for your point JEEB Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/4] libavcodec/adts_header: add frame_length field and avpriv function to parse AAC ADTS header
> 2021年9月22日 上午2:40,Nachiket Tarate 写道: > > These will be used by HLS demuxer in case of sample decryption. > > Signed-off-by: Nachiket Tarate > --- > libavcodec/adts_header.c | 1 + > libavcodec/adts_header.h | 15 +++ > libavcodec/adts_parser.c | 31 +++ > 3 files changed, 47 insertions(+) > > diff --git a/libavcodec/adts_header.c b/libavcodec/adts_header.c > index 0889820f8a..e4454529c4 100644 > --- a/libavcodec/adts_header.c > +++ b/libavcodec/adts_header.c > @@ -66,6 +66,7 @@ int ff_adts_header_parse(GetBitContext *gbc, > AACADTSHeaderInfo *hdr) > hdr->sample_rate= avpriv_mpeg4audio_sample_rates[sr]; > hdr->samples= (rdb + 1) * 1024; > hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples; > +hdr->frame_length = size; > > return size; > } > diff --git a/libavcodec/adts_header.h b/libavcodec/adts_header.h > index f615f6a9f9..354d07e1f8 100644 > --- a/libavcodec/adts_header.h > +++ b/libavcodec/adts_header.h > @@ -34,6 +34,7 @@ typedef struct AACADTSHeaderInfo { > uint8_t sampling_index; > uint8_t chan_config; > uint8_t num_aac_frames; > +uint32_t frame_length; > } AACADTSHeaderInfo; > > /** > @@ -47,4 +48,18 @@ typedef struct AACADTSHeaderInfo { > */ > int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr); > > +/** > + * Parse the ADTS frame header contained in the buffer, which is > + * the first 54 bits. > + * @param[in] buf Pointer to buffer containing the first 54 bits of the > frame. > + * @param[in] size Size of buffer containing the first 54 bits of the frame. > + * @param[out] phdr Pointer to pointer to struct AACADTSHeaderInfo for which > + * memory is allocated and header info is written into it. After using the > header > + * information, the allocated memory must be freed by using av_free. > + * @return Returns 0 on success, -1 if there is a sync word mismatch, > + * -2 if the version element is invalid, -3 if the sample rate > + * element is invalid, or -4 if the bit rate element is invalid. > + */ > +int avpriv_adts_header_parse(AACADTSHeaderInfo **phdr, const uint8_t *buf, > size_t size); > + > #endif /* AVCODEC_ADTS_HEADER_H */ > diff --git a/libavcodec/adts_parser.c b/libavcodec/adts_parser.c > index 5c9f8ff6f2..4a1a8fd5f4 100644 > --- a/libavcodec/adts_parser.c > +++ b/libavcodec/adts_parser.c > @@ -42,3 +42,34 @@ int av_adts_header_parse(const uint8_t *buf, uint32_t > *samples, uint8_t *frames) > return AVERROR(ENOSYS); > #endif > } > + > +int avpriv_adts_header_parse(AACADTSHeaderInfo **phdr, const uint8_t *buf, > size_t size) > +{ > +#if CONFIG_ADTS_HEADER > +int ret = 0; > +GetBitContext gb; > + > +if (!phdr || !buf || size < AV_AAC_ADTS_HEADER_SIZE) > +return AVERROR_INVALIDDATA; > + > +*phdr = av_mallocz(sizeof(AACADTSHeaderInfo)); > +if (!*phdr) > +return AVERROR(ENOMEM); > + > +ret = init_get_bits8(&gb, buf, AV_AAC_ADTS_HEADER_SIZE); > +if (ret < 0) { > +av_freep(phdr); > +return ret; > +} > + > +ret = ff_adts_header_parse(&gb, *phdr); > +if (ret < 0) { > +av_freep(phdr); > +return ret; > +} > + > +return 0; > +#else > +return AVERROR(ENOSYS); > +#endif > +} > -- > 2.17.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > Patchset pushed. Thanks Steven Liu ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v1] libavformat/mov: ffmpeg can't read mp4 track title metadata
> 2021年10月20日 上午10:38,xutop...@gmail.com 写道: > > From: xutopia > > Signed-off-by: xutopia > --- > libavformat/mov.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 57c67e3aac..9673234734 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -521,7 +521,17 @@ retry: > str[str_size] = 0; > } > c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; > -av_dict_set(&c->fc->metadata, key, str, 0); > + > +if (c->trak_index >= 0) { > +if (c->trak_index < c->fc->nb_streams) { > +av_dict_set(&c->fc->streams[c->trak_index]->metadata, key, > str, 0); > +} else { > +av_log(c->fc, AV_LOG_ERROR, "current trck idx=%d > > streams=%d\n", c->trak_index, c->fc->nb_streams); The message looks is used for debug, it is? It should use AV_LOG_DEBUG if yes. > +} > +} else { > +av_dict_set(&c->fc->metadata, key, str, 0); > +} > + > if (*language && strcmp(language, "und")) { > snprintf(key2, sizeof(key2), "%s-%s", key, language); > av_dict_set(&c->fc->metadata, key2, str, 0); > -- > 2.25.1 > > _______ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > Thanks Steven Liu ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] flvenc: flush after write header
> 2021年10月28日 下午2:32,Lingjiang Fang 写道: > > keep align with movenc, or it seems a little weired when debug > --- > libavformat/flvenc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c > index 3f24c7e192..f4798dc9a6 100644 > --- a/libavformat/flvenc.c > +++ b/libavformat/flvenc.c > @@ -767,6 +767,8 @@ static int flv_write_header(AVFormatContext *s) > flv_write_codec_header(s, s->streams[i]->codecpar, 0); > } > > +avio_flush(pb); > + > flv->datastart_offset = avio_tell(pb); > return 0; > } > -- > 2.29.2 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > LGTM Thanks Steven Liu ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hls_sample_encryption: Fix precedence
Andreas Rheinhardt 于2021年11月7日周日 下午3:57写道: > > Fixes Coverity ticket #1492869. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/hls_sample_encryption.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/hls_sample_encryption.c > b/libavformat/hls_sample_encryption.c > index 396fe97921..38795c7fb0 100644 > --- a/libavformat/hls_sample_encryption.c > +++ b/libavformat/hls_sample_encryption.c > @@ -268,7 +268,7 @@ static int get_next_adts_frame(CodecParserContext *ctx, > AudioFrame *frame) > > /* Find next sync word 0xFFF */ > while (ctx->buf_ptr < ctx->buf_end - 1) { > -if (*ctx->buf_ptr == 0xFF && *(ctx->buf_ptr + 1) & 0xF0 == 0xF0) > +if (*ctx->buf_ptr == 0xFF && (*(ctx->buf_ptr + 1) & 0xF0) == 0xF0) > break; > ctx->buf_ptr++; > } > -- > 2.30.2 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] libavcodec/videotoolboxenc: fix pixel buffer memory leak
<13102179...@163.com> 于2021年11月9日周二 下午6:52写道: > > From: songyutong > > In function vtenc_populate_extradata(), there is a manually created > pixel buffer that has not been released. So we should use CVPixelBufferRelease > to release this pixel buffer at the end, otherwise will cause a memory leak. > --- > libavcodec/videotoolboxenc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c > index 8a02d3d1a0..c06b506cc9 100644 > --- a/libavcodec/videotoolboxenc.c > +++ b/libavcodec/videotoolboxenc.c > @@ -2548,6 +2548,7 @@ static int vtenc_populate_extradata(AVCodecContext > *avctx, > > > pe_cleanup: > +CVPixelBufferRelease(pix_buf); > if(vtctx->session) > CFRelease(vtctx->session); > > -- > 2.30.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Test ok here, but I'm not the maintainer of this module. :D Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avformat/hlsenc: Remove nonsense memset
> 2021年11月10日 下午8:59,Andreas Rheinhardt 写道: > > The memset here is both unnecessary (avio_read() ignores the previous > content of the destination buffer) as well as nonsense (for a char > buf[BUFSIZE] sizeof(buf) and sizeof(BUFSIZE) are not the same; the > latter is sizeof(int)). > Fixes Coverity issue #1465863. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/hlsenc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 98608a834a..557cf1bee3 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -2382,7 +2382,6 @@ static int64_t append_single_file(AVFormatContext *s, > VariantStream *vs) > } > > do { > -memset(buf, 0, sizeof(BUFSIZE)); > read_byte = avio_read(vs->out, buf, BUFSIZE); > avio_write(vs->out_single_file, buf, read_byte); > if (read_byte > 0) { > -- > 2.30.2 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > Patchset test ok, LGTM Thanks Steven Liu ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/2] avformat/hlsenc: deprecate hls_ts_options option
From: Steven Liu Because the hls_ts_options will be misunderstand by user, and then user can use hls_segment_options instead of hls_ts_options. Signed-off-by: Steven Liu --- doc/muxers.texi | 2 ++ libavformat/hlsenc.c | 6 -- libavformat/version.h | 4 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 287ea569fd..a8e763a859 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -799,6 +799,7 @@ were recently referenced in the playlist. Default value is 1, meaning segments o Set output format options using a :-separated list of key=value parameters. Values containing @code{:} special characters must be escaped. +@code{hls_ts_options} is deprecated. @item hls_start_number_source Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source. @@ -923,6 +924,7 @@ produce the playlist, @file{out.m3u8}, and segment files: Set output format options using a :-separated list of key=value parameters. Values containing @code{:} special characters must be escaped. +@code{hls_segment_options} instead of hls_ts_options. @item hls_key_info_file @var{key_info_file} Use the information in @var{key_info_file} for segment encryption. The first diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index db0a4675fd..3a085d81bc 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3102,12 +3102,14 @@ static const AVOption options[] = { {"hls_init_time", "set segment length at init list", OFFSET(init_time), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, E}, {"hls_list_size", "set maximum number of playlist entries", OFFSET(max_nb_segments),AV_OPT_TYPE_INT,{.i64 = 5}, 0, INT_MAX, E}, {"hls_delete_threshold", "set number of unreferenced segments to keep before deleting", OFFSET(hls_delete_threshold),AV_OPT_TYPE_INT,{.i64 = 1}, 1, INT_MAX, E}, -{"hls_ts_options","set hls mpegts list of options for the container format used for hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, E}, +#if FF_HLS_TS_OPTIONS +{"hls_ts_options","set hls mpegts list of options for the container format used for hls(will be deprecated)", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, +#endif {"hls_vtt_options","set hls vtt list of options for the container format used for hls", OFFSET(vtt_format_options_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0,E}, {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, {"hls_segment_filename", "filename template for segment files", OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, -{"hls_segment_options","set segments files format options of hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, +{"hls_segment_options","set segments files format options of hls (instead of hls_ts_options)", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, {"hls_segment_size", "maximum size per segment file, (in bytes)", OFFSET(max_seg_size),AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E}, {"hls_key_info_file","file with key URI and key file path", OFFSET(key_info_file), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, {"hls_enc","enable AES128 encryption support", OFFSET(encrypt), AV_OPT_TYPE_BOOL, {.i64 = 0},0, 1, E}, diff --git a/libavformat/version.h b/libavformat/version.h index 81ed517609..5da9291009 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -64,6 +64,10 @@ #ifndef FF_API_AVIOCONTEXT_WRITTEN #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) #endif +#ifndef FF_HLS_TS_OPTIONS +#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) +#endif + #ifndef FF_API_R_FRAME_RATE -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] avformat/hlsenc: add hls_segment_options correct the segment options name
From: Steven Liu Because the hls_ts_options will be misunderstand by user that only can be used in mpegts segments option. So add this option for segments. Signed-off-by: Steven Liu --- doc/muxers.texi | 4 libavformat/hlsenc.c | 1 + 2 files changed, 5 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 7eee8c1be6..287ea569fd 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -919,6 +919,10 @@ This example will create a directory hierarchy 2016/02/15 (if any of them do not produce the playlist, @file{out.m3u8}, and segment files: @file{2016/02/15/file-20160215-1455569023.ts}, @file{2016/02/15/file-20160215-1455569024.ts}, etc. +@item hls_segment_options @var{options_list} +Set output format options using a :-separated list of key=value +parameters. Values containing @code{:} special characters must be +escaped. @item hls_key_info_file @var{key_info_file} Use the information in @var{key_info_file} for segment encryption. The first diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 98608a834a..db0a4675fd 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3107,6 +3107,7 @@ static const AVOption options[] = { {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, {"hls_segment_filename", "filename template for segment files", OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, +{"hls_segment_options","set segments files format options of hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, {"hls_segment_size", "maximum size per segment file, (in bytes)", OFFSET(max_seg_size),AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E}, {"hls_key_info_file","file with key URI and key file path", OFFSET(key_info_file), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, {"hls_enc","enable AES128 encryption support", OFFSET(encrypt), AV_OPT_TYPE_BOOL, {.i64 = 0},0, 1, E}, -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avformat/hlsenc: deprecate hls_ts_options option
> 2021年11月18日 下午12:57,Andreas Rheinhardt 写道: > > Steven Liu: >> From: Steven Liu >> >> Because the hls_ts_options will be misunderstand by user, >> and then user can use hls_segment_options instead of hls_ts_options. >> >> Signed-off-by: Steven Liu >> --- >> doc/muxers.texi | 2 ++ >> libavformat/hlsenc.c | 6 -- >> libavformat/version.h | 4 >> 3 files changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 287ea569fd..a8e763a859 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -799,6 +799,7 @@ were recently referenced in the playlist. Default value >> is 1, meaning segments o >> Set output format options using a :-separated list of key=value >> parameters. Values containing @code{:} special characters must be >> escaped. >> +@code{hls_ts_options} is deprecated. >> >> @item hls_start_number_source >> Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according >> to the specified source. >> @@ -923,6 +924,7 @@ produce the playlist, @file{out.m3u8}, and segment files: >> Set output format options using a :-separated list of key=value >> parameters. Values containing @code{:} special characters must be >> escaped. >> +@code{hls_segment_options} instead of hls_ts_options. >> >> @item hls_key_info_file @var{key_info_file} >> Use the information in @var{key_info_file} for segment encryption. The first >> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c >> index db0a4675fd..3a085d81bc 100644 >> --- a/libavformat/hlsenc.c >> +++ b/libavformat/hlsenc.c >> @@ -3102,12 +3102,14 @@ static const AVOption options[] = { >> {"hls_init_time", "set segment length at init list", >> OFFSET(init_time), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, >> E}, >> {"hls_list_size", "set maximum number of playlist entries", >> OFFSET(max_nb_segments),AV_OPT_TYPE_INT,{.i64 = 5}, 0, INT_MAX, >> E}, >> {"hls_delete_threshold", "set number of unreferenced segments to keep >> before deleting", OFFSET(hls_delete_threshold),AV_OPT_TYPE_INT, >> {.i64 = 1}, 1, INT_MAX, E}, >> -{"hls_ts_options","set hls mpegts list of options for the container >> format used for hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = >> NULL}, 0, 0,E}, >> +#if FF_HLS_TS_OPTIONS >> +{"hls_ts_options","set hls mpegts list of options for the container >> format used for hls(will be deprecated)", OFFSET(format_options), >> AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, > > Missing AV_OPT_FLAG_DEPRECATED. Furthermore, you should modify the > description to guide the users to the new name. Furthermore, this option > will not be deprecated; instead it is deprecated with this patch. Hi Andreas, Do you mean only this should be ok? +#if FF_HLS_TS_OPTIONS +{"hls_ts_options","set hls mpegts list of options for the container format used for hls (move to hls_segment_options)", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E | AV_OPT_FLAG_DEPRECATED}, +#endif > >> +#endif >> {"hls_vtt_options","set hls vtt list of options for the container format >> used for hls", OFFSET(vtt_format_options_str), AV_OPT_TYPE_STRING, {.str = >> NULL}, 0, 0,E}, >> {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST >> NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = >> -1}, INT_MIN, INT_MAX, E}, >> {"hls_base_url", "url to prepend to each playlist entry", >> OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, >> {"hls_segment_filename", "filename template for segment files", >> OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL},0, >> 0, E}, >> -{"hls_segment_options","set segments files format options of hls", >> OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, >> +{"hls_segment_options","set segments files format options of hls >> (instead of hls_ts_options)", OFFSET(format_options), AV_OPT_TYPE_DICT, >> {.str = NULL}, 0, 0,E}, > > Don't change this. Adding an explanation to hls_ts_options that it is > deprecated in favour of hls_segment_options is enough. (Furthermore, > "(instead of hls_ts_options)&
[FFmpeg-devel] [PATCH v2 1/2] avformat/hlsenc: add hls_segment_options correct the segment options name
From: Steven Liu Because the hls_ts_options will be misunderstand by user that only can be used in mpegts segments option. So add this option for segments. Signed-off-by: Steven Liu Signed-off-by: Steven Liu --- doc/muxers.texi | 4 libavformat/hlsenc.c | 1 + 2 files changed, 5 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 7eee8c1be6..287ea569fd 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -919,6 +919,10 @@ This example will create a directory hierarchy 2016/02/15 (if any of them do not produce the playlist, @file{out.m3u8}, and segment files: @file{2016/02/15/file-20160215-1455569023.ts}, @file{2016/02/15/file-20160215-1455569024.ts}, etc. +@item hls_segment_options @var{options_list} +Set output format options using a :-separated list of key=value +parameters. Values containing @code{:} special characters must be +escaped. @item hls_key_info_file @var{key_info_file} Use the information in @var{key_info_file} for segment encryption. The first diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index cfd0c036d1..fb261acc93 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3106,6 +3106,7 @@ static const AVOption options[] = { {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, {"hls_segment_filename", "filename template for segment files", OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, +{"hls_segment_options","set segments files format options of hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E}, {"hls_segment_size", "maximum size per segment file, (in bytes)", OFFSET(max_seg_size),AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E}, {"hls_key_info_file","file with key URI and key file path", OFFSET(key_info_file), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, {"hls_enc","enable AES128 encryption support", OFFSET(encrypt), AV_OPT_TYPE_BOOL, {.i64 = 0},0, 1, E}, -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 2/2] avformat/hlsenc: deprecate hls_ts_options option
Because the hls_ts_options will be misunderstand by user, and then user can use hls_segment_options instead of hls_ts_options. Signed-off-by: Steven Liu --- doc/muxers.texi | 1 + libavformat/hlsenc.c | 4 +++- libavformat/version.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 287ea569fd..1ea98a69a3 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -799,6 +799,7 @@ were recently referenced in the playlist. Default value is 1, meaning segments o Set output format options using a :-separated list of key=value parameters. Values containing @code{:} special characters must be escaped. +@code{hls_ts_options} is deprecated, use hls_segment_options instead of it.. @item hls_start_number_source Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source. diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index fb261acc93..1be5bdf451 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3101,7 +3101,9 @@ static const AVOption options[] = { {"hls_init_time", "set segment length at init list", OFFSET(init_time), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, E}, {"hls_list_size", "set maximum number of playlist entries", OFFSET(max_nb_segments),AV_OPT_TYPE_INT,{.i64 = 5}, 0, INT_MAX, E}, {"hls_delete_threshold", "set number of unreferenced segments to keep before deleting", OFFSET(hls_delete_threshold),AV_OPT_TYPE_INT,{.i64 = 1}, 1, INT_MAX, E}, -{"hls_ts_options","set hls mpegts list of options for the container format used for hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, E}, +#if FF_HLS_TS_OPTIONS +{"hls_ts_options","set hls mpegts list of options for the container format used for hls (deprecated, use hls_segment_options instead of it.)", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0,E | AV_OPT_FLAG_DEPRECATED}, +#endif {"hls_vtt_options","set hls vtt list of options for the container format used for hls", OFFSET(vtt_format_options_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0,E}, {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, diff --git a/libavformat/version.h b/libavformat/version.h index ae2b873197..9c41a300e9 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,6 +58,7 @@ #define FF_API_LAVF_PRIV_OPT(LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_huesaturation: Remove dead store
Andreas Rheinhardt 于2021年11月18日周四 下午5:14写道: > > Fixes Coverity issue #1493345. > > Signed-off-by: Andreas Rheinhardt > --- > The x = y also looks strange. Why does the parameter x exist at all > if it is immediately overwritten in the function? > > libavfilter/vf_huesaturation.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavfilter/vf_huesaturation.c b/libavfilter/vf_huesaturation.c > index af7ea33b9e..d4e3fea1c5 100644 > --- a/libavfilter/vf_huesaturation.c > +++ b/libavfilter/vf_huesaturation.c > @@ -297,7 +297,6 @@ static void transform_point(float matrix[4][4], > float *tx, float *ty, float *tz) > { > x = y; > -*tx = x; > *tx = x * matrix[0][0] + y * matrix[1][0] + z * matrix[2][0] + > matrix[3][0]; > *ty = x * matrix[0][1] + y * matrix[1][1] + z * matrix[2][1] + > matrix[3][1]; > *tz = x * matrix[0][2] + y * matrix[1][2] + z * matrix[2][2] + > matrix[3][2]; > -- > 2.30.2 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". lgtm Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avfilter/dnn/dnn_backend_common: check thread create status before join thread
From: Steven Liu fix SIGSEGV problem, check the thread create status before join thread. set the init status to 0 when create DNNAsyncExecModule, and set status to 1 after pthread_create success. coredump backtrace info: [Thread 0x7fff4778e700 (LWP 323218) exited] Program received signal SIGSEGV, Segmentation fault. 0x7fffed71af81 in pthread_join () from /lib64/libpthread.so.0 (gdb) bt 0 0x7fffed71af81 in pthread_join () from /lib64/libpthread.so.0 1 0x00872e3a in ff_dnn_start_inference_async (ctx=0x30cbe80, async_module=0x4848c58) at libavfilter/dnn/dnn_backend_common.c:122 2 0x00870f70 in execute_model_tf (request=0x4848c40, lltask_queue=0x484c7c0) at libavfilter/dnn/dnn_backend_tf.c: 3 0x00871195 in ff_dnn_execute_model_tf (model=0x30c9700, exec_params=0x7fffafb0) at libavfilter/dnn/dnn_backend_tf.c:1168 4 0x0084a475 in ff_dnn_execute_model (ctx=0x30f8388, in_frame=0x4890fc0, out_frame=0x485f780) at libavfilter/dnn_filter_common.c:129 5 0x00524d69 in activate (filter_ctx=0x3100a40) at libavfilter/vf_dnn_processing.c:299 6 0x0046bc68 in ff_filter_activate (filter=0x3100a40) at libavfilter/avfilter.c:1364 7 0x004701fd in ff_filter_graph_run_once (graph=0x3114cc0) at libavfilter/avfiltergraph.c:1341 8 0x00471331 in push_frame (graph=0x3114cc0) at libavfilter/buffersrc.c:156 9 0x00471861 in av_buffersrc_add_frame_flags (ctx=0x484ce00, frame=0x41670c0, flags=4) at libavfilter/buffersrc.c:224 10 0x0042d415 in ifilter_send_frame (ifilter=0x314e300, frame=0x41670c0) at fftools/ffmpeg.c:2249 11 0x0042d682 in send_frame_to_filters (ist=0x30ff1c0, decoded_frame=0x41670c0) at fftools/ffmpeg.c:2323 12 0x0042e3b5 in decode_video (ist=0x30ff1c0, pkt=0x30b0b40, got_output=0x7fffb524, duration_pts=0x7fffb528, eof=0, decode_failed=0x7fffb520) at fftools/ffmpeg.c:2525 13 0x0042ecd4 in process_input_packet (ist=0x30ff1c0, pkt=0x3148cc0, no_eof=0) at fftools/ffmpeg.c:2681 14 0x00435b2d in process_input (file_index=0) at fftools/ffmpeg.c:4579 15 0x00435fe8 in transcode_step () at fftools/ffmpeg.c:4719 16 0x0043610b in transcode () at fftools/ffmpeg.c:4773 17 0x004368a7 in main (argc=8, argv=0x7fffbd68) at fftools/ffmpeg.c:4977 Reported-by: Yu Yang Signed-off-by: Steven Liu --- libavfilter/dnn/dnn_backend_common.c | 23 +++ libavfilter/dnn/dnn_backend_common.h | 1 + libavfilter/dnn/dnn_backend_tf.c | 4 +++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_common.c b/libavfilter/dnn/dnn_backend_common.c index 6a9c4cc87f..a25d0eded1 100644 --- a/libavfilter/dnn/dnn_backend_common.c +++ b/libavfilter/dnn/dnn_backend_common.c @@ -96,10 +96,13 @@ DNNReturnType ff_dnn_async_module_cleanup(DNNAsyncExecModule *async_module) return DNN_ERROR; } #if HAVE_PTHREAD_CANCEL -pthread_join(async_module->thread_id, &status); -if (status == DNN_ASYNC_FAIL) { -av_log(NULL, AV_LOG_ERROR, "Last Inference Failed.\n"); -return DNN_ERROR; +if (async_module->thread_created) { +pthread_join(async_module->thread_id, &status); +if (status == DNN_ASYNC_FAIL) { +av_log(NULL, AV_LOG_ERROR, "Last Inference Failed.\n"); +return DNN_ERROR; +} +async_module->thread_created = 0; } #endif async_module->start_inference = NULL; @@ -119,16 +122,20 @@ DNNReturnType ff_dnn_start_inference_async(void *ctx, DNNAsyncExecModule *async_ } #if HAVE_PTHREAD_CANCEL -pthread_join(async_module->thread_id, &status); -if (status == DNN_ASYNC_FAIL) { -av_log(ctx, AV_LOG_ERROR, "Unable to start inference as previous inference failed.\n"); -return DNN_ERROR; +if (async_module->thread_created) { +pthread_join(async_module->thread_id, &status); +if (status == DNN_ASYNC_FAIL) { +av_log(ctx, AV_LOG_ERROR, "Unable to start inference as previous inference failed.\n"); +return DNN_ERROR; +} +async_module->thread_created = 0; } ret = pthread_create(&async_module->thread_id, NULL, async_thread_routine, async_module); if (ret != 0) { av_log(ctx, AV_LOG_ERROR, "Unable to start async inference.\n"); return DNN_ERROR; } +async_module->thread_created = 1; #else if (async_module->start_inference(async_module->args) != DNN_SUCCESS) { return DNN_ERROR; diff --git a/libavfilter/dnn/dnn_backend_common.h b/libavfilter/dnn/dnn_backend_common.h index 6b6a5e21ae..6c4909a489 100644 --- a/libavfilter/dnn/dnn_backend_common.h +++ b/libavfilter/dnn/dnn_backend_common.h @@ -75,6 +75,7 @@ typedef struct DNNAsyncExecModule { */ void *args; #if HAVE_PTHREAD_CA
[FFmpeg-devel] [PATCH] avformat/aviobuf: remove unnecessary label in ffio_fdopen
From: Steven Liu Because the s->buffer has been freed by av_freep in avio_closep. It should not av_freep the buffer in label fail after avio_closep. Then just move the av_freep before avio_closep and remove the label fail. Reported-by: TOTE Robot Signed-off-by: Steven Liu --- libavformat/aviobuf.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 5da4dea7b6..3fbb942e76 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -977,18 +977,19 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) (int (*)(void *, uint8_t *, int)) ffurl_read, (int (*)(void *, uint8_t *, int)) ffurl_write, (int64_t (*)(void *, int64_t, int))ffurl_seek); -if (!*s) -goto fail; - +if (!*s) { +av_freep(&buffer); +return AVERROR(ENOMEM); +} (*s)->protocol_whitelist = av_strdup(h->protocol_whitelist); if (!(*s)->protocol_whitelist && h->protocol_whitelist) { avio_closep(s); -goto fail; +return AVERROR(ENOMEM); } (*s)->protocol_blacklist = av_strdup(h->protocol_blacklist); if (!(*s)->protocol_blacklist && h->protocol_blacklist) { avio_closep(s); -goto fail; +return AVERROR(ENOMEM); } (*s)->direct = h->flags & AVIO_FLAG_DIRECT; @@ -1006,9 +1007,6 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) ((FFIOContext*)(*s))->short_seek_get = (int (*)(void *))ffurl_get_short_seek; (*s)->av_class = &ff_avio_class; return 0; -fail: -av_freep(&buffer); -return AVERROR(ENOMEM); } URLContext* ffio_geturlcontext(AVIOContext *s) -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf
From: Steven Liu ret could be set to s->opaque->buffer in avio_close_dyn_buf, so it can be set to NULL, check NULL pointer deference after it should be ok. Reported-by: TOTE Robot Signed-off-by: Steven Liu --- fftools/ffmpeg_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 452b689d62..f2f77ff86f 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -119,6 +119,8 @@ static char *choose_pix_fmts(OutputFilter *ofilter) avio_printf(s, "%s|", name); } len = avio_close_dyn_buf(s, &ret); +if (len <= 0 || !ret) +return NULL; ret[len - 1] = 0; return ret; } else -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf
Anton Khirnov 于2021年12月1日周三 下午6:21写道: > > Quoting Steven Liu (2021-12-01 09:37:52) > > From: Steven Liu > > > > ret could be set to s->opaque->buffer in avio_close_dyn_buf, so it can > > be set to NULL, check NULL pointer deference after it should be ok. > > I don't understand this reasoning. avio_close_dyn_buf() should produce > a non-NULL output buffer if something was written into it. Since this > branch is only taken when (enc->pix_fmts != NULL), something should > always be written, so the output buffer should be non-NULL and have a > non-zero size. > > Under what circumstances will it happen that the output is NULL? Hi Anton, This is the message: ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers built with clang version 10.0.0-4ubuntu1 configuration: --enable-gpl --enable-nonfree --disable-doc --disable-stripping --disable-asm --disable-optimizations --cc=/home/r1/src_git/mfuzz-project/build/bin/mclangwrapper --cxx=/home/r1/src_git/mfuzz-project/build/bin/mclangwrapper++ libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat58. 76.100 / 58. 76.100 libavdevice58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc55. 9.100 / 55. 9.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './file': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf58.76.100 Duration: 00:00:02.00, start: 0.00, bitrate: 113 kb/s Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p(tv, bt709), 640x480 [SAR 6:5 DAR 8:5], 109 kb/s, 3 fps, 3 tbr, 12288 tbn, 3 tbc (default) Metadata: handler_name: VideoHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (native)) Press [q] to stop, [?] for help faultinject: error actived 1! name: realloc, file: src/libavutil/mem.c, line: 142 ??:? /home/r1/src_git/mfuzz-project/wrapper/mfuzzrt/faultinject.c:44 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavutil/mem.c:142 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavutil/mem.c:171 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavformat/aviobuf.c:1312 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavformat/aviobuf.c:170 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavformat/aviobuf.c:191 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavformat/aviobuf.c:248 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/libavformat/aviobuf.c:1442 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:129 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:476 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:657 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:1076 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2237 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2318 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2515 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2675 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:4396 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:4751 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:4805 /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:5010 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7ff6ec5900b3] ??:? AddressSanitizer:DEADLYSIGNAL = ==2784535==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x002e bp 0x7fffaec75a90 sp 0x7fffaec75780 T0) ==2784535==The signal is caused by a READ memory access. ==2784535==Hint: this fault was caused by a dereference of a high value address (see register values below). Dissassemble the provided pc to learn which register was used. #0 0x2e in choose_pix_fmts /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:130:22 #1 0x54f58a in configure_output_video_filter /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:476:21 #2 0x5442b0 in configure_output_filter /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:657:37 #3 0x541012 in configure_filtergraph /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg_filter.c:1076:9 #4 0x6033de in ifilter_send_frame /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2237:15 #5 0x6018e3 in send_frame_to_filters /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2318:15 #6 0x5fa778 in decode_video /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2515:11 #7 0x5a5c8b in process_input_packet /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:2675:19 #8 0x5d281e in process_input /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:4396:23 #9 0x59f1cf in transcode_step /home/r1/ffmpeg/ffmpeg-4.4.1/build/src/fftools/ffmpeg.c:4751:11 #10 0x593970 in transcode /hom
[FFmpeg-devel] [PATCH v2] fftools/ffmpeg_filter: fix SEGV in choose_pix_fmts after avio_close_dyn_buf
Check avio_printf value and len from avio_close_dyn_buf, it should incorrect if they are not equal each other. Reported-by: TOTE Robot Signed-off-by: Steven Liu --- fftools/ffmpeg_filter.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 452b689d62..ceb08b44f1 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -105,6 +105,7 @@ static char *choose_pix_fmts(OutputFilter *ofilter) AVIOContext *s = NULL; uint8_t *ret; int len; +int name_new_size = 0; if (avio_open_dyn_buf(&s) < 0) exit_program(1); @@ -116,9 +117,11 @@ static char *choose_pix_fmts(OutputFilter *ofilter) for (; *p != AV_PIX_FMT_NONE; p++) { const char *name = av_get_pix_fmt_name(*p); -avio_printf(s, "%s|", name); +name_new_size = avio_printf(s, "%s|", name); } len = avio_close_dyn_buf(s, &ret); +if (len != name_new_size) +return NULL; ret[len - 1] = 0; return ret; } else -- 2.25.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [REFUND-REQUEST]] VDD23 Travel
Nice to see you all after so long. My request is for my flights, 9750,00 CNY Beijing from/to Abu Dhabi, Abu Dhabi from/to Dublin Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1] avcodec/libaomdec: don't set aspect ratio when it's not yet known
Makes the output of the libaom av1 decoder consistent with external decoders like libdav1d. reference commit: 1652f2492f88434010053289d946dab6a57e4d58 Signed-off-by: Steven Liu --- libavcodec/libaomdec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c index 695d901051..ff4137bfc6 100644 --- a/libavcodec/libaomdec.c +++ b/libavcodec/libaomdec.c @@ -204,7 +204,6 @@ static int aom_decode(AVCodecContext *avctx, AVFrame *picture, picture->height * img->r_w, picture->width * img->r_h, INT_MAX); -ff_set_sar(avctx, picture->sample_aspect_ratio); if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == 8) ff_aom_image_copy_16_to_8(picture, img); -- 2.40.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v1] avcodec/libaomdec: don't set aspect ratio when it's not yet known
James Almer 于2023年10月8日 周日20:08写道: > On 10/8/2023 8:57 AM, Steven Liu wrote: > > Makes the output of the libaom av1 decoder consistent with external > decoders like > > libdav1d. > > > > reference commit: 1652f2492f88434010053289d946dab6a57e4d58 > > But it is known at this point. picture->sample_aspect_ratio is set > directly above. > > What needs to be done is initializing the decoder in aom_init() using > the extradata, so lavf will not attempt to decode frames in order to get > stream info, which is what i assume is happening here and why you want > SAR to be 0/1. i want fate pass > > > > > > Signed-off-by: Steven Liu > > --- > > libavcodec/libaomdec.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c > > index 695d901051..ff4137bfc6 100644 > > --- a/libavcodec/libaomdec.c > > +++ b/libavcodec/libaomdec.c > > @@ -204,7 +204,6 @@ static int aom_decode(AVCodecContext *avctx, AVFrame > *picture, > > picture->height * img->r_w, > > picture->width * img->r_h, > > INT_MAX); > > -ff_set_sar(avctx, picture->sample_aspect_ratio); > > > > if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == > 8) > > ff_aom_image_copy_16_to_8(picture, img); > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] libavformat/hlsenc: set HTTP options before writing WebVTT HLS playlists
Léon Spaans 于2023年10月7日周六 05:41写道: > > Fixes: Erroneous HTTP POST instead of HTTP PUT for WebVTT HLS variant > playlists. > > Signed-off-by: Léon Spaans > --- > libavformat/hlsenc.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 08f3746ce7..8f7eee202e 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -1580,7 +1580,9 @@ static int hls_window(AVFormatContext *s, int last, > VariantStream *vs) > > set_http_options(s, &options, hls); > snprintf(temp_filename, sizeof(temp_filename), use_temp_file ? "%s.tmp" : > "%s", vs->m3u8_name); > -if ((ret = hlsenc_io_open(s, byterange_mode ? &hls->m3u8_out : &vs->out, > temp_filename, &options)) < 0) { > +ret = hlsenc_io_open(s, byterange_mode ? &hls->m3u8_out : &vs->out, > temp_filename, &options); > +av_dict_free(&options); > +if (ret < 0) { > if (hls->ignore_io_errors) > ret = 0; > goto fail; > @@ -1635,8 +1637,11 @@ static int hls_window(AVFormatContext *s, int last, > VariantStream *vs) > ff_hls_write_end_list(byterange_mode ? hls->m3u8_out : vs->out); > > if (vs->vtt_m3u8_name) { > +set_http_options(vs->vtt_avf, &options, hls); > snprintf(temp_vtt_filename, sizeof(temp_vtt_filename), use_temp_file > ? "%s.tmp" : "%s", vs->vtt_m3u8_name); > -if ((ret = hlsenc_io_open(s, &hls->sub_m3u8_out, temp_vtt_filename, > &options)) < 0) { > +ret = hlsenc_io_open(s, &hls->sub_m3u8_out, temp_vtt_filename, > &options); > +av_dict_free(&options); > +if (ret < 0) { > if (hls->ignore_io_errors) > ret = 0; > goto fail; > -- > 2.40.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 3/3] doc: add spi.txt
Michael Niedermayer 于2023年10月12日周四 02:10写道: > > This explains how to request refunds and what can be funded by SPI > --- > doc/spi.txt | 50 ++ > 1 file changed, 50 insertions(+) > create mode 100644 doc/spi.txt > > diff --git a/doc/spi.txt b/doc/spi.txt > new file mode 100644 > index 00..7d85de8f09 > --- /dev/null > +++ b/doc/spi.txt > @@ -0,0 +1,50 @@ > +How to request refunds from SPI: > + > +Send a mail to ffmpeg-devel with [REFUND-REQUEST] in the subject > + > + > +What can be payed by SPI: > +- > +FFmpeg money collected at SPI can be used for any purpose which is OK by > +501(c)3 nonprofit rules, and within our mission (Free & OSS software). > + > +In practice we frequently payed for Travel and Hardware. > +For other things, it is recommanded to disscuss them beforehand > +on ffmpeg-devel and if the community agrees to fund them, also with > +SPI through stefano before starting with anything. > + > + > +Is it possible to fund active development by SPI: > +(the texts below have been taken from multiple > + replies FFmpeg has received from SPI, they have been edited > + so that "I" was replaced by "SPI" in some cases.) > +- > +Paying for development *does* require substantial > +additional paperwork, but it is not prohibitied. > + > +Several SPI projects pay contractors for development > +efforts. SPI needs a contract in place which describes the work to be > +done. There are also various things SPI needs to check (e.g. are they a > +US person or not, as with GSoC mentor payments; are they really a > +contractor and not a employee). > + > +SPI can't deal with employment at the moment because that involves a > +lot of work, like health insurance, tax withholding, etc. Contractors > +are easier because they have to take care of that themselves; Whether > +someone is a contractor vs employee depends on various factors (that > +of course are different in every country) and can be disputed (see > +e.g. the debate about whether Uber drivers are employees); SPI has a > +questionnaire about their circumstances.) > + > +Unfortunately, there's no one-size-fits all when dealing with contractors. > +As already mentioned, without knowing the contributor's country > + > +SPI does have templates, but they depend on the contractors country. If it's > +US, Australia, France and a couple others SPI could provide them next day, > +otherwise SPI would need to ask their attorney to draft one, which would > +take some time > + > +Also, SPI has two models, MSA (which transfers ownership) and CSA (which > +grants a license instead). SPI usually sends the MSA (it's better for most > +purposes), but for development purposes, some projects prefer that the > +contractor retain ownership rights. > -- > 2.17.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". This describe looks very clear. Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [REFUND-REQUEST]] VDD23 Travel
Stefano Sabatini 于2023年10月10日周二 14:09写道: Hi Stefano, > > On date Sunday 2023-10-08 10:09:03 +0800, Steven Liu wrote: > > Nice to see you all after so long. > > My request is for my flights, 9750,00 CNY Beijing from/to Abu Dhabi, > > Abu Dhabi from/to Dublin > > Approved on my side, pending Michael's approval. > > To get the refund, follow instructions here to generate a refund request: > https://www.spi-inc.org/treasurer/reimbursement-form/ > > When doing so, keep in mind that the XE Travel Expenses Calculator > service mentioned in step 2 is not active anymore - just attach the > receipts to the email. > > Then email it to: > treasu...@rt.spi-inc.org > > putting me and Michael in CC:, and adding the thread link from: CC Michael is ok, but CC your email get error response. > http://ffmpeg.org/pipermail/ffmpeg-devel/ > > Thanks. Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hls: use av_strlcopy instead of strncpy
Leo Izen 于2023年10月26日周四 11:14写道: > > Avoids a -Wstringop-truncation warning by using av_strlcopy instead of > strncpy. > > Signed-off-by: Leo Izen > --- > libavformat/hls.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index f5f549b24d..076f92ecfb 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -543,7 +543,7 @@ static struct rendition *new_rendition(HLSContext *c, > struct rendition_info *inf > int langlen = strlen(rend->language); > if (langlen < sizeof(rend->language) - 3) { > rend->language[langlen] = ','; > -strncpy(rend->language + langlen + 1, info->assoc_language, > +av_strlcpy(rend->language + langlen + 1, info->assoc_language, > sizeof(rend->language) - langlen - 2); > } > } > -- > 2.42.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for Audio
Dave Johansen 于2023年10月27日周五 09:44写道: > > --- > libavformat/dashenc.c | 3 ++- > libavformat/hlsenc.c | 8 +++- > libavformat/hlsplaylist.c | 5 - > libavformat/hlsplaylist.h | 2 +- > 4 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > index 96f4a5fbdf..15f700acbc 100644 > --- a/libavformat/dashenc.c > +++ b/libavformat/dashenc.c > @@ -1284,7 +1284,8 @@ static int write_manifest(AVFormatContext *s, int final) > continue; > get_hls_playlist_name(playlist_file, sizeof(playlist_file), > NULL, i); > ff_hls_write_audio_rendition(c->m3u8_out, audio_group, > - playlist_file, NULL, i, > is_default); > + playlist_file, NULL, i, > is_default, > + > s->streams[i]->codecpar->ch_layout.nb_channels); > max_audio_bitrate = FFMAX(st->codecpar->bit_rate + >os->muxer_overhead, > max_audio_bitrate); > if (!av_strnstr(audio_codec_str, os->codec_str, > sizeof(audio_codec_str))) { > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 4ef84c05c1..7dfb8d0a9f 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -1386,6 +1386,7 @@ static int create_master_playlist(AVFormatContext *s, > int is_file_proto = proto && !strcmp(proto, "file"); > int use_temp_file = is_file_proto && ((hls->flags & HLS_TEMP_FILE) || > hls->master_publish_rate); > char temp_filename[MAX_URL_SIZE]; > +int nb_channels; > > input_vs->m3u8_created = 1; > if (!hls->master_m3u8_created) { > @@ -1434,8 +1435,13 @@ static int create_master_playlist(AVFormatContext *s, > av_log(s, AV_LOG_ERROR, "Unable to find relative URL\n"); > goto fail; > } > +nb_channels = 0; > +for (j = 0; j < vs->nb_streams; j++) > +if (vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) > +if (vs->streams[j]->codecpar->ch_layout.nb_channels > > nb_channels) > +nb_channels = > vs->streams[j]->codecpar->ch_layout.nb_channels; > > -ff_hls_write_audio_rendition(hls->m3u8_out, vs->agroup, > m3u8_rel_name, vs->language, i, hls->has_default_key ? vs->is_default : 1); > +ff_hls_write_audio_rendition(hls->m3u8_out, vs->agroup, > m3u8_rel_name, vs->language, i, hls->has_default_key ? vs->is_default : 1, > nb_channels); > } > > /* For variant streams with video add #EXT-X-STREAM-INF tag with > attributes*/ > diff --git a/libavformat/hlsplaylist.c b/libavformat/hlsplaylist.c > index 2bf05f3c7c..4f35d0388f 100644 > --- a/libavformat/hlsplaylist.c > +++ b/libavformat/hlsplaylist.c > @@ -39,7 +39,7 @@ void ff_hls_write_playlist_version(AVIOContext *out, int > version) > > void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, >const char *filename, const char *language, > - int name_id, int is_default) > + int name_id, int is_default, int > nb_channels) > { > if (!out || !agroup || !filename) > return; > @@ -49,6 +49,9 @@ void ff_hls_write_audio_rendition(AVIOContext *out, const > char *agroup, > if (language) { > avio_printf(out, "LANGUAGE=\"%s\",", language); > } > +if (nb_channels) { > +avio_printf(out, "CHANNELS=\"%d\",", nb_channels); > +} > avio_printf(out, "URI=\"%s\"\n", filename); > } > > diff --git a/libavformat/hlsplaylist.h b/libavformat/hlsplaylist.h > index 1928fe787d..c2744c227c 100644 > --- a/libavformat/hlsplaylist.h > +++ b/libavformat/hlsplaylist.h > @@ -38,7 +38,7 @@ typedef enum { > void ff_hls_write_playlist_version(AVIOContext *out, int version); > void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, >const char *filename, const char *language, > - int name_id, int is_default); > + int name_id, int is_default, int > nb_channels); > void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, > const char *filename, const char > *language, > int name_id, int is_default); > -- > 2.39.2 (Apple Git-143) > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for Audio
David Johansen 于2023年10月27日周五 12:03写道: > > > > > LGTM > > > > > > Thanks > > Steven > > > > I'm new to ffmpeg development so what's the process for this to be merged? > Do I need to do something or is it taken care of by a different > process/someone else? Nothing, just leave enough time for more developers review, and will push this if no more comments. Don't worry David, this is valuable patch, you did a great job. > > Thanks, > Dave > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 3/4] avformat/hlsenc: Fix name of flag in error message
Dave Johansen 于2023年10月27日周五 12:00写道: > > --- > libavformat/hlsenc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 24a0304f78..93c47b631b 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -1013,7 +1013,7 @@ static int sls_flags_filename_process(struct > AVFormatContext *s, HLSContext *hls > 't', (int64_t)round(duration * > HLS_MICROSECOND_UNIT)) < 1) { > av_log(hls, AV_LOG_ERROR, > "Invalid second level segment filename template '%s', > " > - "you can try to remove second_level_segment_time > flag\n", > + "you can try to remove second_level_segment_duration > flag\n", > vs->avf->url); > av_freep(&filename); > return AVERROR(EINVAL); > @@ -1106,7 +1106,7 @@ static int > sls_flag_use_localtime_filename(AVFormatContext *oc, HLSContext *c, V > char *filename = NULL; > if (replace_int_data_in_filename(&filename, oc->url, 't', 0) < > 1) { > av_log(c, AV_LOG_ERROR, "Invalid second level segment > filename template '%s', " > -"you can try to remove second_level_segment_time > flag\n", > +"you can try to remove second_level_segment_duration > flag\n", > oc->url); > av_freep(&filename); > return AVERROR(EINVAL); > -- > 2.39.2 (Apple Git-143) > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Good catch Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [RFC] financial sustainability Plan A (SPI)
Thilo Borgmann via ffmpeg-devel 于2023年11月1日周三 08:04写道: > > > it would just show up once lets say on a specific day 1 year after the code > > is added. we would remove it on that day ourselfs. > > It would just be a simple one time shown message that says > > "Decoded by ffmpeg.org / Please donate, if you enjoy" > > Just my two cents and I admit I only flew over the last few mails. > Some visual output into the decoded streams or things alike (IIUC) should be a > nogo. Immediate memories about bad pirated movies comes to mind... so if this > is > the idea, we should really not do this, especially not (IIUC) if it would > occur > pseudo-randomly based on some time constraint. Agreed, i think show message about donation above or after banner is a good idea looks like vim. “ Help poor children in Uganda!” => “ Help poor developers in FFmpeg!” Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [RFC] Release 6.1
Tristan Matthews 于2023年11月8日周三 00:47写道: > > On Tue, Nov 7, 2023 at 2:36 AM Lynne wrote: > > > > Oct 29, 2023, 06:57 by d...@lynne.ee: > > > > > Oct 29, 2023, 05:51 by mich...@niedermayer.cc: > > > > > >> On Sat, Oct 28, 2023 at 09:23:45PM +0200, Lynne wrote: > > >> > > >>> Oct 28, 2023, 18:49 by mich...@niedermayer.cc: > > >>> > > >>> > On Thu, Jul 06, 2023 at 06:04:41PM +0200, Lynne wrote: > > >>> > > > >>> >> It's been a while since we've had a release, and we've had > > >>> >> a lot of new features in. > > >>> >> We did say we would make releases more often, and I think > > >>> >> it's about time we have a new release. > > >>> >> > > >>> >> Anything anyone wants to have merged or should we branch > > >>> >> off 6.1 in a few days? > > >>> >> > > >>> > > > >>> > Whats the status of this ? > > >>> > I can branch 6.1 anytime > > >>> > > > >>> > It was just that jb told me > > >>> > "6.1 opportunity is gone. > > >>> > We're too late on the schedule, and noone had time to work on it, so > > >>> > it is wiser to target 7.0 in January" > > >>> > > > >>> > but now i see on IRC > > >>> > make a damn release already > > >>> > j-b: drop MiNi from release maintership and nominate > > >>> > Lynne > > >>> > I pledge to bring back /slap IRC messages to those who fail > > >>> > to push the patches they want for release! > > >>> > durandal_1707: good point, we should look at doing another > > >>> > 5.1.x release and a 6.0.x release. > > >>> > > > >>> > noone mentioned 5.1.x and 6.0.x to me before > > >>> > > > >>> > anyway, ill try to make releases from all maintained branches, > > >>> > > > >>> > and will branch 6.1 as soon as Lynne or others say everything is > > >>> > ready. > > >>> > > > >>> > thx > > >>> > > > >>> > > >>> It's never too late to make a release. If we do a release now, > > >>> nothing's stopping > > >>> us from doing a 7.0 and getting back on track with releases every two > > >>> months or so, > > >>> like the plan was. > > >>> > > >>> 7.0 is likely to be a pretty big release, with YUVJ removal, (xHE) > > >>> AAC+fixes, D3D12 hwdec, > > >>> Vulkan encode and Vulkan AV1, and VVC, and IAMF, and MLP work, so it's > > >>> a good idea to > > >>> have a release before all this lands. > > >>> > > >>> I think the tree is in a pretty good state ATM, you should go ahead and > > >>> branch if you're > > >>> comfortable with it as well. > > >>> > > >> > > >> branch made > > >> > > > > > > Thanks. I'll get a blog post ready for the transform work, as kierank > > > wanted to post something, > > > and if users can know to who to point fingers to in case it degrades > > > performance on RPI1 devices. > > > > > > > > >>> Let's aim for a release by Sunday next week. That should give everyone > > >>> enough time to > > >>> backport fixes they want in. > > >>> > > >> > > >> I would aim for 1-3 weeks (when code and developers are ready) > > >> dont want to aim for a specific day, better pick a day when everything > > >> is fine > > >> not too many distractions, ... > > >> > > >> Or is there something that favors us to be before a specific date ? > > >> > > > > > > Not really a reason, Sunday is just an optimistic date to aim for. > > > If there are no big fixes to backport to the branch, I think we can > > > target it. > > > > > > > The nlmeans_vulkan patch I just sent is the last patch I'd like to have in > > 6.1. > > Does anyone else have any patches they would like in 6.1? > > I was going to request Steven Liu's enhanced RTMP set but it looks > like those are already in the release/6.1 branch, so cheers. :-) Thanks ttmath > > -t Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [RFC] Release 6.1
Steven Liu 于2023年11月8日周三 09:26写道: > > Tristan Matthews 于2023年11月8日周三 00:47写道: > > > > On Tue, Nov 7, 2023 at 2:36 AM Lynne wrote: > > > > > > Oct 29, 2023, 06:57 by d...@lynne.ee: > > > > > > > Oct 29, 2023, 05:51 by mich...@niedermayer.cc: > > > > > > > >> On Sat, Oct 28, 2023 at 09:23:45PM +0200, Lynne wrote: > > > >> > > > >>> Oct 28, 2023, 18:49 by mich...@niedermayer.cc: > > > >>> > > > >>> > On Thu, Jul 06, 2023 at 06:04:41PM +0200, Lynne wrote: > > > >>> > > > > >>> >> It's been a while since we've had a release, and we've had > > > >>> >> a lot of new features in. > > > >>> >> We did say we would make releases more often, and I think > > > >>> >> it's about time we have a new release. > > > >>> >> > > > >>> >> Anything anyone wants to have merged or should we branch > > > >>> >> off 6.1 in a few days? > > > >>> >> > > > >>> > > > > >>> > Whats the status of this ? > > > >>> > I can branch 6.1 anytime > > > >>> > > > > >>> > It was just that jb told me > > > >>> > "6.1 opportunity is gone. > > > >>> > We're too late on the schedule, and noone had time to work on it, > > > >>> > so it is wiser to target 7.0 in January" > > > >>> > > > > >>> > but now i see on IRC > > > >>> > make a damn release already > > > >>> > j-b: drop MiNi from release maintership and > > > >>> > nominate Lynne > > > >>> > I pledge to bring back /slap IRC messages to those who fail > > > >>> > to push the patches they want for release! > > > >>> > durandal_1707: good point, we should look at doing another > > > >>> > 5.1.x release and a 6.0.x release. > > > >>> > > > > >>> > noone mentioned 5.1.x and 6.0.x to me before > > > >>> > > > > >>> > anyway, ill try to make releases from all maintained branches, > > > >>> > > > > >>> > and will branch 6.1 as soon as Lynne or others say everything is > > > >>> > ready. > > > >>> > > > > >>> > thx > > > >>> > > > > >>> > > > >>> It's never too late to make a release. If we do a release now, > > > >>> nothing's stopping > > > >>> us from doing a 7.0 and getting back on track with releases every two > > > >>> months or so, > > > >>> like the plan was. > > > >>> > > > >>> 7.0 is likely to be a pretty big release, with YUVJ removal, (xHE) > > > >>> AAC+fixes, D3D12 hwdec, > > > >>> Vulkan encode and Vulkan AV1, and VVC, and IAMF, and MLP work, so > > > >>> it's a good idea to > > > >>> have a release before all this lands. > > > >>> > > > >>> I think the tree is in a pretty good state ATM, you should go ahead > > > >>> and branch if you're > > > >>> comfortable with it as well. > > > >>> > > > >> > > > >> branch made > > > >> > > > > > > > > Thanks. I'll get a blog post ready for the transform work, as kierank > > > > wanted to post something, > > > > and if users can know to who to point fingers to in case it degrades > > > > performance on RPI1 devices. > > > > > > > > > > > >>> Let's aim for a release by Sunday next week. That should give > > > >>> everyone enough time to > > > >>> backport fixes they want in. > > > >>> > > > >> > > > >> I would aim for 1-3 weeks (when code and developers are ready) > > > >> dont want to aim for a specific day, better pick a day when everything > > > >> is fine > > > >> not too many distractions, ... > > > >> > > > >> Or is there something that favors us to be before a specific date ? > > > >> > > > > > > > > Not really a reason, Sunday is just an optimistic date to aim for. > > > > If there are no big fixes to backport to the branch, I think we can > > > > target it. > > > > > > > > > > The nlmeans_vulkan patch I just sent is the last patch I'd like to have > > > in 6.1. > > > Does anyone else have any patches they would like in 6.1? > > > > I was going to request Steven Liu's enhanced RTMP set but it looks > > like those are already in the release/6.1 branch, so cheers. > :-) Thanks ttmath s/ttmath/tmatth/g > > > > -t > > Thanks > Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for Audio
David Johansen 于2023年11月9日周四 07:47写道: > > On Fri, Oct 27, 2023 at 1:33 AM Steven Liu wrote: > > > David Johansen 于2023年10月27日周五 12:03写道: > > > > > > > > > > > LGTM > > > > > > > > > > > > Thanks > > > > Steven > > > > > > > > > > I'm new to ffmpeg development so what's the process for this to be > > merged? > > > Do I need to do something or is it taken care of by a different > > > process/someone else? > > > > Nothing, just leave enough time for more developers review, and will > > push this if no more comments. > > Don't worry David, this is valuable patch, you did a great job. > > > > I submitted a handful of patches and I believe I've addressed all of > the feedback I've seen, so is there anything I need to do to follow up on > them and get them merged? Will apply this patch after 24 hours if there have no more comments. > > Thanks, > Dave Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/hlsenc: remove unnessecery av_dict_free operations
The option will be freed at the end of the hls_window function, And will go to fail label call av_dict_free if every open operation return failed. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 7049956dd7..27f558abd4 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1588,7 +1588,6 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) set_http_options(s, &options, hls); snprintf(temp_filename, sizeof(temp_filename), use_temp_file ? "%s.tmp" : "%s", vs->m3u8_name); ret = hlsenc_io_open(s, byterange_mode ? &hls->m3u8_out : &vs->out, temp_filename, &options); -av_dict_free(&options); if (ret < 0) { if (hls->ignore_io_errors) ret = 0; @@ -1647,7 +1646,6 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) set_http_options(vs->vtt_avf, &options, hls); snprintf(temp_vtt_filename, sizeof(temp_vtt_filename), use_temp_file ? "%s.tmp" : "%s", vs->vtt_m3u8_name); ret = hlsenc_io_open(s, &hls->sub_m3u8_out, temp_vtt_filename, &options); -av_dict_free(&options); if (ret < 0) { if (hls->ignore_io_errors) ret = 0; -- 2.39.3 (Apple Git-145) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avformat/flvenc: add extract_extradata bsf for new video codecs
> 在 2023年11月18日,16:03,Zhao Zhili 写道: > > From: Zhao Zhili > > When encoders don't support global header like MediaCodec, FLV > muxer needs to add extract_extradata bsf automatically. The codec > list doesn't include VP9 since it's not supported by > extract_extradata. > > Signed-off-by: Zhao Zhili > --- > libavformat/flvenc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c > index f6d10f331c..874560fac1 100644 > --- a/libavformat/flvenc.c > +++ b/libavformat/flvenc.c > @@ -1072,6 +1072,8 @@ static int flv_check_bitstream(AVFormatContext *s, > AVStream *st, > } > if (!st->codecpar->extradata_size && > (st->codecpar->codec_id == AV_CODEC_ID_H264 || > + st->codecpar->codec_id == AV_CODEC_ID_HEVC || > + st->codecpar->codec_id == AV_CODEC_ID_AV1 || > st->codecpar->codec_id == AV_CODEC_ID_MPEG4)) > return ff_stream_add_bitstream_filter(st, "extract_extradata", NULL); > return 1; > -- > 2.34.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [ANNOUNCE] upcoming vote: TC/CC elections
Anton Khirnov 于2023年12月5日周二 18:07写道: > > Hi all, > Both elections have now concluded. > > We have 36 votes for the CC election (70% turnout) and 38 votes for TC > (75% turnout); raw votes in CSV format are attached. > > The CC members now are: > * James Almer > * Jean-Baptiste Kempf > * Anton Khirnov > * Ronald Bultje > * Michael Niedermayer > > For TC, it seems that we have a tie. The system reports two winning > sets, both of which contain: > * Michael Niedermayer > * Martin Storsjö > * Mark Thompson > * Anton Khirnov > > The final member is Jan Ekström in one set and Niklas Haas in the other. > We should now consider how to break this tie. Some options suggested on > IRC were: > * expand the committee +1 at this time Thanks ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395
Evgeniy Pantyuhin via ffmpeg-devel 于2023年12月7日周四 04:32写道: > > Signed-off-by: Evgeniy > --- > libavformat/dashdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 29d4680..36e4719 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -768,7 +768,7 @@ static int resolve_content_path(AVFormatContext *s, const > char *url, int *max_ur > baseurl = xmlNodeGetContent(node); > root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path; > if (node) { > -xmlNodeSetContent(node, root_url); > +xmlNodeSetContent(node, xmlEncodeEntitiesReentrant(NULL, root_url)); > updated = 1; > } > > -- > 2.40.0.windows.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1 1/2] lavf/flvdec: add AMF date type support
> 在 2019年3月26日,19:04,Jun Zhao 写道: > > From: Jun Zhao > > Support AMF date type when parse the FLV metadata. > > Signed-off-by: Jun Zhao > --- > libavformat/flvdec.c | 24 ++-- > 1 files changed, 22 insertions(+), 2 deletions(-) > > diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c > index c4d5278..b1e13da 100644 > --- a/libavformat/flvdec.c > +++ b/libavformat/flvdec.c > @@ -30,6 +30,7 @@ > #include "libavutil/opt.h" > #include "libavutil/intfloat.h" > #include "libavutil/mathematics.h" > +#include "libavutil/time_internal.h" > #include "libavcodec/bytestream.h" > #include "libavcodec/mpeg4audio.h" > #include "avformat.h" > @@ -77,6 +78,12 @@ typedef struct FLVContext { > int64_t time_pos; > } FLVContext; > > +/* AMF date type */ > +typedef struct amf_date { > +double milliseconds; > +int16_t timezone; > +} amf_date; > + > static int probe(const AVProbeData *p, int live) > { > const uint8_t *d = p->buf; > @@ -471,6 +478,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream > *astream, > AMFDataType amf_type; > char str_val[1024]; > double num_val; > +amf_date date; > > num_val = 0; > ioc = s->pb; > @@ -542,7 +550,9 @@ static int amf_parse_object(AVFormatContext *s, AVStream > *astream, > } > break; > case AMF_DATA_TYPE_DATE: > -avio_skip(ioc, 8 + 2); // timestamp (double) and UTC offset (int16) > +// timestamp (double) and UTC offset (int16) > +date.milliseconds = av_int2double(avio_rb64(ioc)); > +date.timezone = avio_rb16(ioc); > break; > default:// unsupported type, we couldn't skip > av_log(s, AV_LOG_ERROR, "unsupported amf type %d\n", amf_type); > @@ -641,8 +651,18 @@ static int amf_parse_object(AVFormatContext *s, AVStream > *astream, > } else if (amf_type == AMF_DATA_TYPE_NUMBER) { > snprintf(str_val, sizeof(str_val), "%.f", num_val); > av_dict_set(&s->metadata, key, str_val, 0); > -} else if (amf_type == AMF_DATA_TYPE_STRING) > +} else if (amf_type == AMF_DATA_TYPE_STRING) { > av_dict_set(&s->metadata, key, str_val, 0); > +} else if (amf_type == AMF_DATA_TYPE_DATE) { > +time_t time; > +struct tm t; > +char datestr[128]; > +time = date.milliseconds / 1000; // to seconds > +localtime_r(&time, &t); > +strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S %z", > &t); > + > +av_dict_set(&s->metadata, key, datestr, 0); > +} > } > > return 0; > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/hls: make different warning message between open url and parse playlist
Signed-off-by: Steven Liu --- libavformat/hls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 4e38d25678..f4e449880b 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -658,7 +658,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, } else if (ret < 0) { if (ret != AVERROR_EOF) av_log(s, AV_LOG_WARNING, -"keepalive request failed for '%s', retrying with new connection: %s\n", +"keepalive request failed for '%s' when opening url, retrying with new connection: %s\n", url, av_err2str(ret)); ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp); } @@ -715,7 +715,7 @@ static int parse_playlist(HLSContext *c, const char *url, } else if (ret < 0) { if (ret != AVERROR_EOF) av_log(c->ctx, AV_LOG_WARNING, -"keepalive request failed for '%s', retrying with new connection: %s\n", +"keepalive request failed for '%s' when parsing playlist, retrying with new connection: %s\n", url, av_err2str(ret)); in = NULL; } -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] Added XV Support
>+.long_name = NULL_IF_CONFIG_SMALL("Xunlie Video File"), The this should .long_name = NULL_IF_CONFIG_SMALL("Xunlei Video File”), or .long_name = NULL_IF_CONFIG_SMALL(“Xunlei(Thunder) Video File”), Xunlei is Chinese PinYin[pi:n, yi:n]. Application is Thunder.app > 在 2019年4月7日,14:53,Shivam Goyal 写道: > > Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] libavformat/udp: add options send_pkt_size for udp over ip, for ts over ip, this value must be 1316(7*188)
> 在 2019年4月8日,23:42,edward_email 写道: > > From: “Edward.Wu” <“edward_em...@126.com”> > > Signed-off-by: “Edward.Wu” <“edward_em...@126.com”> > — Document please. > libavformat/udp.c | 45 - > 1 file changed, 44 insertions(+), 1 deletion(-) > > diff --git a/libavformat/udp.c b/libavformat/udp.c > index cf73d331e0..7563b671fe 100644 > --- a/libavformat/udp.c > +++ b/libavformat/udp.c > @@ -73,6 +73,7 @@ > #define UDP_TX_BUF_SIZE 32768 > #define UDP_MAX_PKT_SIZE 65536 > #define UDP_HEADER_SIZE 8 > +#define UDP_PACKET_MAX 1472 > > typedef struct UDPContext { > const AVClass *class; > @@ -81,6 +82,9 @@ typedef struct UDPContext { > int udplite_coverage; > int buffer_size; > int pkt_size; > +int send_pkt_size; > +uint8_t send_pkt_buf[UDP_PACKET_MAX]; > +int cur_send_pkt_len; > int is_multicast; > int is_broadcast; > int local_port; > @@ -125,6 +129,7 @@ static const AVOption options[] = { > { "localaddr", "Local address", > OFFSET(localaddr), AV_OPT_TYPE_STRING, { .str = NULL }, > .flags = D|E }, > { "udplite_coverage", "choose UDPLite head size which should be validated > by checksum", OFFSET(udplite_coverage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, > INT_MAX, D|E }, > { "pkt_size", "Maximum UDP packet size", > OFFSET(pkt_size), AV_OPT_TYPE_INT,{ .i64 = 1472 }, -1, INT_MAX, > .flags = D|E }, > +{ "send_pkt_size", "Send UDP packet size, ts over ip must be 1316", > OFFSET(send_pkt_size), AV_OPT_TYPE_INT,{ .i64 = 0 }, -1, 1472, .flags = > D|E }, > { "reuse", "explicitly allow reusing UDP sockets", > OFFSET(reuse_socket), AV_OPT_TYPE_BOOL, { .i64 = -1 },-1, 1, > D|E }, > { "reuse_socket", "explicitly allow reusing UDP sockets", > OFFSET(reuse_socket), AV_OPT_TYPE_BOOL, { .i64 = -1 },-1, 1, > .flags = D|E }, > { "broadcast", "explicitly allow or disallow broadcast destination", > OFFSET(is_broadcast), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E > }, > @@ -390,6 +395,7 @@ static int udp_port(struct sockaddr_storage *addr, int > addr_len) > * option: 'ttl=n' : set the ttl value (for multicast only) > * 'localport=n' : set the local port > * 'pkt_size=n' : set max packet size > + * 'send_pkt_size=n' : set send packet size > * 'reuse=1' : enable reusing the socket > * 'overrun_nonfatal=1': survive in case of circular buffer overrun > * > @@ -683,6 +689,13 @@ static int udp_open(URLContext *h, const char *uri, int > flags) > if (av_find_info_tag(buf, sizeof(buf), "pkt_size", p)) { > s->pkt_size = strtol(buf, NULL, 10); > } > +if (av_find_info_tag(buf, sizeof(buf), "send_pkt_size", p)) { > +s->send_pkt_size = strtol(buf, NULL, 10); > +if (s->send_pkt_size > UDP_PACKET_MAX) {//UDP max > +av_log(h, AV_LOG_WARNING, "send_pkt_size is %s, bigger than > %d, set as %d.\n", buf, UDP_PACKET_MAX, UDP_PACKET_MAX); > +s->send_pkt_size = UDP_PACKET_MAX; > +} > +} > if (av_find_info_tag(buf, sizeof(buf), "buffer_size", p)) { > s->buffer_size = strtol(buf, NULL, 10); > } > @@ -1001,7 +1014,8 @@ static int udp_read(URLContext *h, uint8_t *buf, int > size) > return ret; > } > > -static int udp_write(URLContext *h, const uint8_t *buf, int size) > + > +static int udp_write_internal(URLContext *h, const uint8_t *buf, int size) > { > UDPContext *s = h->priv_data; > int ret; > @@ -1050,6 +1064,35 @@ static int udp_write(URLContext *h, const uint8_t > *buf, int size) > > return ret < 0 ? ff_neterrno() : ret; > } > +static int udp_write(URLContext *h, const uint8_t *buf, int size) > +{ > +UDPContext *s = h->priv_data; > +int copied = 0; > +int capacity = 0; > +uint8_t * p = NULL; uint8_t *p = NULL; > +uint8_t * p_end = NULL; uint8_t *p_end = NULL; > +int re = 0; What about change re to ret? > + > +if (s->send_pkt_size == 0) { > +return udp_write_internal(h, buf, size); > +} else { > +p = (uint8_t*)buf; > +p_end = p + size; > +while (p < p_end) { > +if ( s->cur_send_pkt_len >= s->send_pkt_size ){ > +re += udp_write_internal(h, s->send_pkt_buf, > s->cur_send_pkt_len); Maybe you want check the return value of the udp_write_internal? What do you want to use when the re + the value of udp_write_internal result? > +s->cur_send_pkt_len = 0; > +} > + > +capacity = s->send_pkt_size - s->cur_send_pkt_len; > +copied = capacity > (p_end - p) ? (p_end - p) : capacity; > +memcpy(s->send_pkt_buf + s->cur_send_pkt_len, p, copied); > +p += copied; > +s->cur_send_pkt_
[FFmpeg-devel] [PATCH] avformat/hlsenc: flush packets before update split message
fix ticket: 7831 Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 5f9a200c6e..6b913be31c 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2241,6 +2241,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) new_start_pos = avio_tell(vs->avf->pb); if (hls->segment_type != SEGMENT_TYPE_FMP4) { +avio_flush(oc->pb); vs->size = new_start_pos - vs->start_pos; } else { vs->size = new_start_pos; -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [Patch v4] flv: Add XV (Xunlie Video) Support, Updated patch for ticket #3720
maybe title should change from flv: Add XV (Xunlie Video) Support, Updated patch for ticket #3720 to flv: Add XV (Xunlei Video) Support, Updated patch for ticket #3720 Shivam Goyal 于2019年4月9日周二 下午5:36写道: > > flv: Add XV (Xunlie Video) Support. > > Updated patch for ticket #3720. > > > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [Patch v4] flv: Add XV (Xunlie Video) Support, Updated patch for ticket #3720
Steven Liu 于2019年4月9日周二 下午5:46写道: > > maybe title should change from > flv: Add XV (Xunlie Video) Support, Updated patch for ticket #3720 > to > flv: Add XV (Xunlei Video) Support, Updated patch for ticket #3720 Ignore my comment please, the attachment file is correct. > > Shivam Goyal 于2019年4月9日周二 下午5:36写道: > > > > flv: Add XV (Xunlie Video) Support. > > > > Updated patch for ticket #3720. > > > > > > > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1 1/2] lavf/hls: Cleanup the applehttp
> 在 2019年4月12日,19:20,Jun Zhao 写道: > > From: Jun Zhao > > Cleanup the applehttp as demuxer name, when use the command : > > ffmpeg -formats, get the confused information like: > " > E hls Apple HTTP Live Streaming > D hls,applehttp Apple HTTP Live Streaming > " > we don't use applehttp as the demuxer/muxer name usually, so > cleanup the applehttp and update the documents. > > After the change, get the information from "ffmpeg -formats": > " > DE hls Apple HTTP Live Streaming > " > > Signed-off-by: Jun Zhao > --- > doc/demuxers.texi | 20 +--- > libavformat/hls.c |4 ++-- > 2 files changed, 11 insertions(+), 13 deletions(-) > > diff --git a/doc/demuxers.texi b/doc/demuxers.texi > index 2b0b37b..57d1532 100644 > --- a/doc/demuxers.texi > +++ b/doc/demuxers.texi > @@ -25,17 +25,6 @@ Audible Format 2, 3, and 4 demuxer. > > This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files. > > -@section applehttp > - > -Apple HTTP Live Streaming demuxer. > - > -This demuxer presents all AVStreams from all variant streams. > -The id field is set to the bitrate variant index number. By setting > -the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), > -the caller can decide which variant streams to actually receive. > -The total bitrate of the variant that the stream belongs to is > -available in a metadata key named "variant_bitrate". > - > @section apng > > Animated Portable Network Graphics demuxer. > @@ -320,6 +309,15 @@ infinitely. > > HLS demuxer > > +Apple HTTP Live Streaming demuxer. > + > +This demuxer presents all AVStreams from all variant streams. > +The id field is set to the bitrate variant index number. By setting > +the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), > +the caller can decide which variant streams to actually receive. > +The total bitrate of the variant that the stream belongs to is > +available in a metadata key named "variant_bitrate". > + > It accepts the following options: > > @table @option > diff --git a/libavformat/hls.c b/libavformat/hls.c > index f4e4498..1b61b4b 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -2318,14 +2318,14 @@ static const AVOption hls_options[] = { > }; > > static const AVClass hls_class = { > -.class_name = "hls,applehttp", > +.class_name = "hls demuxer", > .item_name = av_default_item_name, > .option = hls_options, > .version= LIBAVUTIL_VERSION_INT, > }; > > AVInputFormat ff_hls_demuxer = { > -.name = "hls,applehttp", > +.name = "hls", > .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"), > .priv_class = &hls_class, > .priv_data_size = sizeof(HLSContext), > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] tests/fate: add fate-hls-segment-size for hls_segment_size test
Signed-off-by: Steven Liu --- tests/fate/hlsenc.mak | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/fate/hlsenc.mak b/tests/fate/hlsenc.mak index 80536239fc..489d47b888 100644 --- a/tests/fate/hlsenc.mak +++ b/tests/fate/hlsenc.mak @@ -41,3 +41,14 @@ fate-hls-live-endlist: CMD = md5 -i $(SRC) -af hdcd=process_stereo=false -t 20 - fate-hls-live-endlist: CMP = oneline fate-hls-live-endlist: REF = e189ce781d9c87882f58e3929455167b +tests/data/hls_segment_size.m3u8: TAG = GEN +tests/data/hls_segment_size.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ + -f lavfi -i "aevalsrc=cos(2*PI*t)*sin(2*PI*(440+4*t)*t):d=20" -f hls -hls_segment_size 30 -map 0 \ + -hls_list_size 0 -codec:a mp2fixed -hls_segment_filename $(TARGET_PATH)/tests/data/live_endlist_%d.ts \ + $(TARGET_PATH)/tests/data/hls_segment_size.m3u8 2>/dev/null + +FATE_AFILTER-$(call ALLYES, HLS_DEMUXER MPEGTS_MUXER MPEGTS_DEMUXER AEVALSRC_FILTER LAVFI_INDEV MP2FIXED_ENCODER) += fate-hls-segment-size +fate-hls-segment-size: tests/data/hls_segment_size.m3u8 +fate-hls-segment-size: CMD = framecrc -flags +bitexact -i $(TARGET_PATH)/tests/data/hls_segment_size.m3u8 -vf setpts=N*23 + -- 2.15.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/dashdec: add ProgramInformation parser
Signed-off-by: Steven Liu --- libavformat/dashdec.c | 32 1 file changed, 32 insertions(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index eed149cd1a..b6394403b9 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1161,6 +1161,36 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url, return 0; } +static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) +{ +xmlNodePtr programinfo_node = NULL; +xmlChar *val = NULL; +DASHContext *c = s->priv_data; + +programinfo_node = xmlFirstElementChild(node); +while (programinfo_node) { +if (!av_strcasecmp((const char *)programinfo_node->name, (const char *)"Title")) { +val = xmlNodeGetContent(programinfo_node); +if (val && strlen(val) < 1024) { +av_dict_set(&s->metadata, "Title", val, 0); +} +} else if (!av_strcasecmp((const char *)programinfo_node->name, (const char *)"Source")) { +val = xmlNodeGetContent(programinfo_node); +if (val && strlen(val) < 1024) { +av_dict_set(&s->metadata, "Source", val, 0); +} +} else if (!av_strcasecmp((const char *)programinfo_node->name, (const char *)"Copyright")) { +val = xmlNodeGetContent(programinfo_node); +if (val && strlen(val) < 1024) { +av_dict_set(&s->metadata, "Copyright", val, 0); +} +} +programinfo_node = xmlNextElementSibling(programinfo_node); +xmlFree(val); +} +return 0; +} + static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in) { DASHContext *c = s->priv_data; @@ -1310,6 +1340,8 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in) if (c->period_start > 0) c->media_presentation_duration = c->period_duration; } +} else if (!av_strcasecmp(node->name, (const char *)"ProgramInformation")) { +parse_programinformation(s, node); } node = xmlNextElementSibling(node); } -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] avformat/dashdec: add ProgramInformation parser
Signed-off-by: Steven Liu --- libavformat/dashdec.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index eed149cd1a..6e3e7e4f1e 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1161,6 +1161,34 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url, return 0; } +static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) +{ +xmlChar *val = NULL; + +node = xmlFirstElementChild(node); +while (node) { +if (!av_strcasecmp(node->name, "Title")) { +val = xmlNodeGetContent(node); +if (val) { +av_dict_set(&s->metadata, "Title", val, 0); +} +} else if (!av_strcasecmp(node->name, "Source")) { +val = xmlNodeGetContent(node); +if (val) { +av_dict_set(&s->metadata, "Source", val, 0); +} +} else if (!av_strcasecmp(node->name, "Copyright")) { +val = xmlNodeGetContent(node); +if (val) { +av_dict_set(&s->metadata, "Copyright", val, 0); +} +} +node = xmlNextElementSibling(node); +xmlFree(val); +} +return 0; +} + static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in) { DASHContext *c = s->priv_data; @@ -1310,6 +1338,8 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in) if (c->period_start > 0) c->media_presentation_duration = c->period_duration; } +} else if (!av_strcasecmp(node->name, "ProgramInformation")) { +parse_programinformation(s, node); } node = xmlNextElementSibling(node); } -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/dashdec: add ProgramInformation parser
Carl Eugen Hoyos 于2019年4月15日周一 下午6:59写道: > > 2019-04-15 8:26 GMT+02:00, Steven Liu : > > Signed-off-by: Steven Liu > > --- > > libavformat/dashdec.c | 32 > > 1 file changed, 32 insertions(+) > > > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > > index eed149cd1a..b6394403b9 100644 > > --- a/libavformat/dashdec.c > > +++ b/libavformat/dashdec.c > > @@ -1161,6 +1161,36 @@ static int > > parse_manifest_adaptationset(AVFormatContext *s, const char *url, > > return 0; > > } > > > > +static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) > > +{ > > +xmlNodePtr programinfo_node = NULL; > > +xmlChar *val = NULL; > > > +DASHContext *c = s->priv_data; > > Unused variable. > > > + > > +programinfo_node = xmlFirstElementChild(node); > > +while (programinfo_node) { > > > +if (!av_strcasecmp((const char *)programinfo_node->name, > > Unneeded cast. > > > (const char *)"Title")) { > > Unneeded cast. > Ok, will update new version. Thanks Carl ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] lavf/rtsp.c: Fix stimeout option not applied on http tunnel
Carl Eugen Hoyos 于2019年4月15日周一 下午6:46写道: > > 2019-04-15 9:42 GMT+02:00, Liu Steven : > > > > > >> 在 2019年4月11日,下午12:03,Liu Steven 写道: > >> > >> > >> > >>> 在 2019年4月11日,上午11:55,Jun Li 写道: > >>> ... > >>> > >>> Ping. > >> LGTM > > > > Pushed > > Who wrote the patch that you pushed? > Wow, thanks Carl, my mistake :( ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] lavf/rtsp.c: Fix stimeout option not applied on http tunnel
Hendrik Leppkes 于2019年4月15日周一 下午7:48写道: > > On Mon, Apr 15, 2019 at 12:46 PM Carl Eugen Hoyos wrote: > > > > 2019-04-15 9:42 GMT+02:00, Liu Steven : > > > > > > > > >> 在 2019年4月11日,下午12:03,Liu Steven 写道: > > >> > > >> > > >> > > >>> 在 2019年4月11日,上午11:55,Jun Li 写道: > > >>> ... > > >>> > > >>> Ping. > > >> LGTM > > > > > > Pushed > > Ok, i should review the Author of local commit message. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/8] libavfilter/dnn_backend_tf.c: set layer_add_res for input layer
> 在 2019年4月2日,22:28,Guo, Yejun 写道: > > otherwise, the following check will return error if layer_add_res > is randomly initialized. > > Signed-off-by: Guo, Yejun > --- > libavfilter/dnn_backend_tf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c > index 5bc7f06..9e0c127 100644 > --- a/libavfilter/dnn_backend_tf.c > +++ b/libavfilter/dnn_backend_tf.c > @@ -440,6 +440,7 @@ static DNNReturnType load_native_model(TFModel *tf_model, > const char *model_file > for (layer = 0; layer < conv_network->layers_num; ++layer){ > switch (conv_network->layers[layer].type){ > case INPUT: > +layer_add_res = DNN_SUCCESS; > break; > case CONV: > layer_add_res = add_conv_layer(tf_model, transpose_op, &op, > -- > 2.7.4 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/8] libavfilter/dnn: determine dnn output during execute_model instead of set_input_output
> 在 2019年4月2日,22:29,Guo, Yejun 写道: > > Currently, within interface set_input_output, the dims/memory of the > tensorflow > dnn model output is determined by executing the model with zero input, > actually, the output dims might vary with different input data for networks > such as object detection models faster-rcnn, ssd and yolo. > > This patch moves the logic from set_input_output to execute_model which > is suitable for all the cases. Since interface changed, and so > dnn_backend_native > also changes. > > In vf_sr.c, it knows it's srcnn or espcn by executing the model with zero > input, > so execute_model has to be called in function config_props > > Signed-off-by: Guo, Yejun > --- > libavfilter/dnn_backend_native.c | 14 +- > libavfilter/dnn_backend_native.h | 2 +- > libavfilter/dnn_backend_tf.c | 55 > libavfilter/dnn_backend_tf.h | 2 +- > libavfilter/dnn_interface.h | 6 ++--- > libavfilter/vf_sr.c | 20 --- > 6 files changed, 51 insertions(+), 48 deletions(-) > > diff --git a/libavfilter/dnn_backend_native.c > b/libavfilter/dnn_backend_native.c > index fe43116..18735c0 100644 > --- a/libavfilter/dnn_backend_native.c > +++ b/libavfilter/dnn_backend_native.c > @@ -25,7 +25,7 @@ > > #include "dnn_backend_native.h" > > -static DNNReturnType set_input_output_native(void *model, DNNData *input, > const char *input_name, DNNData *output, const char *output_name) > +static DNNReturnType set_input_output_native(void *model, DNNData *input, > const char *input_name, const char *output_name) > { > ConvolutionalNetwork *network = (ConvolutionalNetwork *)model; > InputParams *input_params; > @@ -81,11 +81,6 @@ static DNNReturnType set_input_output_native(void *model, > DNNData *input, const > } > } > > -output->data = network->layers[network->layers_num - 1].output; > -output->height = cur_height; > -output->width = cur_width; > -output->channels = cur_channels; > - > return DNN_SUCCESS; > } > > @@ -280,7 +275,7 @@ static void depth_to_space(const float *input, float > *output, int block_size, in > } > } > > -DNNReturnType ff_dnn_execute_model_native(const DNNModel *model) > +DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, DNNData > *output) > { > ConvolutionalNetwork *network = (ConvolutionalNetwork *)model->model; > int cur_width, cur_height, cur_channels; > @@ -322,6 +317,11 @@ DNNReturnType ff_dnn_execute_model_native(const DNNModel > *model) > } > } > > +output->data = network->layers[network->layers_num - 1].output; > +output->height = cur_height; > +output->width = cur_width; > +output->channels = cur_channels; > + > return DNN_SUCCESS; > } > > diff --git a/libavfilter/dnn_backend_native.h > b/libavfilter/dnn_backend_native.h > index 51d4cac..adaf4a7 100644 > --- a/libavfilter/dnn_backend_native.h > +++ b/libavfilter/dnn_backend_native.h > @@ -63,7 +63,7 @@ typedef struct ConvolutionalNetwork{ > > DNNModel *ff_dnn_load_model_native(const char *model_filename); > > -DNNReturnType ff_dnn_execute_model_native(const DNNModel *model); > +DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, DNNData > *output); > > void ff_dnn_free_model_native(DNNModel **model); > > diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c > index a838907..7966688 100644 > --- a/libavfilter/dnn_backend_tf.c > +++ b/libavfilter/dnn_backend_tf.c > @@ -35,7 +35,6 @@ typedef struct TFModel{ > TF_Status *status; > TF_Output input, output; > TF_Tensor *input_tensor; > -DNNData *output_data; > } TFModel; > > static void free_buffer(void *data, size_t length) > @@ -76,13 +75,12 @@ static TF_Buffer *read_graph(const char *model_filename) > return graph_buf; > } > > -static DNNReturnType set_input_output_tf(void *model, DNNData *input, const > char *input_name, DNNData *output, const char *output_name) > +static DNNReturnType set_input_output_tf(void *model, DNNData *input, const > char *input_name, const char *output_name) > { > TFModel *tf_model = (TFModel *)model; > int64_t input_dims[] = {1, input->height, input->width, input->channels}; > TF_SessionOptions *sess_opts; > const TF_Operation *init_op = TF_GraphOperationByName(tf_model->graph, > "init"); > -TF_Tensor *output_tensor; > > // Input operation > tf_model->input.oper = TF_GraphOperationByName(tf_model->graph, > input_name); > @@ -132,26 +130,6 @@ static DNNReturnType set_input_output_tf(void *model, > DNNData *input, const char > } > } > > -// Execute network to get output height, width and number of channels > -TF_SessionRun(tf_model->session, NULL, > - &tf_model->input, &tf_model->input_tensor, 1, > - &tf_model->output, &output_tensor, 1, > - NULL, 0, NULL, tf_model->status); > -if (TF_GetCode(tf_model
Re: [FFmpeg-devel] [PATCH 4/8] libavfilter/dnn: determine dnn output during execute_model instead of set_input_output
> 在 2019年4月2日,22:29,Guo, Yejun 写道: > > Currently, within interface set_input_output, the dims/memory of the > tensorflow > dnn model output is determined by executing the model with zero input, > actually, the output dims might vary with different input data for networks > such as object detection models faster-rcnn, ssd and yolo. > > This patch moves the logic from set_input_output to execute_model which > is suitable for all the cases. Since interface changed, and so > dnn_backend_native > also changes. > > In vf_sr.c, it knows it's srcnn or espcn by executing the model with zero > input, > so execute_model has to be called in function config_props > > Signed-off-by: Guo, Yejun > --- > libavfilter/dnn_backend_native.c | 14 +- > libavfilter/dnn_backend_native.h | 2 +- > libavfilter/dnn_backend_tf.c | 55 > libavfilter/dnn_backend_tf.h | 2 +- > libavfilter/dnn_interface.h | 6 ++--- > libavfilter/vf_sr.c | 20 --- > 6 files changed, 51 insertions(+), 48 deletions(-) > > diff --git a/libavfilter/dnn_backend_native.c > b/libavfilter/dnn_backend_native.c > index fe43116..18735c0 100644 > --- a/libavfilter/dnn_backend_native.c > +++ b/libavfilter/dnn_backend_native.c > @@ -25,7 +25,7 @@ > > #include "dnn_backend_native.h" > > -static DNNReturnType set_input_output_native(void *model, DNNData *input, > const char *input_name, DNNData *output, const char *output_name) > +static DNNReturnType set_input_output_native(void *model, DNNData *input, > const char *input_name, const char *output_name) > { > ConvolutionalNetwork *network = (ConvolutionalNetwork *)model; > InputParams *input_params; > @@ -81,11 +81,6 @@ static DNNReturnType set_input_output_native(void *model, > DNNData *input, const > } > } > > -output->data = network->layers[network->layers_num - 1].output; > -output->height = cur_height; > -output->width = cur_width; > -output->channels = cur_channels; > - > return DNN_SUCCESS; > } > > @@ -280,7 +275,7 @@ static void depth_to_space(const float *input, float > *output, int block_size, in > } > } > > -DNNReturnType ff_dnn_execute_model_native(const DNNModel *model) > +DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, DNNData > *output) > { > ConvolutionalNetwork *network = (ConvolutionalNetwork *)model->model; > int cur_width, cur_height, cur_channels; > @@ -322,6 +317,11 @@ DNNReturnType ff_dnn_execute_model_native(const DNNModel > *model) > } > } > > +output->data = network->layers[network->layers_num - 1].output; > +output->height = cur_height; > +output->width = cur_width; > +output->channels = cur_channels; > + > return DNN_SUCCESS; > } > > diff --git a/libavfilter/dnn_backend_native.h > b/libavfilter/dnn_backend_native.h > index 51d4cac..adaf4a7 100644 > --- a/libavfilter/dnn_backend_native.h > +++ b/libavfilter/dnn_backend_native.h > @@ -63,7 +63,7 @@ typedef struct ConvolutionalNetwork{ > > DNNModel *ff_dnn_load_model_native(const char *model_filename); > > -DNNReturnType ff_dnn_execute_model_native(const DNNModel *model); > +DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, DNNData > *output); > > void ff_dnn_free_model_native(DNNModel **model); > > diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c > index a838907..7966688 100644 > --- a/libavfilter/dnn_backend_tf.c > +++ b/libavfilter/dnn_backend_tf.c > @@ -35,7 +35,6 @@ typedef struct TFModel{ > TF_Status *status; > TF_Output input, output; > TF_Tensor *input_tensor; > -DNNData *output_data; > } TFModel; > > static void free_buffer(void *data, size_t length) > @@ -76,13 +75,12 @@ static TF_Buffer *read_graph(const char *model_filename) > return graph_buf; > } > > -static DNNReturnType set_input_output_tf(void *model, DNNData *input, const > char *input_name, DNNData *output, const char *output_name) > +static DNNReturnType set_input_output_tf(void *model, DNNData *input, const > char *input_name, const char *output_name) > { > TFModel *tf_model = (TFModel *)model; > int64_t input_dims[] = {1, input->height, input->width, input->channels}; > TF_SessionOptions *sess_opts; > const TF_Operation *init_op = TF_GraphOperationByName(tf_model->graph, > "init"); > -TF_Tensor *output_tensor; > > // Input operation > tf_model->input.oper = TF_GraphOperationByName(tf_model->graph, > input_name); > @@ -132,26 +130,6 @@ static DNNReturnType set_input_output_tf(void *model, > DNNData *input, const char > } > } > > -// Execute network to get output height, width and number of channels > -TF_SessionRun(tf_model->session, NULL, > - &tf_model->input, &tf_model->input_tensor, 1, > - &tf_model->output, &output_tensor, 1, > - NULL, 0, NULL, tf_model->status); > -if (TF_GetCode(tf_model
Re: [FFmpeg-devel] [FFmpeg-cvslog] tests/fate: add fate-hls-segment-size for hls_segment_size test
> 在 2019年4月18日,09:35,Carl Eugen Hoyos 写道: > > 2019-04-17 10:11 GMT+02:00, Steven Liu : >> ffmpeg | branch: master | Steven Liu | Sun Apr 14 >> 21:22:22 2019 +0800| [2a50f1d9e414bdf3d97c6aa649769d17793f2991] | committer: >> Steven Liu >> >> tests/fate: add fate-hls-segment-size for hls_segment_size test > > I believe this commit broke fate. > Ah, forget commit the tests/ref/fate/hls-segment-size Can i append the file for commit? > Carl Eugen > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] add tests/ref/fate/hls-segment-size for the fate test
Signed-off-by: Steven Liu --- tests/ref/fate/hls-segment-size | 772 1 file changed, 772 insertions(+) create mode 100644 tests/ref/fate/hls-segment-size diff --git a/tests/ref/fate/hls-segment-size b/tests/ref/fate/hls-segment-size new file mode 100644 index 00..ee3c7b2c62 --- /dev/null +++ b/tests/ref/fate/hls-segment-size @@ -0,0 +1,772 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 4 +#channel_layout_name 0: mono +0, 0, 0, 1152, 2304, 0x907cb7fa +0, 1152, 1152, 1152, 2304, 0xb8dc7525 +0, 2304, 2304, 1152, 2304, 0x3e7d6905 +0, 3456, 3456, 1152, 2304, 0xef47877b +0, 4608, 4608, 1152, 2304, 0xfe916b7e +0, 5760, 5760, 1152, 2304, 0xe3d08cde +0, 6912, 6912, 1152, 2304, 0xff7f86cf +0, 8064, 8064, 1152, 2304, 0x843e6f95 +0, 9216, 9216, 1152, 2304, 0x81577c26 +0, 10368, 10368, 1152, 2304, 0x04a085d5 +0, 11520, 11520, 1152, 2304, 0x1c5a76f5 +0, 12672, 12672, 1152, 2304, 0x4ee78623 +0, 13824, 13824, 1152, 2304, 0x8ec861dc +0, 14976, 14976, 1152, 2304, 0x0ca179d8 +0, 16128, 16128, 1152, 2304, 0xc6da750f +0, 17280, 17280, 1152, 2304, 0xf6bf79b5 +0, 18432, 18432, 1152, 2304, 0x97b88a43 +0, 19584, 19584, 1152, 2304, 0xf13c7b9c +0, 20736, 20736, 1152, 2304, 0xdfba83af +0, 21888, 21888, 1152, 2304, 0xc9467d4b +0, 23040, 23040, 1152, 2304, 0xbbb58e2b +0, 24192, 24192, 1152, 2304, 0x3a1078ea +0, 25344, 25344, 1152, 2304, 0xe9587a5c +0, 26496, 26496, 1152, 2304, 0xef5a8039 +0, 27648, 27648, 1152, 2304, 0x9d5f782f +0, 28800, 28800, 1152, 2304, 0x1a548291 +0, 29952, 29952, 1152, 2304, 0x07517701 +0, 31104, 31104, 1152, 2304, 0x78127d6e +0, 32256, 32256, 1152, 2304, 0x62e2788a +0, 33408, 33408, 1152, 2304, 0x29397ad9 +0, 34560, 34560, 1152, 2304, 0x45da82d6 +0, 35712, 35712, 1152, 2304, 0x8ed66e51 +0, 36864, 36864, 1152, 2304, 0x660775cd +0, 38016, 38016, 1152, 2304, 0x802c767a +0, 39168, 39168, 1152, 2304, 0xcc055840 +0, 40320, 40320, 1152, 2304, 0x701b7eaf +0, 41472, 41472, 1152, 2304, 0x8290749f +0, 42624, 42624, 1152, 2304, 0x2c7b7d30 +0, 43776, 43776, 1152, 2304, 0xe4f17743 +0, 44928, 44928, 1152, 2304, 0x0e747d6e +0, 46080, 46080, 1152, 2304, 0xbe7775a0 +0, 47232, 47232, 1152, 2304, 0xcf797673 +0, 48384, 48384, 1152, 2304, 0x29cb7800 +0, 49536, 49536, 1152, 2304, 0xfc947890 +0, 50688, 50688, 1152, 2304, 0x62757fc6 +0, 51840, 51840, 1152, 2304, 0x098876d0 +0, 52992, 52992, 1152, 2304, 0xa9567ee2 +0, 54144, 54144, 1152, 2304, 0xe3bb9173 +0, 55296, 55296, 1152, 2304, 0xcc2d6dee +0, 56448, 56448, 1152, 2304, 0xe94591ab +0, 57600, 57600, 1152, 2304, 0x5c7588de +0, 58752, 58752, 1152, 2304, 0xfd83643c +0, 59904, 59904, 1152, 2304, 0x528177f1 +0, 61056, 61056, 1152, 2304, 0x65d08474 +0, 62208, 62208, 1152, 2304, 0x738d765b +0, 63360, 63360, 1152, 2304, 0xdd3d810e +0, 64512, 64512, 1152, 2304, 0xef4f90d3 +0, 65664, 65664, 1152, 2304, 0x61e28d43 +0, 66816, 66816, 1152, 2304, 0x9a11796b +0, 67968, 67968, 1152, 2304, 0x96c97dcd +0, 69120, 69120, 1152, 2304, 0xa8fe8621 +0, 70272, 70272, 1152, 2304, 0x499b7d38 +0, 71424, 71424, 1152, 2304, 0xfcb078a9 +0, 72576, 72576, 1152, 2304, 0x40d78651 +0, 73728, 73728, 1152, 2304, 0xa4af7234 +0, 74880, 74880, 1152, 2304, 0x6831870a +0, 76032, 76032, 1152, 2304, 0x030e7b9d +0, 77184, 77184, 1152, 2304, 0x445a75b6 +0, 78336, 78336, 1152, 2304, 0x09857389 +0, 79488, 79488, 1152, 2304, 0x0d018866 +0, 80640, 80640, 1152, 2304, 0x2afe810a +0, 81792, 81792, 1152, 2304, 0x0bcf7c43 +0, 82944, 82944, 1152, 2304, 0x13737c12 +0, 84096, 84096, 1152, 2304, 0x716c7bba +0, 85248, 85248, 1152, 2304, 0xb801823b +0, 86400, 86400, 1152
Re: [FFmpeg-devel] [PATCH v2] lavf/img2enc: add support for option strftime_start_realtime
> 在 2019年4月22日,04:50,Jun Li 写道: > > On Thu, Apr 18, 2019 at 5:59 PM Jun Li wrote: > >> Currently the strftime option generate timestamp based on generation >> time. The new option would calcualte timestamp from start_time_realtime >> and pkt->pts, based on output's timescale. >> --- >> doc/muxers.texi | 5 + >> libavformat/img2enc.c | 34 ++ >> 2 files changed, 39 insertions(+) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 83ae017d6c..ee99ef621e 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -1193,6 +1193,11 @@ overwritten with new images. Default value is 0. >> @item strftime >> If set to 1, expand the filename with date and time information from >> @code{strftime()}. Default value is 0. >> + >> +@item strftime_start_realtime >> +If set to 1, expand the filename with date and time information from >> +@code{strftime()}, starting from start_time_realtime and calcualted >> +from pkt->pts in UTC time. Default value is 0. >> @end table >> >> The image muxer supports the .Y.U.V image file format. This format is >> diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c >> index bec4bf81dd..0f27e5ceaf 100644 >> --- a/libavformat/img2enc.c >> +++ b/libavformat/img2enc.c >> @@ -26,6 +26,7 @@ >> #include "libavutil/log.h" >> #include "libavutil/opt.h" >> #include "libavutil/pixdesc.h" >> +#include "libavutil/time.h" >> #include "libavutil/time_internal.h" >> #include "avformat.h" >> #include "avio_internal.h" >> @@ -45,6 +46,7 @@ typedef struct VideoMuxData { >> int frame_pts; >> const char *muxer; >> int use_rename; >> +int strftime_start_realtime; >> } VideoMuxData; >> >> static int write_header(AVFormatContext *s) >> @@ -105,6 +107,37 @@ static int write_packet(AVFormatContext *s, AVPacket >> *pkt) >> av_log(s, AV_LOG_ERROR, "Cannot write filename by pts of >> the frames."); >> return AVERROR(EINVAL); >> } >> +} else if (img->strftime_start_realtime) { >> +int64_t start_realtime = s->start_time_realtime; >> +int64_t timestamp = 0; >> +struct tm *tm; >> +time_t sec = 0; >> + >> +if (start_realtime == 0 || start_realtime == AV_NOPTS_VALUE) { >> +// the value is not set by either user or encoder, try >> use creation_time >> +if (ff_parse_creation_time_metadata(s, &start_realtime, >> 0) != 0) >> +av_log(s, AV_LOG_INFO, "Use creation_time as >> start_realtime.\n"); >> + >> +if (start_realtime == 0 || start_realtime == >> AV_NOPTS_VALUE) { >> +av_log(s, AV_LOG_WARNING, "Could not get >> start_time_realtime, set value to now.\n"); >> +timestamp = av_gettime(); >> +s->start_time_realtime = timestamp; >> +} else { >> +s->start_time_realtime = start_realtime; >> +} >> +} >> + >> +if (!timestamp) { >> +int64_t offset = av_rescale_q(pkt->pts, >> s->streams[0]->time_base, AV_TIME_BASE_Q); >> +timestamp = s->start_time_realtime + offset; >> +} >> + >> +sec = timestamp / AV_TIME_BASE; >> +tm = gmtime(&sec); >> +if (!strftime(filename, sizeof(filename), img->path, tm)) { >> +av_log(s, AV_LOG_ERROR, "Could not get frame filename >> with strftime\n"); >> +return AVERROR(EINVAL); >> +} >> } else if (av_get_frame_filename2(filename, sizeof(filename), >> img->path, >> img->img_number, >> >> AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0 && >> @@ -215,6 +248,7 @@ static const AVOption muxoptions[] = { >> { "strftime", "use strftime for filename", OFFSET(use_strftime), >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC }, >> { "frame_pts","use current frame pts for filename", >> OFFSET(frame_pts), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC }, >> { "atomic_writing", "write files atomically (using temporary files >> and renames)", OFFSET(use_rename), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, >> ENC }, >> +{ "strftime_start_realtime", "use strftime for filename and timestamp >> calculated from start_time_realtime", OFFSET(strftime_start_realtime), >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC }, >> { NULL }, >> }; >> >> -- >> 2.17.1 > > > Ping. will apply if there have no objections. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or
Re: [FFmpeg-devel] [DECISION] Project policy on closed source components
> 在 2019年5月4日,上午9:32,Peter Ross 写道: > >> On Fri, May 03, 2019 at 10:43:36AM -0700, Baptiste Coudurier wrote: >> >>> On May 3, 2019, at 1:15 AM, Paul B Mahol wrote: >>> >>> On 4/28/19, Marton Balint wrote: Hi All, There has been discussion on the mailing list several times about the inclusion of support for closed source components (codecs, formats, filters, etc) in the main ffmpeg codebase. Also the removal of libNDI happened without general consensus, so a vote is necessary to justify the removal. So here is a call to the voting committee [1] to decide on the following two questions: 1) Should libNDI support be removed from the ffmpeg codebase? >>> >>> Yes, yes. >> >> Yes > > Yes Yes > 2) Should patches using closed source libraries which are not considered "System Libraries" according to the GPL be rejected? >>> >>> Yes, yes, yes. >> >> Yes > > Yes. Yes > > -- Peter > (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] lavf/dashdec: fix the coding logic after open_input fail
> 在 2019年5月11日,15:23,Jun Zhao 写道: > > From: Jun Zhao > > setting return status following goto will never be executed, so > adjust the location in the code. > > Signed-off-by: Jun Zhao > --- > libavformat/dashdec.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 6e3e7e4..ce8bd4a 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -1793,8 +1793,8 @@ restart: > ret = open_input(c, v, v->cur_seg); > if (ret < 0) { > if (ff_check_interrupt(c->interrupt_callback)) { > -goto end; > ret = AVERROR_EXIT; > +goto end; > } > av_log(v->parent, AV_LOG_WARNING, "Failed to open fragment of > playlist %d\n", v->rep_idx); > v->cur_seq_no++; > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. Pushed Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] Add multiple padding method in dnn native
Xuewei Meng 于2019年5月11日周六 上午11:11写道: > > --- > libavfilter/dnn_backend_native.c | 52 > libavfilter/dnn_backend_native.h | 3 ++ > 2 files changed, 43 insertions(+), 12 deletions(-) > > diff --git a/libavfilter/dnn_backend_native.c > b/libavfilter/dnn_backend_native.c > index 06fbdf368b..171a756385 100644 > --- a/libavfilter/dnn_backend_native.c > +++ b/libavfilter/dnn_backend_native.c > @@ -61,6 +61,12 @@ static DNNReturnType set_input_output_native(void *model, > DNNInputData *input, c > return DNN_ERROR; > } > cur_channels = conv_params->output_num; > + > +if(conv_params->padding_method == VALID){ > +int pad_size = conv_params->kernel_size - 1; > +cur_height -= pad_size; > +cur_width -= pad_size; > +} > break; > case DEPTH_TO_SPACE: > depth_to_space_params = (DepthToSpaceParams > *)network->layers[layer].params; > @@ -77,6 +83,10 @@ static DNNReturnType set_input_output_native(void *model, > DNNInputData *input, c > if (network->layers[layer].output){ > av_freep(&network->layers[layer].output); > } > + > +if(cur_height <= 0 || cur_width <= 0) > +return DNN_ERROR; > + > network->layers[layer].output = av_malloc(cur_height * cur_width * > cur_channels * sizeof(float)); > if (!network->layers[layer].output){ > return DNN_ERROR; > @@ -154,13 +164,14 @@ DNNModel *ff_dnn_load_model_native(const char > *model_filename) > ff_dnn_free_model_native(&model); > return NULL; > } > +conv_params->padding_method = > (int32_t)avio_rl32(model_file_context); > conv_params->activation = (int32_t)avio_rl32(model_file_context); > conv_params->input_num = (int32_t)avio_rl32(model_file_context); > conv_params->output_num = (int32_t)avio_rl32(model_file_context); > conv_params->kernel_size = > (int32_t)avio_rl32(model_file_context); > kernel_size = conv_params->input_num * conv_params->output_num * >conv_params->kernel_size * > conv_params->kernel_size; > -dnn_size += 16 + (kernel_size + conv_params->output_num << 2); > +dnn_size += 20 + (kernel_size + conv_params->output_num << 2); > if (dnn_size > file_size || conv_params->input_num <= 0 || > conv_params->output_num <= 0 || conv_params->kernel_size <= > 0){ > avio_closep(&model_file_context); > @@ -218,23 +229,35 @@ DNNModel *ff_dnn_load_model_native(const char > *model_filename) > > static void convolve(const float *input, float *output, const > ConvolutionalParams *conv_params, int width, int height) > { > -int y, x, n_filter, ch, kernel_y, kernel_x; > int radius = conv_params->kernel_size >> 1; > int src_linesize = width * conv_params->input_num; > int filter_linesize = conv_params->kernel_size * conv_params->input_num; > int filter_size = conv_params->kernel_size * filter_linesize; > +int pad_size = (conv_params->padding_method == VALID) ? > (conv_params->kernel_size - 1) / 2 : 0; > > -for (y = 0; y < height; ++y){ > -for (x = 0; x < width; ++x){ > -for (n_filter = 0; n_filter < conv_params->output_num; > ++n_filter){ > +for (int y = pad_size; y < height - pad_size; ++y){ > +for (int x = pad_size; x < width - pad_size; ++x){ > +for (int n_filter = 0; n_filter < conv_params->output_num; > ++n_filter){ > output[n_filter] = conv_params->biases[n_filter]; > -for (ch = 0; ch < conv_params->input_num; ++ch){ > -for (kernel_y = 0; kernel_y < conv_params->kernel_size; > ++kernel_y){ > -for (kernel_x = 0; kernel_x < > conv_params->kernel_size; ++kernel_x){ > -output[n_filter] += input[CLAMP_TO_EDGE(y + > kernel_y - radius, height) * src_linesize + > - CLAMP_TO_EDGE(x + > kernel_x - radius, width) * conv_params->input_num + ch] * > -conv_params->kernel[n_filter > * filter_size + kernel_y * filter_linesize + > -kernel_x > * conv_params->input_num + ch]; > + > +for (int ch = 0; ch < conv_params->input_num; ++ch){ > +for (int kernel_y = 0; kernel_y < > conv_params->kernel_size; ++kernel_y){ > +for (int kernel_x = 0; kernel_x < > conv_params->kernel_size; ++kernel_x){ > +float input_pel; > +if(conv_params->padding_method == > SAME_CLAMP_TO_EDGE){ > +int y_pos = CLAMP_TO_EDGE(y + kernel_y -
[FFmpeg-devel] [PATCH] doc/filters: update the sr filter model generation scripts repository link
The https://github.com/HighVoltageRocknRoll/sr.git looks have stop maintaince, so link it to new repository Signed-off-by: Steven Liu --- doc/filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 38c70bf674..317c256079 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -16538,7 +16538,7 @@ See @url{https://arxiv.org/abs/1609.05158}. @end itemize Training scripts as well as scripts for model generation are provided in -the repository at @url{https://github.com/HighVoltageRocknRoll/sr.git}. +the repository at @url{https://github.com/XueweiMeng/sr/tree/sr_dnn_native}. The filter accepts the following options: -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] doc/filters: add the sr filter model generation scripts new repository link
Hold on the old repository link and mention new repository link development continues Signed-off-by: Steven Liu --- doc/filters.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 38c70bf674..2e9db150f2 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -16538,7 +16538,8 @@ See @url{https://arxiv.org/abs/1609.05158}. @end itemize Training scripts as well as scripts for model generation are provided in -the repository at @url{https://github.com/HighVoltageRocknRoll/sr.git}. +the repository at @url{https://github.com/HighVoltageRocknRoll/sr.git}(have stop maintaince) +or @url{https://github.com/XueweiMeng/sr/tree/sr_dnn_native}(development continues). The filter accepts the following options: -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] doc/filters: add the sr filter model generation scripts new repository link
> 在 2019年5月17日,02:57,Gyan 写道: > > > > On 16-05-2019 11:13 AM, Steven Liu wrote: >> Hold on the old repository link and mention new repository link development >> continues >> >> Signed-off-by: Steven Liu >> --- >> doc/filters.texi | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/doc/filters.texi b/doc/filters.texi >> index 38c70bf674..2e9db150f2 100644 >> --- a/doc/filters.texi >> +++ b/doc/filters.texi >> @@ -16538,7 +16538,8 @@ See @url{https://arxiv.org/abs/1609.05158}. >> @end itemize >>Training scripts as well as scripts for model generation are provided in >> -the repository at @url{https://github.com/HighVoltageRocknRoll/sr.git}. >> +the repository at @url{https://github.com/HighVoltageRocknRoll/sr.git}(have >> stop maintaince) >> +or @url{https://github.com/XueweiMeng/sr/tree/sr_dnn_native}(development >> continues). >>The filter accepts the following options: >> > Made some changes and pushed as 6044534964a463663803b590fe66a212af4b3834 I think you can review and comment the patch, then i can modify it. but i don’t think you just leave a message is good: “ commit c2771bbf815bd7d0ff273ba590b7db02a303399f Author: Gyan Doshi Date: Fri May 17 00:22:04 2019 +0530 doc/filters: update URL for sr filter script repository Thanks to Steven Liu for the update. “ > > Thanks, > Gyan > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v3] libavfilter/dnn_native: Add multiple padding methods in dnn native
Guo, Yejun 于2019年5月21日周二 上午10:25写道: > > > > > -Original Message- > > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > > Xuewei Meng > > Sent: Saturday, May 18, 2019 3:19 PM > > To: ffmpeg-devel@ffmpeg.org > > Cc: Xuewei Meng > > Subject: [FFmpeg-devel] [PATCH v3] libavfilter/dnn_native: Add multiple > > padding > > methods in dnn native > > > > Add another two padding methods "VALID" and "SAME" as tensorflow, and > > keep the existing "SAME_CLAMP_TO_EDGE" method suggested by sr filter. > > As "SAME_CLAMP_TO_EDGE"can keep the output with the same size as > > original input, and gives a slight better result as mentioned by sr filter. > > > > Signed-off-by: Xuewei Meng > > --- > > libavfilter/dnn_backend_native.c | 52 > > libavfilter/dnn_backend_native.h | 3 ++ > > 2 files changed, 43 insertions(+), 12 deletions(-) > > looks good to me, except some trailing whitespaces. Fixed trailing whitespaces, fixed code style and pushed. Thanks > > > > > diff --git a/libavfilter/dnn_backend_native.c > > b/libavfilter/dnn_backend_native.c > > index 06fbdf368b..171a756385 100644 > > --- a/libavfilter/dnn_backend_native.c > > +++ b/libavfilter/dnn_backend_native.c > > @@ -61,6 +61,12 @@ static DNNReturnType set_input_output_native(void > > *model, DNNInputData *input, c > > return DNN_ERROR; > > } > > cur_channels = conv_params->output_num; > > + > > +if(conv_params->padding_method == VALID){ > > +int pad_size = conv_params->kernel_size - 1; > > +cur_height -= pad_size; > > +cur_width -= pad_size; > > +} > > break; > > case DEPTH_TO_SPACE: > > depth_to_space_params = (DepthToSpaceParams > > *)network->layers[layer].params; > > @@ -77,6 +83,10 @@ static DNNReturnType set_input_output_native(void > > *model, DNNInputData *input, c > > if (network->layers[layer].output){ > > av_freep(&network->layers[layer].output); > > } > > + > > +if(cur_height <= 0 || cur_width <= 0) > > +return DNN_ERROR; > > + > > network->layers[layer].output = av_malloc(cur_height * cur_width * > > cur_channels * sizeof(float)); > > if (!network->layers[layer].output){ > > return DNN_ERROR; > > @@ -154,13 +164,14 @@ DNNModel *ff_dnn_load_model_native(const char > > *model_filename) > > ff_dnn_free_model_native(&model); > > return NULL; > > } > > +conv_params->padding_method = > > (int32_t)avio_rl32(model_file_context); > > conv_params->activation = > > (int32_t)avio_rl32(model_file_context); > > conv_params->input_num = > > (int32_t)avio_rl32(model_file_context); > > conv_params->output_num = > > (int32_t)avio_rl32(model_file_context); > > conv_params->kernel_size = > > (int32_t)avio_rl32(model_file_context); > > kernel_size = conv_params->input_num * > > conv_params->output_num * > >conv_params->kernel_size * > > conv_params->kernel_size; > > -dnn_size += 16 + (kernel_size + conv_params->output_num << > > 2); > > +dnn_size += 20 + (kernel_size + conv_params->output_num << > > 2); > > if (dnn_size > file_size || conv_params->input_num <= 0 || > > conv_params->output_num <= 0 || > > conv_params->kernel_size <= 0){ > > avio_closep(&model_file_context); > > @@ -218,23 +229,35 @@ DNNModel *ff_dnn_load_model_native(const char > > *model_filename) > > > > static void convolve(const float *input, float *output, const > > ConvolutionalParams *conv_params, int width, int height) > > { > > -int y, x, n_filter, ch, kernel_y, kernel_x; > > int radius = conv_params->kernel_size >> 1; > > int src_linesize = width * conv_params->input_num; > > int filter_linesize = conv_params->kernel_size * > > conv_params->input_num; > > int filter_size = conv_params->kernel_size * filter_linesize; > > +int pad_size = (conv_params->padding_method == VALID) ? > > (conv_params->kernel_size - 1) / 2 : 0; > > > > -for (y = 0; y < height; ++y){ > > -for (x = 0; x < width; ++x){ > > -for (n_filter = 0; n_filter < conv_params->output_num; > > ++n_filter){ > > +for (int y = pad_size; y < height - pad_size; ++y){ > > +for (int x = pad_size; x < width - pad_size; ++x){ > > +for (int n_filter = 0; n_filter < conv_params->output_num; > > ++n_filter){ > > output[n_filter] = conv_params->biases[n_filter]; > > -for (ch = 0; ch < conv_params->input_num; ++ch){ > > -for (kernel_y = 0; kernel_y < > > conv_params->kernel_size; ++kernel_y){ > > -for (kernel_x = 0; kernel_x < > > conv_params->kernel_size; ++kernel_x){ > > -
Re: [FFmpeg-devel] [PATCH] avutil/file_open: log temp filename
Hendrik Leppkes 于2019年5月22日周三 下午5:05写道: > > On Wed, May 22, 2019 at 10:53 AM Gyan wrote: > > > > > > > > On 22-05-2019 01:41 PM, Liu Steven wrote: > > > > > >> 在 2019年5月22日,下午3:10,Gyan 写道: > > >> > > >> > > >> Helps users to identify temp files for a given instance. > > >> > > >> In the longer term, we should aim to clean up all temp files. > > >> > > >> Gyan > > >> <0001-avutil-file_open-log-temp-filename.patch>___ > > > Why don’t use AV_LOG_DEBUG or AV_LOG_TRACE? > > > > > DEBUG and TRACE are meant to record micro-ops for debugging purposes. > > This message will be present a handful of times in the log and is > > essential for end-users so they can delete these files, which ffmpeg > > won't do, but should since these are meant to be temporary files. > > > > Why don't we work on fixing this instead, as users will not know what > implications this message has in any case and just consider it spam. +1 > > - Hendrik > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] libavfilter/dnn_native: Add support of dilated convolution in dnn_native.
Xuewei Meng 于2019年5月22日周三 下午9:09写道: > > Add dilation parameter in dnn native to support dilated convolution. > > Signed-off-by: Xuewei Meng > --- > libavfilter/dnn_backend_native.c | 17 + > libavfilter/dnn_backend_native.h | 1 + > 2 files changed, 10 insertions(+), 8 deletions(-) > > diff --git a/libavfilter/dnn_backend_native.c > b/libavfilter/dnn_backend_native.c > index 3c8465a283..82e900bd8c 100644 > --- a/libavfilter/dnn_backend_native.c > +++ b/libavfilter/dnn_backend_native.c > @@ -63,7 +63,7 @@ static DNNReturnType set_input_output_native(void *model, > DNNInputData *input, c > cur_channels = conv_params->output_num; > > if (conv_params->padding_method == VALID) { > -int pad_size = conv_params->kernel_size - 1; > +int pad_size = (conv_params->kernel_size - 1) * > conv_params->dilation; > cur_height -= pad_size; > cur_width -= pad_size; > } > @@ -164,6 +164,7 @@ DNNModel *ff_dnn_load_model_native(const char > *model_filename) > ff_dnn_free_model_native(&model); > return NULL; > } > +conv_params->dilation = (int32_t)avio_rl32(model_file_context); > conv_params->padding_method = > (int32_t)avio_rl32(model_file_context); > conv_params->activation = (int32_t)avio_rl32(model_file_context); > conv_params->input_num = (int32_t)avio_rl32(model_file_context); > @@ -171,7 +172,7 @@ DNNModel *ff_dnn_load_model_native(const char > *model_filename) > conv_params->kernel_size = > (int32_t)avio_rl32(model_file_context); > kernel_size = conv_params->input_num * conv_params->output_num * >conv_params->kernel_size * > conv_params->kernel_size; > -dnn_size += 20 + (kernel_size + conv_params->output_num << 2); > +dnn_size += 24 + (kernel_size + conv_params->output_num << 2); > if (dnn_size > file_size || conv_params->input_num <= 0 || > conv_params->output_num <= 0 || conv_params->kernel_size <= > 0){ > avio_closep(&model_file_context); > @@ -233,7 +234,7 @@ static void convolve(const float *input, float *output, > const ConvolutionalParam > int src_linesize = width * conv_params->input_num; > int filter_linesize = conv_params->kernel_size * conv_params->input_num; > int filter_size = conv_params->kernel_size * filter_linesize; > -int pad_size = (conv_params->padding_method == VALID) ? > (conv_params->kernel_size - 1) / 2 : 0; > +int pad_size = (conv_params->padding_method == VALID) ? > (conv_params->kernel_size - 1) / 2 * conv_params->dilation : 0; > > for (int y = pad_size; y < height - pad_size; ++y) { > for (int x = pad_size; x < width - pad_size; ++x) { > @@ -245,12 +246,12 @@ static void convolve(const float *input, float *output, > const ConvolutionalParam > for (int kernel_x = 0; kernel_x < > conv_params->kernel_size; ++kernel_x) { > float input_pel; > if (conv_params->padding_method == > SAME_CLAMP_TO_EDGE) { > -int y_pos = CLAMP_TO_EDGE(y + kernel_y - > radius, height); > -int x_pos = CLAMP_TO_EDGE(x + kernel_x - > radius, width); > +int y_pos = CLAMP_TO_EDGE(y + (kernel_y - > radius) * conv_params->dilation, height); > +int x_pos = CLAMP_TO_EDGE(x + (kernel_x - > radius) * conv_params->dilation, width); > input_pel = input[y_pos * src_linesize + > x_pos * conv_params->input_num + ch]; > } else { > -int y_pos = y + kernel_y - radius; > -int x_pos = x + kernel_x - radius; > +int y_pos = y + (kernel_y - radius) * > conv_params->dilation; > +int x_pos = x + (kernel_x - radius) * > conv_params->dilation; > input_pel = (x_pos < 0 || x_pos >= width || > y_pos < 0 || y_pos >= height) ? 0.0 : > input[y_pos * > src_linesize + x_pos * conv_params->input_num + ch]; > } > @@ -334,7 +335,7 @@ DNNReturnType ff_dnn_execute_model_native(const DNNModel > *model, DNNData *output > convolve(network->layers[layer - 1].output, > network->layers[layer].output, conv_params, cur_width, cur_height); > cur_channels = conv_params->output_num; > if (conv_params->padding_method == VALID) { > -int pad_size = conv_params->kernel_size - 1; > +int pad_size = (conv_params->kernel_size - 1) * > conv_params->dilation; > cur_height -= pad_size; >
Re: [FFmpeg-devel] native mode in FFmpeg DNN module
> 在 2019年5月24日,20:34,Pedro Arthur 写道: > > Em qui, 23 de mai de 2019 às 00:06, Guo, Yejun escreveu: >> >> >> Option 2) Write c code in FFmpeg to convert tensorflow file format (format 1) directly >>> into memory representation (format 3), and so we controls everything in >>> ffmpeg community. And the conversion can be extended to import more file >>> formats such as torch, darknet, etc. One example is that OpenCV uses this >>> method. The in memory representation (format 3) can still be current. >>> >>> Option 2 would be ideal, as it does not introduce any dependency for >>> using the native backend. >>> Yet I'm not sure how complex implementing the tf model reader can >>> be, >>> If I remember correctly the student said it was not trivial at the >>> time. >> >> yes, it is not easy, but I think it is worthy to do it. Here is a >> reference example >> for the complexity, see >> >>> https://github.com/opencv/opencv/blob/master/modules/dnn/src/tensorflow/ >> tf_importer.cpp. >> >>> >>> Is the tf model file stable? if not it will be a maintenance burden to >>> keep it working whenever tf releases a new version. This point makes >>> me think having control over our file format is good. >> >> imho, this issue is always there, no matter which method used, unless our >> format could be exported by tensorflow (it has little possibility). >> >> Whenever tf releases a new version with a new file format, we still have >>> to >> change the python script in phase 1 (convert tf file model to our format) which >> is even an external dependency at >> https://github.com/HighVoltageRocknRoll/sr, >> >> As from effort perspective, the current implementation is better since python >> script is simpler. But I think we are still worth implementing option 2 >> as >>> the >> ideal technical direction. > > I checked a bit more about https://github.com/HighVoltageRocknRoll/sr, it >>> is actually > not an converter (from tf model to native model), but hard code for given models. > And the native model is not exactly the same as tf model, it even changes >>> the behavior > of pad parameter of conv layer. > > If community is open to option 2, I'll try it. > Option 2 is fine for me. >>> >>> that's great, :) >> >> looks that option 2 is a bit complex, TF model file is in protocol buffers >> (protobuf) format and not easy to parse it with simple c code. >> >> Since there is no official c support for protobuf, let's first image how the >> work can be done via official c++ support. >> >> 1. get protobuf compiler protoc, .h header files and .so library files >> (download or build from >> https://github.com/protocolbuffers/protobuf/tree/master/src). >> 2. get tensorflow model's .proto files from >> https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/framework. >> 3. generate .cc/.h files from .proto files (see step 2) via protoc (see step >> 1). >> 4. let the generated .cc/.h files be part of ffmpeg source tree, and build >> with protobuf header/library files. >> 5. at run time, the protobuf libraries are invoked. It means that the system >> should have installed protobuf dev package. >> >> furthermore, there is a compatible problem between the protobuf compiler, >> header files and library files. >> So, as a practice to fix it, the method is to make the protobuf source code >> be part of ffmpeg source tree. (it is a common practice, so we can many >> other projects contain the protobuf source code). >> >> I guess the above method is not acceptable in ffmpeg. I would be glad to >> continue if the community embrace this change. :) > Indeed I think it is not acceptable. > >> >> While the current implementation has external dependency, my new suggestion >> is: >> - add a python script under .../libavfilter/dnn/ (all other dnn source >> files will be also moved here later), so ffmpeg has the full control on it. > I'm not sure about the policy on putting secondary scripts with the > main code, but another option is to create a repo controlled by ffmpeg > maybe? > I think this option would also help GSoC students that work with dnn, > so they don't have to depend on previous students maintaining > independent repositories. Yes, I agreed with you. I think this is a better way. maintaining the repositories at one repo controlled by ffmpeg. > >> - it is a script to convert tensorflow model file into native model file. >> (other formats such as caffe, torch can also be supported later if needed) >> >> thanks. >> >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >>
[FFmpeg-devel] [PATCH] avutil/dynarry.h: fix comment grammar mistakes of FF_DYNARRAY_ADD
Signed-off-by: Steven Liu --- libavutil/dynarray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/dynarray.h b/libavutil/dynarray.h index 034a9fedfe..3a7e146422 100644 --- a/libavutil/dynarray.h +++ b/libavutil/dynarray.h @@ -23,7 +23,7 @@ #include "mem.h" /** - * Add an element of to a dynamic array. + * Add an element to a dynamic array. * * The array is reallocated when its number of elements reaches powers of 2. * Therefore, the amortized cost of adding an element is constant. -- 2.15.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] lavu/frame: fix typo for ROI (region of interest) documentation
> 在 2019年5月31日,16:02,Guo, Yejun 写道: > > there is already a nice patch set to fix the ROI documentation, but it > is pending, see > https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2019-May/20.html > > so just fix this obvious typo that the document does not match the code. > > Signed-off-by: Guo, Yejun > --- > libavutil/frame.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavutil/frame.h b/libavutil/frame.h > index 8aa3e88..eebb2c0 100644 > --- a/libavutil/frame.h > +++ b/libavutil/frame.h > @@ -212,7 +212,7 @@ typedef struct AVFrameSideData { > * self_size specifies the size of this data structure. This value > * should be set to sizeof(AVRegionOfInterest). EINVAL is returned if > self_size is zero. > * > - * Number of pixels to discard from the top/bottom/left/right border of > + * Number of pixels to discard from the top-left corner of > * the frame to obtain the region of interest of the frame. > * They are encoder dependent and will be extended internally > * if the codec requires an alignment. > -- > 2.7.4 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v3] libavfilter: Add derain filter
> 在 2019年5月30日,20:35,Xuewei Meng 写道: > > Remove the rain in the input image/video by applying the derain > methods based on convolutional neural networks. Training scripts > as well as scripts for model generation are provided in the > repository at https://github.com/XueweiMeng/derain_filter.git. > > Signed-off-by: Xuewei Meng > --- > doc/filters.texi | 34 +++ > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vf_derain.c | 212 +++ > 4 files changed, 248 insertions(+) > create mode 100644 libavfilter/vf_derain.c > > diff --git a/doc/filters.texi b/doc/filters.texi > index 4fdcfe919e..f1d3841ed3 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -8248,6 +8248,40 @@ delogo=x=0:y=0:w=100:h=77:band=10 > > @end itemize > > +@section derain > + > +Remove the rain in the input image/video by applying the derain methods > based on > +convolutional neural networks. Supported models: > + > +@itemize > +@item > +Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN). > +See > @url{http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf}. > +@end itemize > + > +Training scripts as well as scripts for model generation are provided in > +the repository at @url{https://github.com/XueweiMeng/derain_filter.git}. > + > +The filter accepts the following options: > + > +@table @option > +@item dnn_backend > +Specify which DNN backend to use for model loading and execution. This > option accepts > +the following values: > + > +@table @samp > +@item native > +Native implementation of DNN loading and execution. > +@end table > +Default value is @samp{native}. > + > +@item model > +Set path to model file specifying network architecture and its parameters. > +Note that different backends use different file formats. TensorFlow backend > +can load files for both formats, while native backend can load files for only > +its format. > +@end table > + > @section deshake > > Attempt to fix small changes in horizontal and/or vertical shift. This > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > index 9a61c25b05..b7191d0081 100644 > --- a/libavfilter/Makefile > +++ b/libavfilter/Makefile > @@ -200,6 +200,7 @@ OBJS-$(CONFIG_DCTDNOIZ_FILTER) += > vf_dctdnoiz.o > OBJS-$(CONFIG_DEBAND_FILTER) += vf_deband.o > OBJS-$(CONFIG_DEBLOCK_FILTER)+= vf_deblock.o > OBJS-$(CONFIG_DECIMATE_FILTER) += vf_decimate.o > +OBJS-$(CONFIG_DERAIN_FILTER) += vf_derain.o > OBJS-$(CONFIG_DECONVOLVE_FILTER) += vf_convolve.o framesync.o > OBJS-$(CONFIG_DEDOT_FILTER) += vf_dedot.o > OBJS-$(CONFIG_DEFLATE_FILTER)+= vf_neighbor.o > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c > index 40534738ee..f3c8883960 100644 > --- a/libavfilter/allfilters.c > +++ b/libavfilter/allfilters.c > @@ -196,6 +196,7 @@ extern AVFilter ff_vf_deinterlace_vaapi; > extern AVFilter ff_vf_dejudder; > extern AVFilter ff_vf_delogo; > extern AVFilter ff_vf_denoise_vaapi; > +extern AVFilter ff_vf_derain; > extern AVFilter ff_vf_deshake; > extern AVFilter ff_vf_despill; > extern AVFilter ff_vf_detelecine; > diff --git a/libavfilter/vf_derain.c b/libavfilter/vf_derain.c > new file mode 100644 > index 00..c380b40122 > --- /dev/null > +++ b/libavfilter/vf_derain.c > @@ -0,0 +1,212 @@ > +/* > + * Copyright (c) 2019 Xuewei Meng > + * > + * 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 as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +/** > + * @file > + * Filter implementing image derain filter using deep convolutional networks. > + * > http://openaccess.thecvf.com/content_ECCV_2018/html/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.html > + */ > + > +#include "libavformat/avio.h" > +#include "libavutil/opt.h" > +#include "avfilter.h" > +#include "dnn_interface.h" > +#include "formats.h" > +#include "internal.h" > + > +typedef struct DRContext { > +const AVClass *class; > + > +char *model_filename; > +DNNBackendType backend_type; > +DNNModule *dnn_module; > +DNNModel *model; > +DNNInputData
[FFmpeg-devel] [PATCH] avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support
Signed-off-by: Steven Liu --- doc/muxers.texi | 4 libavformat/dashenc.c | 4 ++-- libavformat/hlsenc.c | 27 ++- libavformat/hlsplaylist.c | 11 --- libavformat/hlsplaylist.h | 5 +++-- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 83ae017d6c..7f3758b117 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -852,6 +852,10 @@ including the file containing the AES encryption key. Add the @code{#EXT-X-INDEPENDENT-SEGMENTS} to playlists that has video segments and when all the segments of that playlist are guaranteed to start with a Key frame. +@item iframes_only +Add the @code{#EXT-X-I-FRAMES-ONLY} to playlists that has video segments +and only can play i frames in the @code{#EXT-X-BYTERANGE} mode. + @item split_by_time Allow segments to start on frames other than keyframes. This improves behavior on some players when the time between keyframes is inconsistent, diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 94b198ceb8..3fd7e78166 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -471,7 +471,7 @@ static void write_hls_media_playlist(OutputStream *os, AVFormatContext *s, } ff_hls_write_playlist_header(c->m3u8_out, 6, -1, target_duration, - start_number, PLAYLIST_TYPE_NONE); + start_number, PLAYLIST_TYPE_NONE, 0); ff_hls_write_init_file(c->m3u8_out, os->initfile, c->single_file, os->init_range_length, os->init_start_pos); @@ -491,7 +491,7 @@ static void write_hls_media_playlist(OutputStream *os, AVFormatContext *s, (double) seg->duration / timescale, 0, seg->range_length, seg->start_pos, NULL, c->single_file ? os->initfile : seg->file, -&prog_date_time); +&prog_date_time, 0, 0, 0); if (ret < 0) { av_log(os->ctx, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n"); } diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 6b913be31c..4ffc522803 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -75,6 +75,8 @@ typedef struct HLSSegment { int discont; int64_t pos; int64_t size; +int64_t keyframe_pos; +int64_t keyframe_size; unsigned var_stream_idx; char key_uri[LINE_BUFFER_SIZE + 1]; @@ -99,6 +101,7 @@ typedef enum HLSFlags { HLS_TEMP_FILE = (1 << 11), HLS_PERIODIC_REKEY = (1 << 12), HLS_INDEPENDENT_SEGMENTS = (1 << 13), +HLS_I_FRAMES_ONLY = (1 << 14), } HLSFlags; typedef enum { @@ -125,6 +128,9 @@ typedef struct VariantStream { double dpp; // duration per packet int64_t start_pts; int64_t end_pts; +int64_t video_lastpos; +int64_t video_keyframe_pos; +int64_t video_keyframe_size; double duration; // last segment duration computed so far, in seconds int64_t start_pos;// last segment starting position int64_t size; // last segment size @@ -994,6 +1000,8 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, en->duration = duration; en->pos = pos; en->size = size; +en->keyframe_pos = vs->video_keyframe_pos; +en->keyframe_size = vs->video_keyframe_size; en->next = NULL; en->discont = 0; @@ -1411,7 +1419,7 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) vs->discontinuity_set = 0; ff_hls_write_playlist_header(hls->m3u8_out, hls->version, hls->allowcache, - target_duration, sequence, hls->pl_type); + target_duration, sequence, hls->pl_type, hls->flags & HLS_I_FRAMES_ONLY); if((hls->flags & HLS_DISCONT_START) && sequence==hls->start_sequence && vs->discontinuity_set==0 ){ avio_printf(hls->m3u8_out, "#EXT-X-DISCONTINUITY\n"); @@ -1439,7 +1447,7 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) ret = ff_hls_write_file_entry(hls->m3u8_out, en->discont, byterange_mode, en->duration, hls->flags & HLS_ROUND_DURATIONS, en->size, en->pos, vs->baseurl, - en->filename, prog_date_time_p); + en->filename, prog_date_time_p, en->keyframe_size, en->keyframe_pos, hls->flags & HLS_I_FRAMES_ONLY); if (ret < 0) { av_log(s, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n&qu
[FFmpeg-devel] [PATCH] doc/muxers: fix typo of the hls var_stream_map example
Signed-off-by: Steven Liu --- doc/muxers.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 7f3758b117..46580091ba 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -995,7 +995,7 @@ By default, a single hls variant containing all the encoded streams is created. @example ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -map 0:a -map 0:a -map 0:v -f hls \ - -var_stream_map "a:0,agroup:aud_low,default:yes,language=ENG a:1,agroup:aud_low,language:CHN v:0,agroup:aud_low" \ + -var_stream_map "a:0,agroup:aud_low,default:yes,language:ENG a:1,agroup:aud_low,language:CHN v:0,agroup:aud_low" \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 @end example -- 2.15.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] doc/muxers: fix typo of the hls var_stream_map example
> 在 2019年6月2日,21:29,Gyan 写道: > > > > On 02-06-2019 06:44 PM, Steven Liu wrote: >> Signed-off-by: Steven Liu >> --- >> doc/muxers.texi | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 7f3758b117..46580091ba 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -995,7 +995,7 @@ By default, a single hls variant containing all the >> encoded streams is created. >> @example >> ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ >>-map 0:a -map 0:a -map 0:v -f hls \ >> - -var_stream_map "a:0,agroup:aud_low,default:yes,language=ENG >> a:1,agroup:aud_low,language:CHN v:0,agroup:aud_low" \ >> + -var_stream_map "a:0,agroup:aud_low,default:yes,language:ENG >> a:1,agroup:aud_low,language:CHN v:0,agroup:aud_low" \ >>-master_pl_name master.m3u8 \ >>http://example.com/live/out_%v.m3u8 >> @end example > > LGTM. > > Also, you can correct the comment on line 1833 of hlsenc.c > > defalut --> default Fix local and pushed > > Gyan > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support
Signed-off-by: Steven Liu --- doc/muxers.texi | 4 libavformat/dashenc.c | 4 ++-- libavformat/hlsenc.c | 27 ++- libavformat/hlsplaylist.c | 11 --- libavformat/hlsplaylist.h | 5 +++-- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index c73719c421..50147c4d20 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -852,6 +852,10 @@ including the file containing the AES encryption key. Add the @code{#EXT-X-INDEPENDENT-SEGMENTS} to playlists that has video segments and when all the segments of that playlist are guaranteed to start with a Key frame. +@item iframes_only +Add the @code{#EXT-X-I-FRAMES-ONLY} to playlists that has video segments +and can play only I-frames in the @code{#EXT-X-BYTERANGE} mode. + @item split_by_time Allow segments to start on frames other than keyframes. This improves behavior on some players when the time between keyframes is inconsistent, diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 94b198ceb8..3fd7e78166 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -471,7 +471,7 @@ static void write_hls_media_playlist(OutputStream *os, AVFormatContext *s, } ff_hls_write_playlist_header(c->m3u8_out, 6, -1, target_duration, - start_number, PLAYLIST_TYPE_NONE); + start_number, PLAYLIST_TYPE_NONE, 0); ff_hls_write_init_file(c->m3u8_out, os->initfile, c->single_file, os->init_range_length, os->init_start_pos); @@ -491,7 +491,7 @@ static void write_hls_media_playlist(OutputStream *os, AVFormatContext *s, (double) seg->duration / timescale, 0, seg->range_length, seg->start_pos, NULL, c->single_file ? os->initfile : seg->file, -&prog_date_time); +&prog_date_time, 0, 0, 0); if (ret < 0) { av_log(os->ctx, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n"); } diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 1613c34509..9884f74d51 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -75,6 +75,8 @@ typedef struct HLSSegment { int discont; int64_t pos; int64_t size; +int64_t keyframe_pos; +int64_t keyframe_size; unsigned var_stream_idx; char key_uri[LINE_BUFFER_SIZE + 1]; @@ -99,6 +101,7 @@ typedef enum HLSFlags { HLS_TEMP_FILE = (1 << 11), HLS_PERIODIC_REKEY = (1 << 12), HLS_INDEPENDENT_SEGMENTS = (1 << 13), +HLS_I_FRAMES_ONLY = (1 << 14), } HLSFlags; typedef enum { @@ -125,6 +128,9 @@ typedef struct VariantStream { double dpp; // duration per packet int64_t start_pts; int64_t end_pts; +int64_t video_lastpos; +int64_t video_keyframe_pos; +int64_t video_keyframe_size; double duration; // last segment duration computed so far, in seconds int64_t start_pos;// last segment starting position int64_t size; // last segment size @@ -994,6 +1000,8 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, en->duration = duration; en->pos = pos; en->size = size; +en->keyframe_pos = vs->video_keyframe_pos; +en->keyframe_size = vs->video_keyframe_size; en->next = NULL; en->discont = 0; @@ -1411,7 +1419,7 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) vs->discontinuity_set = 0; ff_hls_write_playlist_header(hls->m3u8_out, hls->version, hls->allowcache, - target_duration, sequence, hls->pl_type); + target_duration, sequence, hls->pl_type, hls->flags & HLS_I_FRAMES_ONLY); if((hls->flags & HLS_DISCONT_START) && sequence==hls->start_sequence && vs->discontinuity_set==0 ){ avio_printf(hls->m3u8_out, "#EXT-X-DISCONTINUITY\n"); @@ -1439,7 +1447,7 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) ret = ff_hls_write_file_entry(hls->m3u8_out, en->discont, byterange_mode, en->duration, hls->flags & HLS_ROUND_DURATIONS, en->size, en->pos, vs->baseurl, - en->filename, prog_date_time_p); + en->filename, prog_date_time_p, en->keyframe_size, en->keyframe_pos, hls->flags & HLS_I_FRAMES_ONLY); if (ret < 0) { av_log(s, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n&qu
[FFmpeg-devel] [PATCH] avformat/dashdec: add http_proxy, referer and rw_timeout http method support for segments
Signed-off-by: Steven Liu --- libavformat/dashdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 2c50f23c06..315dcae651 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1834,7 +1834,9 @@ end: static int save_avio_options(AVFormatContext *s) { DASHContext *c = s->priv_data; -const char *opts[] = { "headers", "user_agent", "cookies", NULL }, **opt = opts; +const char *opts[] = { +"headers", "user_agent", "cookies", "http_proxy", "referer", "rw_timeout", NULL }, +const char **opt = opts; uint8_t *buf = NULL; int ret = 0; -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] avformat/dashdec: add http_proxy, referer and rw_timeout http method support for segments
Signed-off-by: Steven Liu --- libavformat/dashdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 2c50f23c06..315dcae651 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1834,7 +1834,9 @@ end: static int save_avio_options(AVFormatContext *s) { DASHContext *c = s->priv_data; -const char *opts[] = { "headers", "user_agent", "cookies", NULL }, **opt = opts; +const char *opts[] = { +"headers", "user_agent", "cookies", "http_proxy", "referer", "rw_timeout", NULL }; +const char **opt = opts; uint8_t *buf = NULL; int ret = 0; -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/hls: avformat_find_stream_info when the audio list in the variant
Signed-off-by: Steven Liu --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 19ea88e706..7b29b3f5d1 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1942,7 +1942,7 @@ static int hls_read_header(AVFormatContext *s) * but for other streams we can rely on our user calling avformat_find_stream_info() * on us if they want to. */ -if (pls->is_id3_timestamped) { +if (pls->is_id3_timestamped || (pls->n_renditions > 0 && pls->renditions[0]->type == AVMEDIA_TYPE_AUDIO)) { ret = avformat_find_stream_info(pls->ctx, NULL); if (ret < 0) goto fail; -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] fix typo in dashenc
Alfred E. Heggestad 于2019年6月4日周二 下午3:52写道: > > > > > From 885abee797458936e39b4a252e96836d3d6e3213 Mon Sep 17 00:00:00 2001 > From: "Alfred E. Heggestad" > Date: Tue, 4 Jun 2019 09:39:59 +0200 > Subject: [PATCH] dashenc: fix typo in seg_duration description > > --- > libavformat/dashenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > index 94b198ceb8..a70e9d176c 100644 > --- a/libavformat/dashenc.c > +++ b/libavformat/dashenc.c > @@ -1863,7 +1863,7 @@ static const AVOption options[] = { > #if FF_API_DASH_MIN_SEG_DURATION > { "min_seg_duration", "minimum segment duration (in microseconds) > (will be deprecated)", OFFSET(min_seg_duration), AV_OPT_TYPE_INT, { .i64 > = 500 }, 0, INT_MAX, E }, > #endif > -{ "seg_duration", "segment duration (in seconds, fractional value > can be set)", OFFSET(seg_duration), AV_OPT_TYPE_DURATION, { .i64 = > 500 }, 0, INT_MAX, E }, > +{ "seg_duration", "segment duration (in microseconds, fractional > value can be set)", OFFSET(seg_duration), AV_OPT_TYPE_DURATION, { .i64 = > 500 }, 0, INT_MAX, E }, > { "remove_at_exit", "remove all segments when finished", > OFFSET(remove_at_exit), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, > { "use_template", "Use SegmentTemplate instead of SegmentList", > OFFSET(use_template), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, E }, > { "use_timeline", "Use SegmentTimeline in SegmentTemplate", > OFFSET(use_timeline), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, E }, > -- > 2.20.1 (Apple Git-117) > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/hls: add http 2.0 version number compare for the http_multiple
Signed-off-by: Steven Liu --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 7b29b3f5d1..ab4e7b7d50 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1467,7 +1467,7 @@ reload: uint8_t *http_version_opt = NULL; int r = av_opt_get(v->input, "http_version", AV_OPT_SEARCH_CHILDREN, &http_version_opt); if (r >= 0) { -c->http_multiple = strncmp((const char *)http_version_opt, "1.1", 3) == 0; +c->http_multiple = (!strncmp((const char *)http_version_opt, "1.1", 3) || !strncmp((const char *)http_version_opt, "2.0", 3)); av_freep(&http_version_opt); } } -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v3] libavfilter: Add derain filter
Steven Liu 于2019年6月1日周六 上午8:30写道: > > > > > 在 2019年5月30日,20:35,Xuewei Meng 写道: > > > > Remove the rain in the input image/video by applying the derain > > methods based on convolutional neural networks. Training scripts > > as well as scripts for model generation are provided in the > > repository at https://github.com/XueweiMeng/derain_filter.git. > > > > Signed-off-by: Xuewei Meng > > --- > > doc/filters.texi | 34 +++ > > libavfilter/Makefile | 1 + > > libavfilter/allfilters.c | 1 + > > libavfilter/vf_derain.c | 212 +++ > > 4 files changed, 248 insertions(+) > > create mode 100644 libavfilter/vf_derain.c > > > > diff --git a/doc/filters.texi b/doc/filters.texi > > index 4fdcfe919e..f1d3841ed3 100644 > > --- a/doc/filters.texi > > +++ b/doc/filters.texi > > @@ -8248,6 +8248,40 @@ delogo=x=0:y=0:w=100:h=77:band=10 > > > > @end itemize > > > > +@section derain > > + > > +Remove the rain in the input image/video by applying the derain methods > > based on > > +convolutional neural networks. Supported models: > > + > > +@itemize > > +@item > > +Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN). > > +See > > @url{http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf}. > > +@end itemize > > + > > +Training scripts as well as scripts for model generation are provided in > > +the repository at @url{https://github.com/XueweiMeng/derain_filter.git}. > > + > > +The filter accepts the following options: > > + > > +@table @option > > +@item dnn_backend > > +Specify which DNN backend to use for model loading and execution. This > > option accepts > > +the following values: > > + > > +@table @samp > > +@item native > > +Native implementation of DNN loading and execution. > > +@end table > > +Default value is @samp{native}. > > + > > +@item model > > +Set path to model file specifying network architecture and its parameters. > > +Note that different backends use different file formats. TensorFlow backend > > +can load files for both formats, while native backend can load files for > > only > > +its format. > > +@end table > > + > > @section deshake > > > > Attempt to fix small changes in horizontal and/or vertical shift. This > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > > index 9a61c25b05..b7191d0081 100644 > > --- a/libavfilter/Makefile > > +++ b/libavfilter/Makefile > > @@ -200,6 +200,7 @@ OBJS-$(CONFIG_DCTDNOIZ_FILTER) += > > vf_dctdnoiz.o > > OBJS-$(CONFIG_DEBAND_FILTER) += vf_deband.o > > OBJS-$(CONFIG_DEBLOCK_FILTER)+= vf_deblock.o > > OBJS-$(CONFIG_DECIMATE_FILTER) += vf_decimate.o > > +OBJS-$(CONFIG_DERAIN_FILTER) += vf_derain.o > > OBJS-$(CONFIG_DECONVOLVE_FILTER) += vf_convolve.o framesync.o > > OBJS-$(CONFIG_DEDOT_FILTER) += vf_dedot.o > > OBJS-$(CONFIG_DEFLATE_FILTER)+= vf_neighbor.o > > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c > > index 40534738ee..f3c8883960 100644 > > --- a/libavfilter/allfilters.c > > +++ b/libavfilter/allfilters.c > > @@ -196,6 +196,7 @@ extern AVFilter ff_vf_deinterlace_vaapi; > > extern AVFilter ff_vf_dejudder; > > extern AVFilter ff_vf_delogo; > > extern AVFilter ff_vf_denoise_vaapi; > > +extern AVFilter ff_vf_derain; > > extern AVFilter ff_vf_deshake; > > extern AVFilter ff_vf_despill; > > extern AVFilter ff_vf_detelecine; > > diff --git a/libavfilter/vf_derain.c b/libavfilter/vf_derain.c > > new file mode 100644 > > index 00..c380b40122 > > --- /dev/null > > +++ b/libavfilter/vf_derain.c > > @@ -0,0 +1,212 @@ > > +/* > > + * Copyright (c) 2019 Xuewei Meng > > + * > > + * 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 as published by the Free Software Foundation; either > > + * version 2.1 of the License, or (at your option) any later version. > > + * > > + * FFmpeg is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > + * Le
Re: [FFmpeg-devel] [PATCH V1 1/2] lavf/hlsenc: Update suboption for hls_playlist_type
> 在 2019年6月16日,19:42,Jun Zhao 写道: > > From: Jun Zhao > > Update suboption for hls_playlist_type > > Signed-off-by: Jun Zhao > --- > libavformat/hlsenc.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 9884f74..6c0d0a5 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -2945,6 +2945,7 @@ static const AVOption options[] = { > #endif > {"strftime_mkdir", "create last directory component in strftime-generated > filename", OFFSET(use_localtime_mkdir), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, > E }, > {"hls_playlist_type", "set the HLS playlist type", OFFSET(pl_type), > AV_OPT_TYPE_INT, {.i64 = PLAYLIST_TYPE_NONE }, 0, PLAYLIST_TYPE_NB-1, E, > "pl_type" }, > +{"none", "Not contain the EXT-X-PLAYLIST-TYPE tag", 0, > AV_OPT_TYPE_CONST, {.i64 = PLAYLIST_TYPE_NONE }, INT_MIN, INT_MAX, E, > "pl_type" }, This option is same as don’t use hls_playlist_type, is it? > > {"event", "EVENT playlist", 0, AV_OPT_TYPE_CONST, {.i64 = > PLAYLIST_TYPE_EVENT }, INT_MIN, INT_MAX, E, "pl_type" }, > {"vod", "VOD playlist", 0, AV_OPT_TYPE_CONST, {.i64 = PLAYLIST_TYPE_VOD > }, INT_MIN, INT_MAX, E, "pl_type" }, > {"method", "set the HTTP method(default: PUT)", OFFSET(method), > AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0,E}, > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] dash: change default MP4 extension to .m4s
Alfred E. Heggestad 于2019年6月17日周一 下午4:02写道: > > From 923da82598bddd1ed05750427dbc71e607d296a2 Mon Sep 17 00:00:00 2001 > From: "Alfred E. Heggestad" > Date: Mon, 17 Jun 2019 09:59:04 +0200 > Subject: [PATCH] dash: change default MP4 extension to .m4s > > this was changed in commit 281a21ed50849e3c8c0d03005230e9fd07c24370 > --- > libavformat/dashenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > index 3fd7e78166..a51a1da0ca 100644 > --- a/libavformat/dashenc.c > +++ b/libavformat/dashenc.c > @@ -166,7 +166,7 @@ static struct format_string { > const char *str; > } formats[] = { > { SEGMENT_TYPE_AUTO, "auto" }, > -{ SEGMENT_TYPE_MP4, "mp4" }, > +{ SEGMENT_TYPE_MP4, "m4s" }, > { SEGMENT_TYPE_WEBM, "webm" }, > { 0, NULL } > }; > -- > 2.20.1 (Apple Git-117) > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] av_format/hlsenc: fix %v handling by format_name function
Bodecs Bela 于2019年6月18日周二 上午5:57写道: > > Hi All, > > When multiple variant streams are specified by var_stream_map option, %v > placeholder in various names ensures that each variant has its unique > names. Most of %v handlng is done in format_name function. Currently > in this function the result buffer is the same as the > input pattern buffer, so you must allocate it before calling format_name > function. It also means, that it is silently assumed that the result > string will NOT be > longer that the pattern string. It is true most of the time, because %v > may appear only once in the pattern string and number of variant streams > is less than 100 in practical cases. But theoretically it will fail if > specified number of variant streams is greater than 100 (i.e. longer > than 2 digits). > This patch fixes this behaviour by altering format_name function to > allocate the > result buffer and return it to the caller. > > Please, review this patch. > > best, > > Bela > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1] lavf/flvenc: add automatic bitstream filtering
> 在 2019年6月22日,17:04,Jun Zhao 写道: > > From: Jun Zhao > > add automatic bitstream filtering when mux AAC > > Signed-off-by: Jun Zhao > --- > libavformat/flvenc.c | 27 --- > 1 files changed, 24 insertions(+), 3 deletions(-) > > diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c > index e4863f1..fb1dede 100644 > --- a/libavformat/flvenc.c > +++ b/libavformat/flvenc.c > @@ -653,11 +653,9 @@ end: > return ret; > } > > - > -static int flv_write_header(AVFormatContext *s) > +static int flv_init(struct AVFormatContext *s) > { > int i; > -AVIOContext *pb = s->pb; > FLVContext *flv = s->priv_data; > > for (i = 0; i < s->nb_streams; i++) { > @@ -736,6 +734,15 @@ static int flv_write_header(AVFormatContext *s) > > flv->delay = AV_NOPTS_VALUE; > > +return 0; > +} > + > +static int flv_write_header(AVFormatContext *s) > +{ > +int i; > +AVIOContext *pb = s->pb; > +FLVContext *flv = s->priv_data; > + > avio_write(pb, "FLV", 3); > avio_w8(pb, 1); > avio_w8(pb, FLV_HEADER_FLAG_HASAUDIO * !!flv->audio_par + > @@ -1074,6 +1081,18 @@ static int flv_write_packet(AVFormatContext *s, > AVPacket *pkt) > return pb->error; > } > > +static int flv_check_bitstream(struct AVFormatContext *s, const AVPacket > *pkt) > +{ > +int ret = 1; > +AVStream *st = s->streams[pkt->stream_index]; > + > +if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { > +if (pkt->size > 2 && (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) > +ret = ff_stream_add_bitstream_filter(st, "aac_adtstoasc", NULL); > +} > +return ret; > +} > + > static const AVOption options[] = { > { "flvflags", "FLV muxer flags", offsetof(FLVContext, flags), > AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, > "flvflags" }, > { "aac_seq_header_detect", "Put AAC sequence header based on stream > data", 0, AV_OPT_TYPE_CONST, {.i64 = FLV_AAC_SEQ_HEADER_DETECT}, INT_MIN, > INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "flvflags" }, > @@ -1099,9 +1118,11 @@ AVOutputFormat ff_flv_muxer = { > .priv_data_size = sizeof(FLVContext), > .audio_codec= CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : > AV_CODEC_ID_ADPCM_SWF, > .video_codec= AV_CODEC_ID_FLV1, > +.init = flv_init, > .write_header = flv_write_header, > .write_packet = flv_write_packet, > .write_trailer = flv_write_trailer, > +.check_bitstream= flv_check_bitstream, > .codec_tag = (const AVCodecTag* const []) { > flv_video_codec_ids, flv_audio_codec_ids, 0 > }, > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. LGTM Don’t forget add add Reported-by: Yabo Wei Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: better checking var_stream_map content
> 在 2019年6月20日,15:46,Bodecs Bela 写道: > > Dear All, > > When multiple variant streams are specified by var_stream_map option, > implementation assumes that each elementary stream is assigned only once > to any variant. But this is not checked currently. But 2nd and further > instances > of same elementary source streams are silently neglected without any notice. > Examples for invalid var_stream_map content: > "v:0,a:0 v:1,a:0" > This is invalid because 1st and 2nd variant also contains a:0 source > > "v:0,a:0,v:0 v:1,a:1" > This is invalid because 1st variant source contains v:0 twice. > > This patch makes this checking early, during the var_stream_map parsing phase. > > please review this patch. > > best > > Bela > > <0001-avformat-hlsenc-better-checking-var_stream_map-conte.patch>___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. Applied! Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: better error log message for var_stream_map content
Bodecs Bela 于2019年6月22日周六 下午10:01写道: > > Dear All, > > When multiple variant streams are specified by var_stream_map option, > %v is expected either in the filename or in the last sub-directory name, > but only in one of them. When both of them contain %v string, current > error message only states half of the "truth". > Additionally %v may appears several times inside the last sub-directory name > or in filename pattern. > This patch clarifies this in the log message and in the doc also. > > please review this patch. > > best > > Bela > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Applied Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] libavfilter: Add derain filter changeLog
> 在 2019年6月13日,18:56,Xuewei Meng 写道: > > Signed-off-by: Xuewei Meng > --- > Changelog | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Changelog b/Changelog > index 0e4e9eb7b9..086f36b966 100644 > --- a/Changelog > +++ b/Changelog > @@ -32,6 +32,7 @@ version : > - asr filter > - showspatial multimedia filter > - VP4 video decoder > +- derain filter > > > version 4.1: > -- > 2.17.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. Applied Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v10 1/2] lavf/vf_transpose: add exif orientation support
} > >>>> > >>>> -if (s->dir & 2) { > >>>> +if (dir & 2) { > >>>> dst = out->data[plane] + dstlinesize * (outh - > >>>> start - 1); > >>>> dstlinesize *= -1; > >>>> } > >>>> @@ -326,6 +402,22 @@ static int filter_slice(AVFilterContext *ctx, void > >>>> *arg, int jobnr, > >>>> return 0; > >>>> } > >>>> > >>>> +static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, > >>>> +int nb_jobs) > >>>> +{ > >>>> +TransContext *s = ctx->priv; > >>>> +ThreadData *td = arg; > >>>> +AVFrame *out = td->out; > >>>> +AVFrame *in = td->in; > >>>> +int orientation = td->orientation; > >>>> + > >>>> +if (orientation > ORIENTATION_NONE && orientation <= > >>>> ORIENTATION_VFLIP) { > >>>> +return ff_hflip_filter_slice(&s->ctx.flip, in, out, jobnr, > >>>> nb_jobs, > >>>> + orientation == > >>>> ORIENTATION_ROTATE180); > >>>> +} > >>>> +return transpose_filter_slice(ctx, arg, jobnr, nb_jobs); > >>>> +} > >>>> + > >>>> static int filter_frame(AVFilterLink *inlink, AVFrame *in) > >>>> { > >>>> AVFilterContext *ctx = inlink->dst; > >>>> @@ -333,10 +425,29 @@ static int filter_frame(AVFilterLink *inlink, > >>>> AVFrame *in) > >>>> AVFilterLink *outlink = ctx->outputs[0]; > >>>> ThreadData td; > >>>> AVFrame *out; > >>>> +int orientation = ORIENTATION_NONE; > >>>> > >>>> if (s->passthrough) > >>>> return ff_filter_frame(outlink, in); > >>>> > >>>> +if (s->orientation) { > >>>> +orientation = get_frame_orientation(ctx, in); > >>>> +if (orientation == ORIENTATION_NORMAL) // orientation > >>>> 'Normal', do nothing > >>>> +return ff_filter_frame(outlink, in); > >>>> + > >>>> +if (orientation == ORIENTATION_VFLIP) { > >>>> +int i; > >>>> +for (i = 0; i < 4; i ++) { > >>>> +int height = s->ctx.flip.planeheight[i]; > >>>> +if (in->data[i]) { > >>>> +in->data[i] += (height - 1) * in->linesize[i]; > >>>> +in->linesize[i] = -in->linesize[i]; > >>>> +} > >>>> +} > >>>> +return ff_filter_frame(outlink, in); > >>>> +} > >>>> +} > >>>> + > >>>> out = ff_get_video_buffer(outlink, outlink->w, outlink->h); > >>>> if (!out) { > >>>> av_frame_free(&in); > >>>> @@ -346,12 +457,14 @@ static int filter_frame(AVFilterLink *inlink, > >>>> AVFrame *in) > >>>> > >>>> if (in->sample_aspect_ratio.num == 0) { > >>>> out->sample_aspect_ratio = in->sample_aspect_ratio; > >>>> -} else { > >>>> +} else if (s->orientation == ORIENTATION_AUTO_TRANSPOSE || > >>>> + orientation > ORIENTATION_VFLIP) { // transpose > >>>> out->sample_aspect_ratio.num = in->sample_aspect_ratio.den; > >>>> out->sample_aspect_ratio.den = in->sample_aspect_ratio.num; > >>>> } > >>>> > >>>> td.in = in, td.out = out; > >>>> +td.orientation = orientation; > >>>> ctx->internal->execute(ctx, filter_slice, &td, NULL, > >>>> FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); > >>>> av_frame_free(&in); > >>>> return ff_filter_frame(outlink, out); > >>>> @@ -373,6 +486,19 @@ static const AVOption transpose_options[] = { > >>>> { "portrait", "preserve portrait geometry", 0, > >>>> AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_PORTRAIT}, INT_MIN, INT_MAX, > >>>> FLAGS, "passthrough" }, > >>>> { "landscape", "preserve landscape geometry", 0, > >>>> AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_LANDSCAPE}, INT_MIN, INT_MAX, > >>>> FLAGS, "passthrough" }, > >>>> > >>>> +{ "orientation", "apply frame exif orientation", > >>>> + OFFSET(orientation), AV_OPT_TYPE_INT, {.i64 = ORIENTATION_NONE > >>>> }, ORIENTATION_AUTO_TRANSPOSE, ORIENTATION_ROTATE270CW, FLAGS, > >>>> "orientation" }, > >>>> +{ "auto_transpose","apply transposition if frame's > >>>> orientation value is in range [5,8]", 0, > >>>> AV_OPT_TYPE_CONST, {.i64=ORIENTATION_AUTO_TRANSPOSE},INT_MIN, > >>>> INT_MAX, > >>>> FLAGS, "orientation" }, > >>>> +{ "auto_flip", "apply flip if frame's orientation > >>>> value is in range [1,4]", 0, > >>>> AV_OPT_TYPE_CONST, {.i64=ORIENTATION_AUTO_FLIP}, INT_MIN, > >>>> INT_MAX, > >>>> FLAGS, "orientation" }, > >>>> +{ "none", "apply default transposition, same as > >>>> dir=cclock_flip", 0, AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_NONE}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "normal","exif orientation 'Normal', do not > >>>> apply any flip or transposition", 0, > >>>> AV_OPT_TYPE_CONST, {.i64=ORIENTATION_NORMAL},INT_MIN, > >>>> INT_MAX, > >>>> FLAGS, "orientation" }, > >>>> +{ "hflip", "exif orientation 'Mirror horizontal', > >>>> apply horizontal flip",0, AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_HFLIP}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "rotate180", "exif orientation 'Rotate 180', apply > >>>> rotation 180", 0, AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_ROTATE180}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "vflip", "exif orientation 'Mirror vertical', > >>>> apply vertical flip",0, > >>>> AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_VFLIP}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "hflip_rotate270cw", "exif orientation 'Mirror horizontal > >>>> and rotate 270 CW', same effect as dir=cclock_flip", 0, > >>>> AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_HFLIP_ROTATE270CW}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "rotate90cw","exif orientation 'Rotate 90 CW', same > >>>> as dir=clock", 0, AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_ROTATE90CW},INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "hflip_rotate90cw", "exif orientation 'Mirror horizontal > >>>> and rotate 90 CW', same effect as dir=clock_flip", 0, > >>>> AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_HFLIP_ROTATE90CW}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> +{ "rotate270", "exif orientation 'Rotate 270 CW', same > >>>> as dir=cclock", 0, AV_OPT_TYPE_CONST, > >>>> {.i64=ORIENTATION_ROTATE270CW}, INT_MIN, INT_MAX, FLAGS, > >>>> "orientation" }, > >>>> { NULL } > >>>> }; > >>>> > >>>> -- > >>>> 2.17.1 > >>>> > >>>> > >>> Ping :) > >>> > >> > >> Ping x 2 > >> > > > > Ping x3, could someone please help to take a look ? Really appreciate that. > > > > > Ping x4. This is to address exif auto-rotate, make fate test passed. > > > -Jun > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Any comments? Thanks Steven Liu ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] hlsenc: Add option to set custom HTTP headers
Derek Buitenhuis 于2019年6月27日周四 上午1:04写道: > > Signed-off-by: Derek Buitenhuis > --- > Onward and upward with the never-ending quest to manually forward > all the HTTP options to the subcontexts in every meta-muxer! > --- > doc/muxers.texi | 3 +++ > libavformat/hlsenc.c | 4 > 2 files changed, 7 insertions(+) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 6c5b4bb637..59c93bc687 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -1089,6 +1089,9 @@ Set timeout for socket I/O operations. Applicable only > for HTTP output. > @item -ignore_io_errors > Ignore IO errors during open, write and delete. Useful for long-duration > runs with network output. > > +@item headers > +Set custom HTTP headers, can override built in default headers. Applicable > only for HTTP output. > + > @end table > > @anchor{ico} > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 9f5eee5491..37ae128f4f 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -237,6 +237,7 @@ typedef struct HLSContext { > AVIOContext *sub_m3u8_out; > int64_t timeout; > int ignore_io_errors; > +char *headers; > int has_default_key; /* has DEFAULT field of var_stream_map */ > int has_video_m3u8; /* has video stream m3u8 list */ > } HLSContext; > @@ -294,6 +295,8 @@ static void set_http_options(AVFormatContext *s, > AVDictionary **options, HLSCont > av_dict_set_int(options, "multiple_requests", 1, 0); > if (c->timeout >= 0) > av_dict_set_int(options, "timeout", c->timeout, 0); > +if (c->headers) > +av_dict_set(options, "headers", c->headers, 0); > } > > static void write_codec_attr(AVStream *st, VariantStream *vs) { > @@ -3029,6 +3032,7 @@ static const AVOption options[] = { > {"http_persistent", "Use persistent HTTP connections", > OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E }, > {"timeout", "set timeout for socket I/O operations", OFFSET(timeout), > AV_OPT_TYPE_DURATION, { .i64 = -1 }, -1, INT_MAX, .flags = E }, > {"ignore_io_errors", "Ignore IO errors for stable long-duration runs > with network output", OFFSET(ignore_io_errors), AV_OPT_TYPE_BOOL, { .i64 = 0 > }, 0, 1, E }, > +{"headers", "set custom HTTP headers, can override built in default > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E }, > { NULL }, > }; > > -- > 2.20.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/3] avutil/hwcontext_vaapi: move kernel_driver into CONFIG_LIBDRM
Signed-off-by: Steven Liu --- libavutil/hwcontext_vaapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 4227c3c090..cf117640f2 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -1514,10 +1514,12 @@ static int vaapi_device_create(AVHWDeviceContext *ctx, const char *device, break; } } else { -const AVDictionaryEntry *kernel_driver; char path[64]; int n, max_devices = 8; +#if CONFIG_LIBDRM +const AVDictionaryEntry *kernel_driver; kernel_driver = av_dict_get(opts, "kernel_driver", NULL, 0); +#endif for (n = 0; n < max_devices; n++) { snprintf(path, sizeof(path), "/dev/dri/renderD%d", 128 + n); -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/3] avcodec/videotoolboxenc: remove unused variable
Signed-off-by: Steven Liu --- libavcodec/videotoolboxenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 3665581283..67faca4751 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -2395,8 +2395,6 @@ static int vtenc_populate_extradata(AVCodecContext *avctx, goto pe_cleanup; } -unsigned pbuftype = CVPixelBufferGetPixelFormatType(pix_buf); - time = CMTimeMake(0, avctx->time_base.den); status = VTCompressionSessionEncodeFrame(vtctx->session, pix_buf, -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/3] avcodec/cfhd: remove unused function
Signed-off-by: Steven Liu --- libavcodec/cfhd.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 846d334b9b..616f5af193 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -136,20 +136,6 @@ static inline void peak_table(int16_t *band, Peak *peak, int length) band[i] = bytestream2_get_le16(&peak->base); } -static inline void process_alpha(int16_t *alpha, int width) -{ -int i, channel; -for (i = 0; i < width; i++) { -channel = alpha[i]; -channel -= ALPHA_COMPAND_DC_OFFSET; -channel <<= 3; -channel *= ALPHA_COMPAND_GAIN; -channel >>= 16; -channel = av_clip_uintp2(channel, 12); -alpha[i] = channel; -} -} - static inline void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, -- 2.17.2 (Apple Git-113) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".