Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: add error message for encrypt fmp4 mode
On 4/16/2018 11:14 AM, Steven Liu wrote: +av_log(s, AV_LOG_ERROR, "have not support encrypt fmp4 now\n"); Suggest "Encrypted fmp4 not yet supported\n" av_log(s, AV_LOG_WARNING, "Cannot use both -hls_key_info_file and -hls_enc," " will use -hls_key_info_file priority\n"); "Cannot use both -hls_key_info_file and -hls_enc," " ignoring -hls_enc\n" Thanks, Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/hlsenc: add error message for encrypt fmp4 mode
hlsenc have not support encrypty fmp4 yet now. Signed-off-by: Steven Liu--- libavformat/hlsenc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c7540166ab..5c9e646962 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1591,6 +1591,11 @@ static int hls_start(AVFormatContext *s, VariantStream *vs) } if (c->key_info_file || c->encrypt) { +if (c->segment_type == SEGMENT_TYPE_FMP4) { +av_log(s, AV_LOG_ERROR, "have not support encrypt fmp4 now\n"); +return AVERROR_PATCHWELCOME; +} + if (c->key_info_file && c->encrypt) { av_log(s, AV_LOG_WARNING, "Cannot use both -hls_key_info_file and -hls_enc," " will use -hls_key_info_file priority\n"); -- 2.15.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v4 1/1] avformat/dashenc: replacing 'min_seg_duration' with 'seg_duration'
From: Vishwanath DixitThere are use cases where average segment duration needs to be configured and muxer is expected to maintain the average segment duration. So, using the name 'min_seg_duration' will be misleading. So, changing the parameter name to 'seg_duration', where it can be minimum segment duration or average segment duration based on the use-case. The additional updates needed for this functinality are made the sub-sequent patches of this patch series. --- doc/muxers.texi | 4 +++- libavformat/dashenc.c | 23 ++- libavformat/version.h | 3 +++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index f288764..fad9c9a 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -226,7 +226,9 @@ ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 @table @option @item -min_seg_duration @var{microseconds} -Set the segment length in microseconds. +This is a deprecated option to set the segment length in microseconds, use @var{seg_duration} instead. +@item -seg_duration @var{duration} +Set the segment length in seconds (fractional value can be set). @item -window_size @var{size} Set the maximum number of segments kept in the manifest. @item -extra_window_size @var{size} diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index bdf8c8d..7169e11 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -94,7 +94,10 @@ typedef struct DASHContext { int nb_as; int window_size; int extra_window_size; +#if FF_API_DASH_MIN_SEG_DURATION int min_seg_duration; +#endif +int64_t seg_duration; int remove_at_exit; int use_template; int use_timeline; @@ -871,6 +874,13 @@ static int dash_init(AVFormatContext *s) if (c->single_file) c->use_template = 0; +#if FF_API_DASH_MIN_SEG_DURATION +if (c->min_seg_duration != 500) { +av_log(s, AV_LOG_WARNING, "The min_seg_duration option is deprecated and will be removed. Please use the -seg_duration\n"); +c->seg_duration = c->min_seg_duration; +} +#endif + av_strlcpy(c->dirname, s->url, sizeof(c->dirname)); ptr = strrchr(c->dirname, '/'); if (ptr) { @@ -974,7 +984,7 @@ static int dash_init(AVFormatContext *s) else av_dict_set(, "movflags", "frag_custom+dash+delay_moov", 0); } else { -av_dict_set_int(, "cluster_time_limit", c->min_seg_duration / 1000, 0); +av_dict_set_int(, "cluster_time_limit", c->seg_duration / 1000, 0); av_dict_set_int(, "cluster_size_limit", 5 * 1024 * 1024, 0); // set a large cluster size limit av_dict_set_int(, "dash", 1, 0); av_dict_set_int(, "dash_track_number", i + 1, 0); @@ -1020,8 +1030,8 @@ static int dash_init(AVFormatContext *s) os->segment_index = 1; } -if (!c->has_video && c->min_seg_duration <= 0) { -av_log(s, AV_LOG_WARNING, "no video stream and no min seg duration set\n"); +if (!c->has_video && c->seg_duration <= 0) { +av_log(s, AV_LOG_WARNING, "no video stream and no seg duration set\n"); return AVERROR(EINVAL); } return 0; @@ -1287,7 +1297,7 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt) if ((!c->has_video || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && pkt->flags & AV_PKT_FLAG_KEY && os->packets_written && av_compare_ts(pkt->pts - os->start_pts, st->time_base, - c->min_seg_duration, AV_TIME_BASE_Q) >= 0) { + c->seg_duration, AV_TIME_BASE_Q) >= 0) { int64_t prev_duration = c->last_duration; c->last_duration = av_rescale_q(pkt->pts - os->start_pts, @@ -1427,7 +1437,10 @@ static const AVOption options[] = { { "adaptation_sets", "Adaptation sets. Syntax: id=0,streams=0,1,2 id=1,streams=3,4 and so on", OFFSET(adaptation_sets), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { "window_size", "number of segments kept in the manifest", OFFSET(window_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, E }, { "extra_window_size", "number of segments kept outside of the manifest before removing from disk", OFFSET(extra_window_size), AV_OPT_TYPE_INT, { .i64 = 5 }, 0, INT_MAX, E }, -{ "min_seg_duration", "minimum segment duration (in microseconds)", OFFSET(min_seg_duration), AV_OPT_TYPE_INT, { .i64 = 500 }, 0, INT_MAX, E }, +#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 }, { "remove_at_exit", "remove all segments when finished", OFFSET(remove_at_exit), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
[FFmpeg-devel] [PATCH] avformat/movenc: forbid muxing AV1 streams until the spec is finished
This prevents creating potentially broken files, as both the AV1 and the AV1 in ISOMBFF specs are unfinished. Signed-off-by: James Almer--- This is mainly so it's effective in ffmpeg 4.0, the first version to support libaom (including pre-bitstream freeze builds). Best to prevent muxing files that may not work anymore a few months from now. libavformat/movenc.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d03d7906a1..dc5c842cb8 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6081,6 +6081,10 @@ static int mov_init(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "VP9 only supported in MP4.\n"); return AVERROR(EINVAL); } +} else if (track->par->codec_id == AV_CODEC_ID_AV1) { +/* spec is not finished, so forbid for now */ +av_log(s, AV_LOG_ERROR, "AV1 muxing is currently not supported.\n"); +return AVERROR_PATCHWELCOME; } else if (track->par->codec_id == AV_CODEC_ID_VP8) { /* altref frames handling is not defined in the spec as of version v1.0, * so just forbid muxing VP8 streams altogether until a new version does */ -- 2.16.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/hls: remove redundant code
On 2018/4/13 20:29, Steven Liu wrote: > 2018-04-13 16:19 GMT+08:00 Jun Zhao: >> >> On 2018/4/12 16:48, Steven Liu wrote: >>> Signed-off-by: Steven Liu >>> --- >>> libavformat/hls.c | 27 +-- >>> 1 file changed, 9 insertions(+), 18 deletions(-) >>> >>> diff --git a/libavformat/hls.c b/libavformat/hls.c >>> index ae0545a086..74f0c2ccc5 100644 >>> --- a/libavformat/hls.c >>> +++ b/libavformat/hls.c >>> @@ -945,14 +945,8 @@ static struct segment *next_segment(struct playlist >>> *pls) >>> return pls->segments[n]; >>> } >>> >>> -enum ReadFromURLMode { >>> -READ_NORMAL, >>> -READ_COMPLETE, >>> -}; >>> - >>> static int read_from_url(struct playlist *pls, struct segment *seg, >>> - uint8_t *buf, int buf_size, >>> - enum ReadFromURLMode mode) >>> + uint8_t *buf, int buf_size) >>> { >>> int ret; >>> >>> @@ -960,12 +954,9 @@ static int read_from_url(struct playlist *pls, struct >>> segment *seg, >>> if (seg->size >= 0) >>> buf_size = FFMIN(buf_size, seg->size - pls->cur_seg_offset); >>> >>> -if (mode == READ_COMPLETE) { >>> -ret = avio_read(pls->input, buf, buf_size); >>> -if (ret != buf_size) >>> -av_log(NULL, AV_LOG_ERROR, "Could not read complete >>> segment.\n"); >>> -} else >>> -ret = avio_read(pls->input, buf, buf_size); >>> +ret = avio_read(pls->input, buf, buf_size); >>> +if (ret != buf_size) >>> +av_log(NULL, AV_LOG_ERROR, "Could not read complete segment.\n"); >>> >>> if (ret > 0) >>> pls->cur_seg_offset += ret; >>> @@ -1085,7 +1076,7 @@ static void intercept_id3(struct playlist *pls, >>> uint8_t *buf, >>> while (1) { >>> /* see if we can retrieve enough data for ID3 header */ >>> if (*len < ID3v2_HEADER_SIZE && buf_size >= ID3v2_HEADER_SIZE) { >>> -bytes = read_from_url(pls, seg, buf + *len, ID3v2_HEADER_SIZE >>> - *len, READ_COMPLETE); >>> +bytes = read_from_url(pls, seg, buf + *len, ID3v2_HEADER_SIZE >>> - *len); >>> if (bytes > 0) { >>> >>> if (bytes == ID3v2_HEADER_SIZE - *len) >>> @@ -1137,7 +1128,7 @@ static void intercept_id3(struct playlist *pls, >>> uint8_t *buf, >>> >>> if (remaining > 0) { >>> /* read the rest of the tag in */ >>> -if (read_from_url(pls, seg, pls->id3_buf + id3_buf_pos, >>> remaining, READ_COMPLETE) != remaining) >>> +if (read_from_url(pls, seg, pls->id3_buf + id3_buf_pos, >>> remaining) != remaining) >>> break; >>> id3_buf_pos += remaining; >>> av_log(pls->ctx, AV_LOG_DEBUG, "Stripped additional %d HLS >>> ID3 bytes\n", remaining); >>> @@ -1151,7 +1142,7 @@ static void intercept_id3(struct playlist *pls, >>> uint8_t *buf, >>> >>> /* re-fill buffer for the caller unless EOF */ >>> if (*len >= 0 && (fill_buf || *len == 0)) { >>> -bytes = read_from_url(pls, seg, buf + *len, buf_size - *len, >>> READ_NORMAL); >>> +bytes = read_from_url(pls, seg, buf + *len, buf_size - *len); >>> >>> /* ignore error if we already had some data */ >>> if (bytes >= 0) >>> @@ -1311,7 +1302,7 @@ static int update_init_section(struct playlist *pls, >>> struct segment *seg) >>> av_fast_malloc(>init_sec_buf, >init_sec_buf_size, sec_size); >>> >>> ret = read_from_url(pls, seg->init_section, pls->init_sec_buf, >>> -pls->init_sec_buf_size, READ_COMPLETE); >>> +pls->init_sec_buf_size); >> Didn't care ret < pls->init_sec_buf_size ? > avio_read is full size read, so it will return error, or > init_sec_buf_size, as your question, maybe it will happen then the > read_from_url called avio_read_partiall. Thanks the clarify, I think the patch is Ok now. >>> ff_format_io_close(pls->parent, >input); >>> >>> if (ret < 0) >>> @@ -1506,7 +1497,7 @@ reload: >>> } >>> >>> seg = current_segment(v); >>> -ret = read_from_url(v, seg, buf, buf_size, READ_NORMAL); >>> +ret = read_from_url(v, seg, buf, buf_size); >>> if (ret > 0) { >>> if (just_opened && v->is_id3_timestamped != 0) { >>> /* Intercept ID3 tags here, elementary audio streams are >>> required >> LGTM except one question. >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] configure: extend the check for bcrypt
Some old mingw-w64 builds seem to provide an incomplete implementation of the API. Add an extra check to make sure it's disabled for those. Signed-off-by: James Almer--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index d22b93a2d3..83a7648c57 100755 --- a/configure +++ b/configure @@ -5830,7 +5830,8 @@ check_header asm/types.h check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(, 0); foo += bar" check_lib advapi32 "windows.h"RegCloseKey -ladvapi32 -check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt +check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt && +check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM" check_lib ole32"windows.h"CoTaskMemFree-lole32 check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32 check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi -- 2.16.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] lavf/os_support: Only compile inet_aton() if getaddrinfo() is needed
Hi! Attached patch is supposed to silence a user-reported warning when inet_aton() is missing but getaddrinfo() is supported. Untested. Please review, Carl Eugen From 9d31a8c99953a2144e2f24d79da4cbc57987f365 Mon Sep 17 00:00:00 2001 From: Carl Eugen HoyosDate: Mon, 16 Apr 2018 01:28:47 +0200 Subject: [PATCH] lavf/os_support: Only compile inet_aton() if getaddrinfo() is needed. Silences a warning: libavformat/os_support.c:49:12: warning: 'inet_aton' defined but not used Reported-by: Reino Wijnsma --- libavformat/os_support.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 099d7b5..15cea7f 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -43,6 +43,7 @@ #include "network.h" +#if !HAVE_GETADDRINFO #if !HAVE_INET_ATON #include @@ -62,7 +63,6 @@ static int inet_aton(const char *str, struct in_addr *add) } #endif /* !HAVE_INET_ATON */ -#if !HAVE_GETADDRINFO int ff_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] tests/checkasm/aacpsdsp: Increase EPS for interpolate so that the test passes on kfreebsd
On Sun, Apr 15, 2018 at 06:16:52PM -0300, James Almer wrote: > On 4/15/2018 5:51 PM, Michael Niedermayer wrote: > > The value is minimal, 0.11 fails > > > > Signed-off-by: Michael Niedermayer> > --- > > tests/checkasm/aacpsdsp.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/tests/checkasm/aacpsdsp.c b/tests/checkasm/aacpsdsp.c > > index ea68b39fa9..9e30eaa497 100644 > > --- a/tests/checkasm/aacpsdsp.c > > +++ b/tests/checkasm/aacpsdsp.c > > @@ -33,6 +33,7 @@ > > } while (0) > > > > #define EPS 0.005 > > +#define EPS2 0.12 > > That's kind of like a lot, but to be fair 0.005 was already a lot as > well, considering other tests succeed with just FLT_EPSILON or values > like 0.007. > > Should be ok if that's really the smallest value that succeeds. its worse, 0.4 would be needed at least it seems. I withdraw this patch for now. It would be more ideal if the implementation could be made more precisse. If this doesnt happen we can still go back to this and apply it with 0.4 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavc/dxva2_internal: Cast dxva2 and d3d11 decoders and cfgs to (void *)
On 4/15/2018 7:00 PM, Carl Eugen Hoyos wrote: > Hi! > > Attached patch is supposed to silence several user-reported warnings, > I cannot currently test here. > > Please review, Carl Eugen > > > 0001-lavc-dxva2_internal-Cast-the-dxva2-and-d3d11-decoder.patch > > > From 6fb20352568dc5abe61c28247bfce9e04e7494c1 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos> Date: Sun, 15 Apr 2018 23:57:24 +0200 > Subject: [PATCH] lavc/dxva2_internal: Cast the dxva2 and d3d11 decoders and > cfgs to (void *). > > Silences several warnings: > libavcodec/dxva2_internal.h:107:98: warning: pointer type mismatch in > conditional expression > libavcodec/dxva2_internal.h:109:94: warning: pointer type mismatch in > conditional expression > --- > libavcodec/dxva2_internal.h |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h > index 8bb3344..b822af5 100644 > --- a/libavcodec/dxva2_internal.h > +++ b/libavcodec/dxva2_internal.h > @@ -104,9 +104,9 @@ typedef struct FFDXVASharedContext { > #if CONFIG_D3D11VA && CONFIG_DXVA2 > #define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.workaround : ctx->dxva2.workaround) > #define DXVA_CONTEXT_COUNT(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.surface_count : ctx->dxva2.surface_count) > -#define DXVA_CONTEXT_DECODER(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.decoder : ctx->dxva2.decoder) > +#define DXVA_CONTEXT_DECODER(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? > (void *)ctx->d3d11va.decoder : (void *)ctx->dxva2.decoder) > #define DXVA_CONTEXT_REPORT_ID(avctx, ctx) (*(ff_dxva2_is_d3d11(avctx) > ? >d3d11va.report_id : >dxva2.report_id)) > -#define DXVA_CONTEXT_CFG(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.cfg : ctx->dxva2.cfg) > +#define DXVA_CONTEXT_CFG(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? > (void *)ctx->d3d11va.cfg : (void *)ctx->dxva2.cfg) > #define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.cfg->ConfigBitstreamRaw : ctx->dxva2.cfg->ConfigBitstreamRaw) > #define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.cfg->ConfigIntraResidUnsigned : > ctx->dxva2.cfg->ConfigIntraResidUnsigned) > #define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? > ctx->d3d11va.cfg->ConfigResidDiffAccelerator : > ctx->dxva2.cfg->ConfigResidDiffAccelerator) > -- 1.7.10.4 Can also confirm it removes the warnings (Which were really annoying for that matter), so LGTM. Thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size().
On 4/15/2018 7:03 PM, Carl Eugen Hoyos wrote: > Hi! > > Attached patch is supposed to silence a user-reported warning, I > cannot currently test. > > libavdevice/vfwcap.c: In function 'vfw_read_header': > libavdevice/vfwcap.c:331:35: warning: passing argument 1 of > 'av_parse_video_size' from incompatible pointer type > [-Wincompatible-pointer-types] > ret = av_parse_video_size(>bmiHeader.biWidth, > >bmiHeader.biHeight, ctx->video_size); > ^ > > Please review, Carl Eugen > > > 0001-lavd-vfwcap-Pass-pointers-to-int-instead-of-long-to-.patch > > > From 5ef8c3562cc06786c492ba8bc04ff69f91cb3176 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos> Date: Sun, 15 Apr 2018 23:40:19 +0200 > Subject: [PATCH] lavd/vfwcap: Pass pointers to int instead of long to > av_parse_video_size(). > > Fixes the following warnings: > libavdevice/vfwcap.c:331:35: warning: passing argument 1 of > 'av_parse_video_size' from incompatible pointer type > libavdevice/vfwcap.c:331:59: warning: passing argument 2 of > 'av_parse_video_size' from incompatible pointer type > --- > libavdevice/vfwcap.c |5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c > index 6a923d9..e2ab276 100644 > --- a/libavdevice/vfwcap.c > +++ b/libavdevice/vfwcap.c > @@ -328,11 +328,14 @@ static int vfw_read_header(AVFormatContext *s) > } > > if (ctx->video_size) { > -ret = av_parse_video_size(>bmiHeader.biWidth, > >bmiHeader.biHeight, ctx->video_size); > +int w, h; > +ret = av_parse_video_size(, , ctx->video_size); > if (ret < 0) { > av_log(s, AV_LOG_ERROR, "Couldn't parse video size.\n"); > goto fail; > } > +bi->bmiHeader.biWidth = w; > +bi->bmiHeader.biHeight = h; Can confirm it removes the warnings, so LGTM. > } > > if (0) { > -- 1.7.10.4 > > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/dxv: add support for "high" quality mode
2018-04-15 9:41 GMT+02:00, Paul B Mahol: > On 4/14/18, Rostislav Pehlivanov wrote: >> On 14 April 2018 at 20:46, Paul B Mahol wrote: >> >>> Signed-off-by: Paul B Mahol >>> --- >>> libavcodec/dxv.c | 815 ++ >>> ++--- >>> 1 file changed, 780 insertions(+), 35 deletions(-) >>> >> >> LGTM > > Applied. Thanks. Thank you for working on formats like this one, I consider this highly important! Sorry for not testing your patch earlier... The committed change is not helpful afaict, if you cannot fix the colourspace issue (which I perfectly understand), please commit your original hack (with a note), this variant cannot help users. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavf/rtmpcrypt: Add a cast to silence a warning
Hi! rtmpe_write() exploits knowledge about av_rc4_crypt() internals and passes the same pointer as src and dst. I assume this is intentional for performance reasons, the only way to silence the resulting warning is a cast afaict. Please comment, Carl Eugen From 397b209506beb6c5a2acbe19bba98393216f1d0c Mon Sep 17 00:00:00 2001 From: Carl Eugen HoyosDate: Mon, 16 Apr 2018 00:14:24 +0200 Subject: [PATCH] lavf/rtmpcrypt: Add a cast to silence an unavoidable warning. Silences the following warning: libavformat/rtmpcrypt.c:304:36: warning: passing argument 2 of 'av_rc4_crypt' discards 'const' qualifier from pointer target type --- libavformat/rtmpcrypt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtmpcrypt.c b/libavformat/rtmpcrypt.c index c41ae43..253b8ca 100644 --- a/libavformat/rtmpcrypt.c +++ b/libavformat/rtmpcrypt.c @@ -301,7 +301,7 @@ static int rtmpe_write(URLContext *h, const uint8_t *buf, int size) if (rt->handshaked) { /* encrypt data to send to the server */ -av_rc4_crypt(>key_out, buf, buf, size, NULL, 1); +av_rc4_crypt(>key_out, (uint8_t *)buf, buf, size, NULL, 1); } if ((ret = ffurl_write(rt->stream, buf, size)) < 0) -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size().
Hi! Attached patch is supposed to silence a user-reported warning, I cannot currently test. libavdevice/vfwcap.c: In function 'vfw_read_header': libavdevice/vfwcap.c:331:35: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type [-Wincompatible-pointer-types] ret = av_parse_video_size(>bmiHeader.biWidth, >bmiHeader.biHeight, ctx->video_size); ^ Please review, Carl Eugen From 5ef8c3562cc06786c492ba8bc04ff69f91cb3176 Mon Sep 17 00:00:00 2001 From: Carl Eugen HoyosDate: Sun, 15 Apr 2018 23:40:19 +0200 Subject: [PATCH] lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size(). Fixes the following warnings: libavdevice/vfwcap.c:331:35: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type libavdevice/vfwcap.c:331:59: warning: passing argument 2 of 'av_parse_video_size' from incompatible pointer type --- libavdevice/vfwcap.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index 6a923d9..e2ab276 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -328,11 +328,14 @@ static int vfw_read_header(AVFormatContext *s) } if (ctx->video_size) { -ret = av_parse_video_size(>bmiHeader.biWidth, >bmiHeader.biHeight, ctx->video_size); +int w, h; +ret = av_parse_video_size(, , ctx->video_size); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Couldn't parse video size.\n"); goto fail; } +bi->bmiHeader.biWidth = w; +bi->bmiHeader.biHeight = h; } if (0) { -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/1] [RFC] ffprobe: report DAR even if SAR is undefined
2018-04-15 16:42 GMT+02:00, Marton Balint: > > > On Sun, 15 Apr 2018, Timo Teräs wrote: > >> Calculate DAR with assumed SAR 1:1 when SAR is undefined. Same >> assumption is done in ffplay to create the play window. Usually >> DAR is more useful metadata than SAR when e.g. choosing which >> media of multiple versions to use to fit the display. >> >> Normally undefined SAR means 1:1. E.g. in mov/mp4 files there's >> 'pasp' atom to explicitly define SAR. If that is not specified, >> the video codec's SAR should be used. Should it be also undefined, >> the SAR should be assumed to be 1:1. It makes sense to not change >> SAR in the demux info, so ffmpeg can make copies with matching >> atom structure and codec extra data. So the simplest way to >> report DAR is assume SAR 1:1 when undefined. >> >> Signed-off-by: Timo Teräs >> --- >> This applies on top of the previous DAR/SAR reporting fix: >> https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228141.html >> >> For more details behind this patch, see: >> https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228146.html >> >> This seemed to be the most simple and logical fix. Alternatively, >> we could add a new 'effective_display_aspect_ratio' or add a flag >> to enable this assumption if the existing functionality should be >> kept unchanged. I felt this would be the most sensible thing to do. >> I am happy this if there's a more desirable approach to the issue. >> >> Hopefully this and the DAR/SAR reporting fix can be applied before >> next release tag. Thanks for considering! > > I don't think it's good idea to generally assume 1:1 display_aspect_ratio > for every undefined sample aspect ratio. I don't think that this is what the patch does (and it would definitely be wrong and not what FFplay does), I don't know if the patch is a good idea though. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavc/dxva2_internal: Cast dxva2 and d3d11 decoders and cfgs to (void *)
Hi! Attached patch is supposed to silence several user-reported warnings, I cannot currently test here. Please review, Carl Eugen From 6fb20352568dc5abe61c28247bfce9e04e7494c1 Mon Sep 17 00:00:00 2001 From: Carl Eugen HoyosDate: Sun, 15 Apr 2018 23:57:24 +0200 Subject: [PATCH] lavc/dxva2_internal: Cast the dxva2 and d3d11 decoders and cfgs to (void *). Silences several warnings: libavcodec/dxva2_internal.h:107:98: warning: pointer type mismatch in conditional expression libavcodec/dxva2_internal.h:109:94: warning: pointer type mismatch in conditional expression --- libavcodec/dxva2_internal.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h index 8bb3344..b822af5 100644 --- a/libavcodec/dxva2_internal.h +++ b/libavcodec/dxva2_internal.h @@ -104,9 +104,9 @@ typedef struct FFDXVASharedContext { #if CONFIG_D3D11VA && CONFIG_DXVA2 #define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.workaround : ctx->dxva2.workaround) #define DXVA_CONTEXT_COUNT(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.surface_count : ctx->dxva2.surface_count) -#define DXVA_CONTEXT_DECODER(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.decoder : ctx->dxva2.decoder) +#define DXVA_CONTEXT_DECODER(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? (void *)ctx->d3d11va.decoder : (void *)ctx->dxva2.decoder) #define DXVA_CONTEXT_REPORT_ID(avctx, ctx) (*(ff_dxva2_is_d3d11(avctx) ? >d3d11va.report_id : >dxva2.report_id)) -#define DXVA_CONTEXT_CFG(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg : ctx->dxva2.cfg) +#define DXVA_CONTEXT_CFG(avctx, ctx)(ff_dxva2_is_d3d11(avctx) ? (void *)ctx->d3d11va.cfg : (void *)ctx->dxva2.cfg) #define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg->ConfigBitstreamRaw : ctx->dxva2.cfg->ConfigBitstreamRaw) #define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg->ConfigIntraResidUnsigned : ctx->dxva2.cfg->ConfigIntraResidUnsigned) #define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg->ConfigResidDiffAccelerator : ctx->dxva2.cfg->ConfigResidDiffAccelerator) -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] tests/checkasm/aacpsdsp: Increase EPS for interpolate so that the test passes on kfreebsd
On 4/15/2018 5:51 PM, Michael Niedermayer wrote: > The value is minimal, 0.11 fails > > Signed-off-by: Michael Niedermayer> --- > tests/checkasm/aacpsdsp.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/checkasm/aacpsdsp.c b/tests/checkasm/aacpsdsp.c > index ea68b39fa9..9e30eaa497 100644 > --- a/tests/checkasm/aacpsdsp.c > +++ b/tests/checkasm/aacpsdsp.c > @@ -33,6 +33,7 @@ > } while (0) > > #define EPS 0.005 > +#define EPS2 0.12 That's kind of like a lot, but to be fair 0.005 was already a lot as well, considering other tests succeed with just FLT_EPSILON or values like 0.007. Should be ok if that's really the smallest value that succeeds. > > static void test_add_squares(void) > { > @@ -201,8 +202,8 @@ static void test_stereo_interpolate(PSDSPContext *psdsp) > > call_ref(l0, r0, h, h_step, BUF_SIZE); > call_new(l1, r1, h, h_step, BUF_SIZE); > -if (!float_near_abs_eps_array((float *)l0, (float *)l1, EPS, > BUF_SIZE * 2) || > -!float_near_abs_eps_array((float *)r0, (float *)r1, EPS, > BUF_SIZE * 2)) > +if (!float_near_abs_eps_array((float *)l0, (float *)l1, EPS2, > BUF_SIZE * 2) || > +!float_near_abs_eps_array((float *)r0, (float *)r1, EPS2, > BUF_SIZE * 2)) > fail(); > > memcpy(l1, l, BUF_SIZE * 2 * sizeof(INTFLOAT)); > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] tests/checkasm/aacpsdsp: Increase EPS for interpolate so that the test passes on kfreebsd
The value is minimal, 0.11 fails Signed-off-by: Michael Niedermayer--- tests/checkasm/aacpsdsp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/aacpsdsp.c b/tests/checkasm/aacpsdsp.c index ea68b39fa9..9e30eaa497 100644 --- a/tests/checkasm/aacpsdsp.c +++ b/tests/checkasm/aacpsdsp.c @@ -33,6 +33,7 @@ } while (0) #define EPS 0.005 +#define EPS2 0.12 static void test_add_squares(void) { @@ -201,8 +202,8 @@ static void test_stereo_interpolate(PSDSPContext *psdsp) call_ref(l0, r0, h, h_step, BUF_SIZE); call_new(l1, r1, h, h_step, BUF_SIZE); -if (!float_near_abs_eps_array((float *)l0, (float *)l1, EPS, BUF_SIZE * 2) || -!float_near_abs_eps_array((float *)r0, (float *)r1, EPS, BUF_SIZE * 2)) +if (!float_near_abs_eps_array((float *)l0, (float *)l1, EPS2, BUF_SIZE * 2) || +!float_near_abs_eps_array((float *)r0, (float *)r1, EPS2, BUF_SIZE * 2)) fail(); memcpy(l1, l, BUF_SIZE * 2 * sizeof(INTFLOAT)); -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avfilter/showvolume : add new options and minor clean
On 4/15/18, Martin Vignaliwrote: >> >> Default white color is good decision ? Better use orange? >> >> Put { in own line like for every function: >> >> void its_me_function() >> {<- have own line >> >> } >> >> Generally follow code style of file. >> ___ >> >> > New patchs in attach > fix bracket after func declaration > change default persistent max line color to orange You forgot to update color in documentation. Patchset OK otherwise. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] avfilter/showvolume : add new options and minor clean
> > Default white color is good decision ? Better use orange? > > Put { in own line like for every function: > > void its_me_function() > {<- have own line > > } > > Generally follow code style of file. > ___ > > New patchs in attach fix bracket after func declaration change default persistent max line color to orange also add a cosmetic, Martin 0001-avfilter-showvolume-add-display-scale-option.patch Description: Binary data 0002-avfilter-showvolume-add-persistent-max-display.patch Description: Binary data 0003-avfilter-showvolume-cosmetic-move-bracket-after-func.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] GSOC 2018 qualification task.
On Sun, Apr 15, 2018 at 07:36:09PM +0530, ANURAG SINGH IIT BHU wrote: > Hello Sir, > > I have implemented the adviced changes for the hellosubs filter for the > qualification task which writes Hello World time on frames, now the filter > does not uses libavformat, and it uses libfreetype to draw over video > frames. I have attached the complete patch. > > libfretype and libfontconfig should be enabled to run the filter. > (libfontconfig if no font file is provided.) > > Command to run the filter > ffmpeg -i -vf hellosubs > > Thanks and regards, > Anurag Singh. > > > > > > > > On Fri, Apr 13, 2018 at 9:39 AM, ANURAG SINGH IIT BHU < > anurag.singh.ph...@iitbhu.ac.in> wrote: > > > Thank you sir, I'll implement the suggested reviews as soon as possible. > > > > > > > > > > > > > > On Fri, Apr 13, 2018 at 4:04 AM, Michael Niedermayer < > > mich...@niedermayer.cc> wrote: > > > >> On Fri, Apr 13, 2018 at 02:13:53AM +0530, ANURAG SINGH IIT BHU wrote: > >> > Hello, > >> > I have implemented the reviews mentioned on previous patch, now there > >> is no > >> > need to provide any subtitle file to the filter, I am attaching the > >> > complete patch of the hellosubs filter. > >> > > >> > Command to run the filter > >> > ffmpeg -i -vf hellosubs= helloout.mp4 > >> > > >> > > >> > Thanks and regards, > >> > Anurag Singh. > >> > > >> > > >> > > >> > > >> > On Tue, Apr 10, 2018 at 4:55 AM, Rostislav Pehlivanov < > >> atomnu...@gmail.com> > >> > wrote: > >> > > >> > > On 9 April 2018 at 19:10, Paul B Maholwrote: > >> > > > >> > > > On 4/9/18, Rostislav Pehlivanov wrote: > >> > > > > On 9 April 2018 at 03:59, ANURAG SINGH IIT BHU < > >> > > > > anurag.singh.ph...@iitbhu.ac.in> wrote: > >> > > > > > >> > > > >> This mail is regarding the qualification task assigned to me for > >> the > >> > > > >> GSOC project > >> > > > >> in FFmpeg for automatic real-time subtitle generation using > >> speech to > >> > > > text > >> > > > >> translation ML model. > >> > > > >> > >> > > > > > >> > > > > i really don't think lavfi is the correct place for such code, > >> nor that > >> > > > the > >> > > > > project's repo should contain such code at all. > >> > > > > This would need to be in another repo and a separate library. > >> > > > > >> > > > Why? Are you against ocr filter too? > >> > > > > >> > > > >> > > The OCR filter uses libtessract so I'm fine with it. Like I said, as > >> long > >> > > as the actual code to do it is in an external library I don't mind. > >> > > Mozilla recently released Deep Speech (https://github.com/mozilla/ > >> > > DeepSpeech) > >> > > which does pretty much exactly speech to text and is considered to > >> have the > >> > > most accurate one out there. Someone just needs to convert the > >> tensorflow > >> > > code to something more usable. > >> > > ___ > >> > > ffmpeg-devel mailing list > >> > > ffmpeg-devel@ffmpeg.org > >> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >> > > > >> > >> > Makefile |1 > >> > allfilters.c |1 > >> > vf_hellosubs.c | 513 ++ > >> +++ > >> > 3 files changed, 515 insertions(+) > >> > 2432f100fddb7ec84e771be8282d4b66e3d1f50a > >> 0001-avfilter-add-hellosubs-filter.patch > >> > From ac0e09d431ea68aebfaef6e2ed0b450e76d473d9 Mon Sep 17 00:00:00 2001 > >> > From: ddosvulnerability > >> > Date: Thu, 12 Apr 2018 22:06:43 +0530 > >> > Subject: [PATCH] avfilter: add hellosubs filter. > >> > > >> > --- > >> > libavfilter/Makefile | 1 + > >> > libavfilter/allfilters.c | 1 + > >> > libavfilter/vf_hellosubs.c | 513 ++ > >> +++ > >> > 3 files changed, 515 insertions(+) > >> > create mode 100644 libavfilter/vf_hellosubs.c > >> > > >> > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > >> > index a90ca30..770b1b5 100644 > >> > --- a/libavfilter/Makefile > >> > +++ b/libavfilter/Makefile > >> > @@ -331,6 +331,7 @@ OBJS-$(CONFIG_SSIM_FILTER) += > >> vf_ssim.o framesync.o > >> > OBJS-$(CONFIG_STEREO3D_FILTER) += vf_stereo3d.o > >> > OBJS-$(CONFIG_STREAMSELECT_FILTER) += f_streamselect.o > >> framesync.o > >> > OBJS-$(CONFIG_SUBTITLES_FILTER) += vf_subtitles.o > >> > +OBJS-$(CONFIG_HELLOSUBS_FILTER) += vf_hellosubs.o > >> > OBJS-$(CONFIG_SUPER2XSAI_FILTER) += vf_super2xsai.o > >> > OBJS-$(CONFIG_SWAPRECT_FILTER) += vf_swaprect.o > >> > OBJS-$(CONFIG_SWAPUV_FILTER) += vf_swapuv.o > >> > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c > >> > index 6eac828..a008908 100644 > >> > --- a/libavfilter/allfilters.c > >> > +++ b/libavfilter/allfilters.c > >> > @@ -322,6 +322,7 @@ extern AVFilter ff_vf_ssim; > >> > extern AVFilter ff_vf_stereo3d; > >> > extern AVFilter ff_vf_streamselect; > >> >
Re: [FFmpeg-devel] avfilter/showvolume : add new options and minor clean
On 4/15/18, Martin Vignaliwrote: > and when there is no silence i get completly empty display + > >> current volume in dB. >> >> > You're right, my previous calc was wrong (doesn't display for level below > -42 db) > > New patchs in attach > > use another calc for the log display : av_clipf(0.21 * log10(max) + 1, 0, > 1); > > > for the persistent max display, i add a new option for line color > and rename dm_duration to dm > > > Martin > Default white color is good decision ? Better use orange? Put { in own line like for every function: void its_me_function() {<- have own line } Generally follow code style of file. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 5/5] amfenc: Remove spurious initialisations
On 15/04/18 00:17, Alexander Kravchenko wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Saturday, April 14, 2018 6:54 PM >> To: ffmpeg-devel@ffmpeg.org >> Subject: [FFmpeg-devel] [PATCH 5/5] amfenc: Remove spurious initialisations >> > > Hi Mark, > I reviewed and tested all 5 patches in set all together. > Now the code looks cleaner. > My local tests passed for dx9 and dx11 with and without > -hwaccel_output_format. Ok, applied. Thank you! > I am waiting patches to be applied to propose new patch with hwcontext_amf in > libavutil. Can you explain what you're intending to use that for? It's not clear to me how an extra wrapper around the D3D(9|11) surfaces is going to help, given that the support for them with AMF is already pretty good. (Compare the Intel libmfx stuff (the misleadingly-named "qsv") where the extra wrapping does help for some cases because the underlying library has weird constraints, but overall adds a lot of complexity (and failure modes) for rather unclear benefit. It's also inconvenient in that it promotes the existence of antifeatures like the "_qsv" decoders which are inferior to the builtin hwaccels in pretty much every respect.) - Mark ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix clang-cl detection
On Fri, Apr 13, 2018 at 09:51:10PM +, Dale Curtis wrote: > lgtm, I was able to build ffmpeg for windows on Linux with this patch by > following my notes here: > > https://bugs.chromium.org/p/chromium/issues/detail?id=783021#c6 applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart then the original author, trying to rewrite it will not make it better. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/1] [RFC] ffprobe: report DAR even if SAR is undefined
On Sun, 15 Apr 2018, Timo Teräs wrote: Calculate DAR with assumed SAR 1:1 when SAR is undefined. Same assumption is done in ffplay to create the play window. Usually DAR is more useful metadata than SAR when e.g. choosing which media of multiple versions to use to fit the display. Normally undefined SAR means 1:1. E.g. in mov/mp4 files there's 'pasp' atom to explicitly define SAR. If that is not specified, the video codec's SAR should be used. Should it be also undefined, the SAR should be assumed to be 1:1. It makes sense to not change SAR in the demux info, so ffmpeg can make copies with matching atom structure and codec extra data. So the simplest way to report DAR is assume SAR 1:1 when undefined. Signed-off-by: Timo Teräs--- This applies on top of the previous DAR/SAR reporting fix: https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228141.html For more details behind this patch, see: https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228146.html This seemed to be the most simple and logical fix. Alternatively, we could add a new 'effective_display_aspect_ratio' or add a flag to enable this assumption if the existing functionality should be kept unchanged. I felt this would be the most sensible thing to do. I am happy this if there's a more desirable approach to the issue. Hopefully this and the DAR/SAR reporting fix can be applied before next release tag. Thanks for considering! I don't think it's good idea to generally assume 1:1 display_aspect_ratio for every undefined sample aspect ratio. It depends heavily on your actual use case. If MOV/MP4 specifies that 1:1 SAR should be used, then maybe you should fix av_guess_sample_aspect_ratio instead, and return 1:1 there if the format context is MOV/MP4. You may add a demuxer (AVFMT) flag to signal that such behaviour should be used, and av_guess_sample_aspect_ratio can check for that demuxer flag. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] GSOC 2018 qualification task.
Hello Sir, I have implemented the adviced changes for the hellosubs filter for the qualification task which writes Hello World time on frames, now the filter does not uses libavformat, and it uses libfreetype to draw over video frames. I have attached the complete patch. libfretype and libfontconfig should be enabled to run the filter. (libfontconfig if no font file is provided.) Command to run the filter ffmpeg -i -vf hellosubs Thanks and regards, Anurag Singh. On Fri, Apr 13, 2018 at 9:39 AM, ANURAG SINGH IIT BHU < anurag.singh.ph...@iitbhu.ac.in> wrote: > Thank you sir, I'll implement the suggested reviews as soon as possible. > > > > > > > On Fri, Apr 13, 2018 at 4:04 AM, Michael Niedermayer < > mich...@niedermayer.cc> wrote: > >> On Fri, Apr 13, 2018 at 02:13:53AM +0530, ANURAG SINGH IIT BHU wrote: >> > Hello, >> > I have implemented the reviews mentioned on previous patch, now there >> is no >> > need to provide any subtitle file to the filter, I am attaching the >> > complete patch of the hellosubs filter. >> > >> > Command to run the filter >> > ffmpeg -i -vf hellosubs= helloout.mp4 >> > >> > >> > Thanks and regards, >> > Anurag Singh. >> > >> > >> > >> > >> > On Tue, Apr 10, 2018 at 4:55 AM, Rostislav Pehlivanov < >> atomnu...@gmail.com> >> > wrote: >> > >> > > On 9 April 2018 at 19:10, Paul B Maholwrote: >> > > >> > > > On 4/9/18, Rostislav Pehlivanov wrote: >> > > > > On 9 April 2018 at 03:59, ANURAG SINGH IIT BHU < >> > > > > anurag.singh.ph...@iitbhu.ac.in> wrote: >> > > > > >> > > > >> This mail is regarding the qualification task assigned to me for >> the >> > > > >> GSOC project >> > > > >> in FFmpeg for automatic real-time subtitle generation using >> speech to >> > > > text >> > > > >> translation ML model. >> > > > >> >> > > > > >> > > > > i really don't think lavfi is the correct place for such code, >> nor that >> > > > the >> > > > > project's repo should contain such code at all. >> > > > > This would need to be in another repo and a separate library. >> > > > >> > > > Why? Are you against ocr filter too? >> > > > >> > > >> > > The OCR filter uses libtessract so I'm fine with it. Like I said, as >> long >> > > as the actual code to do it is in an external library I don't mind. >> > > Mozilla recently released Deep Speech (https://github.com/mozilla/ >> > > DeepSpeech) >> > > which does pretty much exactly speech to text and is considered to >> have the >> > > most accurate one out there. Someone just needs to convert the >> tensorflow >> > > code to something more usable. >> > > ___ >> > > ffmpeg-devel mailing list >> > > ffmpeg-devel@ffmpeg.org >> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > >> >> > Makefile |1 >> > allfilters.c |1 >> > vf_hellosubs.c | 513 ++ >> +++ >> > 3 files changed, 515 insertions(+) >> > 2432f100fddb7ec84e771be8282d4b66e3d1f50a >> 0001-avfilter-add-hellosubs-filter.patch >> > From ac0e09d431ea68aebfaef6e2ed0b450e76d473d9 Mon Sep 17 00:00:00 2001 >> > From: ddosvulnerability >> > Date: Thu, 12 Apr 2018 22:06:43 +0530 >> > Subject: [PATCH] avfilter: add hellosubs filter. >> > >> > --- >> > libavfilter/Makefile | 1 + >> > libavfilter/allfilters.c | 1 + >> > libavfilter/vf_hellosubs.c | 513 ++ >> +++ >> > 3 files changed, 515 insertions(+) >> > create mode 100644 libavfilter/vf_hellosubs.c >> > >> > diff --git a/libavfilter/Makefile b/libavfilter/Makefile >> > index a90ca30..770b1b5 100644 >> > --- a/libavfilter/Makefile >> > +++ b/libavfilter/Makefile >> > @@ -331,6 +331,7 @@ OBJS-$(CONFIG_SSIM_FILTER) += >> vf_ssim.o framesync.o >> > OBJS-$(CONFIG_STEREO3D_FILTER) += vf_stereo3d.o >> > OBJS-$(CONFIG_STREAMSELECT_FILTER) += f_streamselect.o >> framesync.o >> > OBJS-$(CONFIG_SUBTITLES_FILTER) += vf_subtitles.o >> > +OBJS-$(CONFIG_HELLOSUBS_FILTER) += vf_hellosubs.o >> > OBJS-$(CONFIG_SUPER2XSAI_FILTER) += vf_super2xsai.o >> > OBJS-$(CONFIG_SWAPRECT_FILTER) += vf_swaprect.o >> > OBJS-$(CONFIG_SWAPUV_FILTER) += vf_swapuv.o >> > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c >> > index 6eac828..a008908 100644 >> > --- a/libavfilter/allfilters.c >> > +++ b/libavfilter/allfilters.c >> > @@ -322,6 +322,7 @@ extern AVFilter ff_vf_ssim; >> > extern AVFilter ff_vf_stereo3d; >> > extern AVFilter ff_vf_streamselect; >> > extern AVFilter ff_vf_subtitles; >> > +extern AVFilter ff_vf_hellosubs; >> > extern AVFilter ff_vf_super2xsai; >> > extern AVFilter ff_vf_swaprect; >> > extern AVFilter ff_vf_swapuv; >> > diff --git a/libavfilter/vf_hellosubs.c b/libavfilter/vf_hellosubs.c >> > new file mode 100644 >> > index 000..b994050 >> > --- /dev/null >> > +++
[FFmpeg-devel] [PATCH 1/1] [RFC] ffprobe: report DAR even if SAR is undefined
Calculate DAR with assumed SAR 1:1 when SAR is undefined. Same assumption is done in ffplay to create the play window. Usually DAR is more useful metadata than SAR when e.g. choosing which media of multiple versions to use to fit the display. Normally undefined SAR means 1:1. E.g. in mov/mp4 files there's 'pasp' atom to explicitly define SAR. If that is not specified, the video codec's SAR should be used. Should it be also undefined, the SAR should be assumed to be 1:1. It makes sense to not change SAR in the demux info, so ffmpeg can make copies with matching atom structure and codec extra data. So the simplest way to report DAR is assume SAR 1:1 when undefined. Signed-off-by: Timo Teräs--- This applies on top of the previous DAR/SAR reporting fix: https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228141.html For more details behind this patch, see: https://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/228146.html This seemed to be the most simple and logical fix. Alternatively, we could add a new 'effective_display_aspect_ratio' or add a flag to enable this assumption if the existing functionality should be kept unchanged. I felt this would be the most sensible thing to do. I am happy this if there's a more desirable approach to the issue. Hopefully this and the DAR/SAR reporting fix can be applied before next release tag. Thanks for considering! fftools/ffprobe.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 8b2a18b6b1..f7022bd3c2 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2523,15 +2523,15 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL); if (sar.num) { print_q("sample_aspect_ratio", sar, ':'); -av_reduce(, , - par->width * sar.num, - par->height * sar.den, - 1024*1024); -print_q("display_aspect_ratio", dar, ':'); } else { print_str_opt("sample_aspect_ratio", "N/A"); -print_str_opt("display_aspect_ratio", "N/A"); +sar = (AVRational){ 1, 1 }; } +av_reduce(, , + par->width * sar.num, + par->height * sar.den, + 1024*1024); +print_q("display_aspect_ratio", dar, ':'); s = av_get_pix_fmt_name(par->format); if (s) print_str("pix_fmt", s); else print_str_opt("pix_fmt", "unknown"); -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/nvdec: correctly set intra_pic_flag for h264/hevc
applied smime.p7s Description: S/MIME Cryptographic Signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/aac_ac3_parser: account for data already in the parsing buffer
On Fri, Apr 13, 2018 at 11:54 AM, Paul B Maholwrote: > On 4/13/18, Hendrik Leppkes wrote: >> On Wed, Apr 11, 2018 at 1:40 PM, Hendrik Leppkes >> wrote: >>> If a frame starts very close to a packet boundary, the start code may >>> already have been added to the parsing buffer, indicated by a small >>> negative value of "i", while the header is still being tracked in the >>> "state" variable. >>> >>> Reduce the remaining size accordingly, otherwise trying to find the next >>> frame could skip over the frame header and lump two frames together as >>> one. >>> --- >>> libavcodec/aac_ac3_parser.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c >>> index 019074b0dd..7f20626285 100644 >>> --- a/libavcodec/aac_ac3_parser.c >>> +++ b/libavcodec/aac_ac3_parser.c >>> @@ -60,6 +60,8 @@ get_next: >>> s->remaining_size += i; >>> goto get_next; >>> } >>> +else if (i < 0) >>> +s->remaining_size += i; >>> } >>> } >>> } >>> -- >>> 2.16.1.windows.4 >>> >> >> Ping. >> Note that this is somewhat of a regression in AC3 parsing since the >> recent AC3+EAC3 combined stream support (the bug existed before, but >> that change exposed it). > > Please add { } brackets around new code. > Applied with that changed. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/dxv: add support for "high" quality mode
On 4/14/18, Rostislav Pehlivanovwrote: > On 14 April 2018 at 20:46, Paul B Mahol wrote: > >> Signed-off-by: Paul B Mahol >> --- >> libavcodec/dxv.c | 815 ++ >> ++--- >> 1 file changed, 780 insertions(+), 35 deletions(-) >> > > LGTM Applied. Thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel