Re: [FFmpeg-devel] Query from Reuters on XZ, open source, and Microsoft
On Thu, Apr 11, 2024 at 5:59 AM Vittorio Giovara wrote: > On Wed, Apr 10, 2024 at 9:19 PM Michael Niedermayer < > mich...@niedermayer.cc> > wrote: > > > Hi > > > > On Tue, Apr 09, 2024 at 03:57:02PM -0500, Romain Beauxis wrote: > > > [Apologies for continuing the conversation, Rémi] > > > > > > Le mar. 9 avr. 2024 à 14:05, Tomas Härdin a écrit : > > > > > > > mån 2024-04-08 klockan 13:13 -0500 skrev Romain Beauxis: > > [...] > > > > > > > Also as someone who had to maintain a Gitlab instance at uni for a > > > > couple of years, I agree with Rémi's points > > > > > > > > > > My initial contribution was motivated by the argument presented in the > > > original talk that bringing new blood is critical to the survival of > the > > > project. > > > > > > If so, then I do believe that there must be a compromise to be made > > between > > > being easier to join for new developers and changing the existing > > workflow. > > > I'm also aware that changing the existing workflow has been discussed > > > before. > > > > > > I don't think that media is not cool anymore, as argued in the talk. I > > see > > > a _lot_ of interested developers in my other projects and all over the > > open > > > source landscape. That's why I believe that it's also important to > > consider > > > other reasons than the talk's argument. > > > > To bring some of the new blood into the project the project needs to > > first understand why they dont. And asking thouse who manage with > > difficulty > > to join could be a biased oppinion. > > > > In my experience this boils down to three points > 1. there is a legit barrier of entry in a large codebase such as ffmpeg, > but over time newcomers can learn about it > Yes, external and internal API is complicated mess in all libs, Most libs code is out of date with current State of Art found in other projects. Also contributors came and go, you can not force them to stay and maintain code mess. > 2. the review process can be though and it's easy to miss a ping and > patches get lost, very defeating for a new developer > Specially when single patch get lost in twenty trivial refactoring patches that spam the list. There should be at least separate list for refactoring patches, and keep this list only for important stuff like new features and bug fixes, if no switch to Github/Gitlab is wanted. > 3. there is net negative help from trolls who spread toxic poison, which is > confusing and uninteresting for the new blood > That is internal community reaction to 1. and 2. points. Think it about like auto-immune reaction to state of human body. > > 2 out of 3 can be solved technically, while the last one needs a cultural > shift - overall I think we're doing a good job at slowly changing pace and > having a bit of a better structure to solve situations when they arise, but > there is still a lot of work to do > Cultural shift - Cancel culture. The only point I agree about above is very last part of very last sentence. > -- > Vittorio > ___ > 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".
[FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index
avformat: enable UDP IPv6 multicast interface selection using zone index Enabled IPv6 interface selection using zone index. Properly resolved interface index in places where default 0 interface index is used (marked with TODO: within udp.c). Adjusted binding for multicast sockets that are used for reading from the network. For mcast addresses, bind to mcast address is attempted as before. In case that this fails, which will happen on Windows, socket is bound to INADDR_ANY/IN6ADDR_ANY_INIT depending on address family. Actual interface selection is performed using udp_set_multicast_interface to point to the desired interface for sending. Closes: #368 Signed-off-by: Lazar Ignjatovic --- V1 -> V2 reverted iface resolution for IPv4 MCAST_JOIN_SOURCE_GROUP NOTE: Due to comments, this patch is proposed as one of two alternatives The other alternative uses `localaddr` for defining interfaces. configure | 3 ++ doc/protocols.texi| 2 +- libavformat/network.h | 6 +++ libavformat/udp.c | 85 +++ 4 files changed, 88 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 2a1d22310b..35d6a0b78c 100755 --- a/configure +++ b/configure @@ -2307,6 +2307,7 @@ HEADERS_LIST=" valgrind_valgrind_h windows_h winsock2_h +iphlpapi_h " INTRINSICS_LIST=" @@ -6475,6 +6476,8 @@ if ! disabled network; then check_struct winsock2.h "struct sockaddr" sa_len check_type ws2tcpip.h "struct sockaddr_in6" check_type ws2tcpip.h "struct sockaddr_storage" +check_headers iphlpapi.h -liphlpapi && network_extralibs="$network_extralibs -liphlpapi" || disable iphlpapi_h +check_func_headers iphlpapi.h GetBestInterfaceEx $network_extralibs else disable network fi diff --git a/doc/protocols.texi b/doc/protocols.texi index f54600b846..a8892845d3 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -2027,7 +2027,7 @@ packet bursts. Override the local UDP port to bind with. @item localaddr=@var{addr} -Local IP address of a network interface used for sending packets or joining +Local IPv4 address of a network interface used for sending packets or joining multicast groups. @item pkt_size=@var{size} diff --git a/libavformat/network.h b/libavformat/network.h index ca214087fc..2461b651d4 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -38,6 +38,10 @@ #include #include +#if HAVE_IPHLPAPI_H +#include +#endif + #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT #endif @@ -64,6 +68,8 @@ int ff_neterrno(void); #include #include #include +#include +#include #define ff_neterrno() AVERROR(errno) #endif /* HAVE_WINSOCK2_H */ diff --git a/libavformat/udp.c b/libavformat/udp.c index d9514f5026..00c73f9ec9 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -35,6 +35,7 @@ #include "libavutil/opt.h" #include "libavutil/log.h" #include "libavutil/time.h" +#include "libavutil/avstring.h" #include "internal.h" #include "network.h" #include "os_support.h" @@ -220,8 +221,7 @@ static int udp_join_multicast_group(int sockfd, struct sockaddr *addr, struct ipv6_mreq mreq6; memcpy(&mreq6.ipv6mr_multiaddr, &(((struct sockaddr_in6 *)addr)->sin6_addr), sizeof(struct in6_addr)); -//TODO: Interface index should be looked up from local_addr -mreq6.ipv6mr_interface = 0; +mreq6.ipv6mr_interface = ((struct sockaddr_in6 *)addr)->sin6_scope_id; if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq6, sizeof(mreq6)) < 0) { ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IPV6_ADD_MEMBERSHIP)"); return ff_neterrno(); @@ -231,6 +231,39 @@ static int udp_join_multicast_group(int sockfd, struct sockaddr *addr, return 0; } +static int udp_set_multicast_interface(int sockfd, struct sockaddr *addr, +struct sockaddr *local_addr, void *logctx) +{ +#ifdef IP_MULTICAST_IF +if (addr->sa_family == AF_INET) { +struct ip_mreq mreq; + +mreq.imr_multiaddr.s_addr = ((struct sockaddr_in *)addr)->sin_addr.s_addr; +if (local_addr) +mreq.imr_interface = ((struct sockaddr_in *)local_addr)->sin_addr; +else +mreq.imr_interface.s_addr = INADDR_ANY; + +if (setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_IF, (const void *)&mreq, sizeof(mreq)) < 0) { +ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IP_MULTICAST_IF)"); +return ff_neterrno(); +} +} +#endif +#if defined(IPV6_MULTICAST_IF) && defined(IPPROTO_IPV6) +if (addr->sa_family == AF_INET6) { +unsigned int iface; +iface = ((struct sockaddr_in6 *)addr)->sin6_scope_id; + +if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &iface, sizeof(unsigned int)) < 0) { +ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IPV6_MULTICAST_IF)"); +
Re: [FFmpeg-devel] [PATCH v2 16/17] fftools/ffmpeg_filter: propagate codec yuv metadata to filters
On Wed, Apr 10, 2024 at 3:12 PM Nicolas George wrote: > Niklas Haas (12024-04-10): > > I think a greedy algorithm (not requiring juggling multiple random > > passes) can still work, > > It does not work for audio. Have you studied what works for audio? It is > quite subtle and full of pitfalls. > This is ultra-vague. And needs further explanations. > > Regards, > > -- > Nicolas George > ___ > 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".
[FFmpeg-devel] [PATCH] avformat/httpauth.c [support both RFC 2617 and RFC 7617]
- Updated the make_digest_auth() function to support both RFC 2617 and RFC 7617 digest authentication. - Supports sha256 , sha512-256 along with the existing md5. MD5 and sha256 were tested, but sha512-256 was not tested due to lack of testable server. - AVHashContext instead of AVMD5 structure. - update_md5_strings() -> update_hash_strings(). - There are some lynt issues in the old code of make_digest_auth, but this is a feature update patch, so I didn't fix it. - modified the implementation of RFC7616 based on community feedback. Signed-off-by: Eugene-bitsensing --- libavformat/httpauth.c | 105 ++--- 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index 9780928357..ba2ebea3a4 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -24,7 +24,7 @@ #include "libavutil/avstring.h" #include "internal.h" #include "libavutil/random_seed.h" -#include "libavutil/md5.h" +#include "libavutil/hash.h" #include "urldecode.h" static void handle_basic_params(HTTPAuthState *state, const char *key, @@ -117,35 +117,35 @@ void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, } } - -static void update_md5_strings(struct AVMD5 *md5ctx, ...) +/* Generate hash string, updated to use AVHashContext to support other algorithms */ +static void update_hash_strings(struct AVHashContext* hash_ctx, ...) { va_list vl; -va_start(vl, md5ctx); +va_start(vl, hash_ctx); while (1) { const char* str = va_arg(vl, const char*); if (!str) break; -av_md5_update(md5ctx, str, strlen(str)); +av_hash_update(hash_ctx, (const uint8_t*)str, strlen(str)); } va_end(vl); } -/* Generate a digest reply, according to RFC 2617. */ +/* Generate a digest reply, according to RFC 2617. Update to support RFC 7617*/ static char *make_digest_auth(HTTPAuthState *state, const char *username, const char *password, const char *uri, const char *method) { DigestParams *digest = &state->digest_params; -int len; +size_t len;// change int -> size_t uint32_t cnonce_buf[2]; char cnonce[17]; char nc[9]; int i; -char A1hash[33], A2hash[33], response[33]; -struct AVMD5 *md5ctx; -uint8_t hash[16]; +char a1_hash[65], a2_hash[65], response[65]; // increase hash size for SHA-2 +struct AVHashContext* hash_ctx = NULL; // use AVHashContext for other algorithm support +size_t len_hash = 33; // Modifiable hash length, MD5:32, SHA-2:64 char *authstr; digest->nc++; @@ -156,52 +156,61 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, cnonce_buf[i] = av_get_random_seed(); ff_data_to_hex(cnonce, (const uint8_t*) cnonce_buf, sizeof(cnonce_buf), 1); -md5ctx = av_md5_alloc(); -if (!md5ctx) -return NULL; - -av_md5_init(md5ctx); -update_md5_strings(md5ctx, username, ":", state->realm, ":", password, NULL); -av_md5_final(md5ctx, hash); -ff_data_to_hex(A1hash, hash, 16, 1); - -if (!strcmp(digest->algorithm, "") || !strcmp(digest->algorithm, "MD5")) { -} else if (!strcmp(digest->algorithm, "MD5-sess")) { -av_md5_init(md5ctx); -update_md5_strings(md5ctx, A1hash, ":", digest->nonce, ":", cnonce, NULL); -av_md5_final(md5ctx, hash); -ff_data_to_hex(A1hash, hash, 16, 1); -} else { -/* Unsupported algorithm */ -av_free(md5ctx); +/* Generate hash context by algorithm. */ +const char* algorithm = digest->algorithm; +const char* hashing_algorithm; +if (!*algorithm) { +algorithm = "MD5"; // if empty, use MD5 as Default +hashing_algorithm = "MD5"; +} +else if (av_stristr(algorithm, "md5") || av_stristr(algorithm, "MD5")) { +hashing_algorithm = "MD5"; +} +else if (av_stristr(algorithm, "sha256") || av_stristr(algorithm, "sha-256")) { +hashing_algorithm = "SHA256"; +len_hash = 65; // SHA-2: 64 characters. +} +else if (av_stristr(algorithm, "sha512-256") || av_stristr(algorithm, "sha-512-256")) { +hashing_algorithm = "SHA512_256"; +len_hash = 65; // SHA-2: 64 characters. +} +else { // Unsupported algorithm return NULL; } -av_md5_init(md5ctx); -update_md5_strings(md5ctx, method, ":", uri, NULL); -av_md5_final(md5ctx, hash); -ff_data_to_hex(A2hash, hash, 16, 1); +int ret = av_hash_alloc(&hash_ctx, hashing_algorithm); +if (ret < 0) +return NULL; -av_md5_init(md5ctx); -update_md5_strings(md5ctx, A1hash, ":", digest->nonce, NULL); -if (!strcmp(digest->qop, "auth") || !strcmp(digest->qop, "auth-int")) { -update_md5_strings(md5ctx, ":", nc, ":", cnonce, ":", digest->qop, NULL); +/* a1 hash calculation */ +av_hash_init(hash_ctx); +updat
Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index
Apr 11, 2024, 09:45 by lazar.ignjato...@cubic.com: > avformat: enable UDP IPv6 multicast interface selection using zone index > > Enabled IPv6 interface selection using zone index. Properly resolved > interface index in places where default 0 interface index is used > (marked with TODO: within udp.c). Adjusted binding for multicast sockets > that are used for reading from the network. > > For mcast addresses, bind to mcast address is attempted as before. > In case that this fails, which will happen on Windows, socket is bound > to INADDR_ANY/IN6ADDR_ANY_INIT depending on address family. Actual > interface selection is performed using udp_set_multicast_interface to > point to the desired interface for sending. > > Closes: #368 > > Signed-off-by: Lazar Ignjatovic > --- > V1 -> V2 reverted iface resolution for IPv4 MCAST_JOIN_SOURCE_GROUP > NOTE: Due to comments, this patch is proposed as one of two alternatives > The other alternative uses `localaddr` for defining interfaces. > > > configure | 3 ++ > doc/protocols.texi| 2 +- > libavformat/network.h | 6 +++ > libavformat/udp.c | 85 +++ > 4 files changed, 88 insertions(+), 8 deletions(-) > > diff --git a/configure b/configure > index 2a1d22310b..35d6a0b78c 100755 > --- a/configure > +++ b/configure > @@ -2307,6 +2307,7 @@ HEADERS_LIST=" > valgrind_valgrind_h > windows_h > winsock2_h > +iphlpapi_h > " > > INTRINSICS_LIST=" > @@ -6475,6 +6476,8 @@ if ! disabled network; then > check_struct winsock2.h "struct sockaddr" sa_len > check_type ws2tcpip.h "struct sockaddr_in6" > check_type ws2tcpip.h "struct sockaddr_storage" > +check_headers iphlpapi.h -liphlpapi && > network_extralibs="$network_extralibs -liphlpapi" || disable iphlpapi_h > +check_func_headers iphlpapi.h GetBestInterfaceEx $network_extralibs > else > disable network > fi > diff --git a/doc/protocols.texi b/doc/protocols.texi > index f54600b846..a8892845d3 100644 > --- a/doc/protocols.texi > +++ b/doc/protocols.texi > @@ -2027,7 +2027,7 @@ packet bursts. > Override the local UDP port to bind with. > > @item localaddr=@var{addr} > -Local IP address of a network interface used for sending packets or joining > +Local IPv4 address of a network interface used for sending packets or joining > multicast groups. > > @item pkt_size=@var{size} > diff --git a/libavformat/network.h b/libavformat/network.h > index ca214087fc..2461b651d4 100644 > --- a/libavformat/network.h > +++ b/libavformat/network.h > @@ -38,6 +38,10 @@ > #include > #include > > +#if HAVE_IPHLPAPI_H > +#include > +#endif > + > #ifndef EPROTONOSUPPORT > #define EPROTONOSUPPORT WSAEPROTONOSUPPORT > #endif > @@ -64,6 +68,8 @@ int ff_neterrno(void); > #include > #include > #include > +#include > +#include > > #define ff_neterrno() AVERROR(errno) > #endif /* HAVE_WINSOCK2_H */ > diff --git a/libavformat/udp.c b/libavformat/udp.c > index d9514f5026..00c73f9ec9 100644 > --- a/libavformat/udp.c > +++ b/libavformat/udp.c > @@ -35,6 +35,7 @@ > #include "libavutil/opt.h" > #include "libavutil/log.h" > #include "libavutil/time.h" > +#include "libavutil/avstring.h" > #include "internal.h" > #include "network.h" > #include "os_support.h" > @@ -220,8 +221,7 @@ static int udp_join_multicast_group(int sockfd, struct > sockaddr *addr, > struct ipv6_mreq mreq6; > > memcpy(&mreq6.ipv6mr_multiaddr, &(((struct sockaddr_in6 *)addr)->sin6_addr), > sizeof(struct in6_addr)); > -//TODO: Interface index should be looked up from local_addr > -mreq6.ipv6mr_interface = 0; > +mreq6.ipv6mr_interface = ((struct sockaddr_in6 > *)addr)->sin6_scope_id; > if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq6, > sizeof(mreq6)) < 0) { > ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IPV6_ADD_MEMBERSHIP)"); > return ff_neterrno(); > @@ -231,6 +231,39 @@ static int udp_join_multicast_group(int sockfd, struct > sockaddr *addr, > return 0; > } > > +static int udp_set_multicast_interface(int sockfd, struct sockaddr *addr, > +struct sockaddr *local_addr, void > *logctx) > +{ > +#ifdef IP_MULTICAST_IF > +if (addr->sa_family == AF_INET) { > +struct ip_mreq mreq; > + > +mreq.imr_multiaddr.s_addr = ((struct sockaddr_in > *)addr)->sin_addr.s_addr; > +if (local_addr) > +mreq.imr_interface = ((struct sockaddr_in > *)local_addr)->sin_addr; > +else > +mreq.imr_interface.s_addr = INADDR_ANY; > + > +if (setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_IF, (const void > *)&mreq, sizeof(mreq)) < 0) { > +ff_log_net_error(logctx, AV_LOG_ERROR, > "setsockopt(IP_MULTICAST_IF)"); > +return ff_neterrno(); > +} > +} > +#endif > +#if defined(IPV6_MULTICAST_IF) && defined(IPPROTO_IPV6) > +if (addr->sa_family == AF_INET6) { > +unsigned int iface; > +iface = ((struct sockaddr_in6
Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index
This message has been marked as Public on 04/11/2024 07:58Z. On Thursday, April 11, 2024 9:50 AM Lynne wrote: > Is there a reason why we can't switch to IPv4 addresses mapped in IPv6 and > just use the IPv6 API everywhere? I'm not the person to give you that answer. My guess is that due to API discrepancies between v4 and v6 it would require a _lot_ of work to make that jump. Also, different levels of IPv6 support across kernels doesn't make it any easier. Lazar Ignjatović Associate Software Engineer Cubic Defense cubic.com ___ 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] lavf/matroskaenc: sort options by name
On Wed, Apr 10, 2024 at 11:08 AM Stefano Sabatini wrote: > On date Sunday 2024-04-07 16:01:27 +0800, Zhao Zhili wrote: > > > > > On Apr 7, 2024, at 14:16, Anton Khirnov wrote: > > > > > > Quoting Andreas Rheinhardt (2024-04-06 13:25:49) > > >> See > https://ffmpeg.org/pipermail/ffmpeg-devel/2024-February/320849.html > > >> Additionally I do not agree that sorting options by name is the best > > >> way; it should be sorted by what are (believed to be) the most > commonly > > >> used options. > > > > > > +1 > > > > > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240106165246.274472-1-stefa...@gmail.com/ > > > > I have the same consideration in another patch. Maybe group related > > options together than sort whole options. > > This hardly works for the aforementioned reasons, no objective > criteria means that there will be never a consistent way to sort the > options. What happens in practice is that options are added more or > less randomly, which doesn't help readability and discoverability > especially when there are many options. > We have TC now. Oh yes, I completely forgot what is TC. > ___ > 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] avcodec/libx264: bump minimum required version to 160
Michael Niedermayer (12024-04-11): > Maybe its just me but i find it desireable to be able to just > pull ffmpeg master head, build it and have it work on as many systems > as possible. Not just you. The last time x264 had a change that would make me install from sources instead of using an older package was 2017, build 152. While the last time FFmpeg added features… is not that recent since features are more being removed these days, but still recent enough. Regards, -- Nicolas George ___ 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 06/10] lavc/hevc_ps/HEVCSPS: change flags into size-1 bitfields
Anton Khirnov: > Reduces sizeof(HEVCSPS) by 96 bytes. > > Also improve flag names: drop redundant suffixes and prefixes, and > consistently use disabled/enabled. > --- > libavcodec/dxva2_hevc.c| 24 - > libavcodec/hevc_cabac.c| 36 ++--- > libavcodec/hevc_filter.c | 8 +-- > libavcodec/hevc_parser.c | 2 +- > libavcodec/hevc_ps.c | 95 +- > libavcodec/hevc_ps.h | 62 +++--- > libavcodec/hevcdec.c | 10 ++-- > libavcodec/hevcpred_template.c | 4 +- > libavcodec/mips/hevcpred_msa.c | 6 +-- > libavcodec/nvdec_hevc.c| 42 +++ > libavcodec/qsvenc_hevc.c | 2 +- > libavcodec/vaapi_hevc.c| 42 +++ > libavcodec/vdpau_hevc.c| 36 ++--- > libavcodec/vulkan_hevc.c | 56 ++-- > 14 files changed, 212 insertions(+), 213 deletions(-) > Making this a bitfield is not worth it. It will necessitate masking operations on every access to these fields which may increase the size of .text by more than 96B; it may even be that this more than offsets the savings of 96B from using a bitfield. - Andreas ___ 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] Multi NVENC Split Frame Encoding in HEVC and AV1
From: Diego Felix de Souza When Split frame encoding is enabled, each input frame is partitioned into horizontal strips which are encoded independently and simultaneously by separate NVENCs, usually resulting in increased encoding speed compared to single NVENC encoding. --- libavcodec/nvenc.c | 16 libavcodec/nvenc.h | 2 ++ libavcodec/nvenc_av1.c | 8 libavcodec/nvenc_hevc.c | 8 4 files changed, 34 insertions(+) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index b6c5ed3e6b..f4d0d21715 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1696,6 +1696,22 @@ FF_ENABLE_DEPRECATION_WARNINGS if (ctx->weighted_pred == 1) ctx->init_encode_params.enableWeightedPrediction = 1; +#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING +if (avctx->codec->id != AV_CODEC_ID_H264 ) +ctx->init_encode_params.splitEncodeMode = ctx->split_encode_mode; + +if ((ctx->split_encode_mode != NV_ENC_SPLIT_DISABLE_MODE) && +((ctx->weighted_pred == 1) && (avctx->codec->id == AV_CODEC_ID_HEVC ))) { +av_log(avctx, AV_LOG_WARNING, "Split encoding is not " +"supported if any of the following features: weighted prediction, " +"alpha layer encoding, subframe mode, output into video memory " +"buffer, picture timing/buffering period SEI message insertion " +"with DX12 interface are enabled in case of HEVC. For AV1, split " +"encoding is not supported when output into video memory buffer " +"is enabled.\n"); +} +#endif + if (ctx->bluray_compat) { ctx->aud = 1; ctx->dpb_size = FFMIN(FFMAX(avctx->refs, 0), 6); diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index 85ecaf1b5f..09de00badc 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -81,6 +81,7 @@ typedef void ID3D11Device; // SDK 12.1 compile time feature checks #if NVENCAPI_CHECK_VERSION(12, 1) #define NVENC_NO_DEPRECATED_RC +#define NVENC_HAVE_SPLIT_FRAME_ENCODING #endif // SDK 12.2 compile time feature checks @@ -280,6 +281,7 @@ typedef struct NvencContext int tf_level; int lookahead_level; int unidir_b; +int split_encode_mode; } NvencContext; int ff_nvenc_encode_init(AVCodecContext *avctx); diff --git a/libavcodec/nvenc_av1.c b/libavcodec/nvenc_av1.c index d37ee07bff..45dc3c26e0 100644 --- a/libavcodec/nvenc_av1.c +++ b/libavcodec/nvenc_av1.c @@ -157,6 +157,14 @@ static const AVOption options[] = { { "1","", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_1 }, 0, 0, VE, .unit = "lookahead_level" }, { "2","", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_2 }, 0, 0, VE, .unit = "lookahead_level" }, { "3","", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_3 }, 0, 0, VE, .unit = "lookahead_level" }, +#endif +#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING +{ "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, NV_ENC_SPLIT_DISABLE_MODE, VE, .unit = "split_encode_mode" }, +{ "disabled", "Disabled for all configurations", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "auto", "Enabled or disabled depending on the preset and tuning info",0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "forced","Enabled with number of horizontal strips selected by the driver",0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "2", "Enabled with number of horizontal strips forced to 2 when number of NVENCs > 1", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_TWO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "3", "Enabled with number of horizontal strips forced to 3 when number of NVENCs > 2", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_THREE_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, #endif { NULL } }; diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c index bd8b6153f3..1f5e56ecd0 100644 --- a/libavcodec/nvenc_hevc.c +++ b/libavcodec/nvenc_hevc.c @@ -216,6 +216,14 @@ static const AVOption options[] = { #endif #ifdef NVENC_HAVE_UNIDIR_B { "unidir_b", "Enable use of unidirectional B-Frames.", OFFSET(unidir_b), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, +#endif +#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING +{ "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, NV_E
[FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0
We don’t have a minimum required version of Android in FFmpeg. libavdevice/android_camera requires Android 7, Java MediaCodec requires Android 4.1, and NDK MediaCodec requires Android 5.0. Without an explicit version, it’s unclear for development and test. Android 5.0 is released in 2014, is it OK to bump the minimum required version to Android 5.0, or any other version you prefer? ___ 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/tls_mbedtls: Pass FLAG_NONBLOCK to underlying transport
> On Apr 8, 2024, at 21:26, Zhao Zhili wrote: > > From: Zhao Zhili > > This fix rtmps failure since rtmps requires nonblocking read. > > Signed-off-by: Zhao Zhili > --- > libavformat/tls_mbedtls.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c > index 8503523b6d..f51cf43b1c 100644 > --- a/libavformat/tls_mbedtls.c > +++ b/libavformat/tls_mbedtls.c > @@ -309,6 +309,8 @@ static int tls_read(URLContext *h, uint8_t *buf, int size) > TLSContext *tls_ctx = h->priv_data; > int ret; > > +tls_ctx->tls_shared.tcp->flags &= ~AVIO_FLAG_NONBLOCK; > +tls_ctx->tls_shared.tcp->flags |= h->flags & AVIO_FLAG_NONBLOCK; > if ((ret = mbedtls_ssl_read(&tls_ctx->ssl_context, buf, size)) > 0) { > // return read length > return ret; > @@ -322,6 +324,8 @@ static int tls_write(URLContext *h, const uint8_t *buf, > int size) > TLSContext *tls_ctx = h->priv_data; > int ret; > > +tls_ctx->tls_shared.tcp->flags &= ~AVIO_FLAG_NONBLOCK; > +tls_ctx->tls_shared.tcp->flags |= h->flags & AVIO_FLAG_NONBLOCK; > if ((ret = mbedtls_ssl_write(&tls_ctx->ssl_context, buf, size)) > 0) { > // return written length > return ret; > -- > 2.25.1 Will apply tomorrow. > > ___ > 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 10/10] lavc/hevc_ps: compactify ShortTermRPS
On 4/10/2024 10:31 AM, Anton Khirnov wrote: Do not use larger fields than needed, use size-1 bitfields for flags. Reduces sizeof(HEVCSPS) by 1280 bytes. --- libavcodec/hevc_ps.c | 6 +++--- libavcodec/hevc_ps.h | 19 +++ libavcodec/vulkan_hevc.c | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 76fe507e7b..7b486ce0af 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -143,11 +143,11 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, for (i = 0; i <= rps_ridx->num_delta_pocs; i++) { used[k] = get_bits1(gb); -rps->use_delta_flag = 0; +rps->use_delta = 0; if (!used[k]) -rps->use_delta_flag = get_bits1(gb); +rps->use_delta = get_bits1(gb); -if (used[k] || rps->use_delta_flag) { +if (used[k] || rps->use_delta) { if (i < rps_ridx->num_delta_pocs) delta_poc = delta_rps + rps_ridx->delta_poc[i]; else diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h index 92b85115f7..a8d07aa1b2 100644 --- a/libavcodec/hevc_ps.h +++ b/libavcodec/hevc_ps.h @@ -70,16 +70,19 @@ typedef struct HEVCHdrParams { } HEVCHdrParams; typedef struct ShortTermRPS { -uint8_t rps_predict; -unsigned int delta_idx; -uint8_t use_delta_flag; -uint8_t delta_rps_sign; -unsigned int abs_delta_rps; -unsigned int num_negative_pics; -int num_delta_pocs; -int rps_idx_num_delta_pocs; int32_t delta_poc[32]; uint32_t used; + +uint8_t delta_idx; +uint8_t num_negative_pics; +uint8_t num_delta_pocs; +uint8_t rps_idx_num_delta_pocs; + +uint16_t abs_delta_rps; +unsigned delta_rps_sign:1; Wont the compiler add two bytes of padding if you put this here? + +unsigned rps_predict:1; +unsigned use_delta:1; } ShortTermRPS; typedef struct HEVCWindow { diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c index c2b65fc201..b109475194 100644 --- a/libavcodec/vulkan_hevc.c +++ b/libavcodec/vulkan_hevc.c @@ -359,7 +359,7 @@ static void set_sps(const HEVCSPS *sps, int sps_idx, .delta_rps_sign = sps->st_rps[i].delta_rps_sign, }, .delta_idx_minus1 = sps->st_rps[i].delta_idx - 1, -.use_delta_flag = sps->st_rps[i].use_delta_flag, +.use_delta_flag = sps->st_rps[i].use_delta, .abs_delta_rps_minus1 = sps->st_rps[i].abs_delta_rps - 1, .used_by_curr_pic_flag= 0x0, .used_by_curr_pic_s0_flag = 0x0, ___ 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 v3] avformat: enable UDP IPv6 multicast interface selection using zone index
avformat: enable UDP IPv6 multicast interface selection using zone index Enabled IPv6 interface selection using zone index. Properly resolved interface index in places where default 0 interface index is used (marked with TODO: within udp.c). Adjusted binding for multicast sockets that are used for reading from the network. For mcast addresses, bind to mcast address is attempted as before. In case that this fails, which will happen on Windows, socket is bound to INADDR_ANY/IN6ADDR_ANY_INIT depending on address family. Actual interface selection is performed using udp_set_multicast_interface to point to the desired interface for sending. Closes: #368 Signed-off-by: Lazar Ignjatovic --- NOTE: Due to comments, this patch is proposed as one of two alternatives The other alternative uses `localaddr` for defining interfaces. V1 -> V2 reverted iface resolution for IPv4 MCAST_JOIN_SOURCE_GROUP V2 -> V3 resolved conflicts configure | 3 ++ doc/protocols.texi| 2 +- libavformat/network.h | 6 +++ libavformat/udp.c | 85 +++ 4 files changed, 88 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 55f1fc354d..96183e58b3 100755 --- a/configure +++ b/configure @@ -2311,6 +2311,7 @@ HEADERS_LIST=" valgrind_valgrind_h windows_h winsock2_h +iphlpapi_h " INTRINSICS_LIST=" @@ -6483,6 +6484,8 @@ if ! disabled network; then check_struct winsock2.h "struct sockaddr" sa_len check_type ws2tcpip.h "struct sockaddr_in6" check_type ws2tcpip.h "struct sockaddr_storage" +check_headers iphlpapi.h -liphlpapi && network_extralibs="$network_extralibs -liphlpapi" || disable iphlpapi_h +check_func_headers iphlpapi.h GetBestInterfaceEx $network_extralibs else disable network fi diff --git a/doc/protocols.texi b/doc/protocols.texi index f54600b846..a8892845d3 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -2027,7 +2027,7 @@ packet bursts. Override the local UDP port to bind with. @item localaddr=@var{addr} -Local IP address of a network interface used for sending packets or joining +Local IPv4 address of a network interface used for sending packets or joining multicast groups. @item pkt_size=@var{size} diff --git a/libavformat/network.h b/libavformat/network.h index ca214087fc..2461b651d4 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -38,6 +38,10 @@ #include #include +#if HAVE_IPHLPAPI_H +#include +#endif + #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT #endif @@ -64,6 +68,8 @@ int ff_neterrno(void); #include #include #include +#include +#include #define ff_neterrno() AVERROR(errno) #endif /* HAVE_WINSOCK2_H */ diff --git a/libavformat/udp.c b/libavformat/udp.c index c1ebdd1222..fa2f62b0b7 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -36,6 +36,7 @@ #include "libavutil/opt.h" #include "libavutil/log.h" #include "libavutil/time.h" +#include "libavutil/avstring.h" #include "network.h" #include "os_support.h" #include "url.h" @@ -220,8 +221,7 @@ static int udp_join_multicast_group(int sockfd, struct sockaddr *addr, struct ipv6_mreq mreq6; memcpy(&mreq6.ipv6mr_multiaddr, &(((struct sockaddr_in6 *)addr)->sin6_addr), sizeof(struct in6_addr)); -//TODO: Interface index should be looked up from local_addr -mreq6.ipv6mr_interface = 0; +mreq6.ipv6mr_interface = ((struct sockaddr_in6 *)addr)->sin6_scope_id; if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq6, sizeof(mreq6)) < 0) { ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IPV6_ADD_MEMBERSHIP)"); return ff_neterrno(); @@ -231,6 +231,39 @@ static int udp_join_multicast_group(int sockfd, struct sockaddr *addr, return 0; } +static int udp_set_multicast_interface(int sockfd, struct sockaddr *addr, +struct sockaddr *local_addr, void *logctx) +{ +#ifdef IP_MULTICAST_IF +if (addr->sa_family == AF_INET) { +struct ip_mreq mreq; + +mreq.imr_multiaddr.s_addr = ((struct sockaddr_in *)addr)->sin_addr.s_addr; +if (local_addr) +mreq.imr_interface = ((struct sockaddr_in *)local_addr)->sin_addr; +else +mreq.imr_interface.s_addr = INADDR_ANY; + +if (setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_IF, (const void *)&mreq, sizeof(mreq)) < 0) { +ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IP_MULTICAST_IF)"); +return ff_neterrno(); +} +} +#endif +#if defined(IPV6_MULTICAST_IF) && defined(IPPROTO_IPV6) +if (addr->sa_family == AF_INET6) { +unsigned int iface; +iface = ((struct sockaddr_in6 *)addr)->sin6_scope_id; + +if (setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &iface, sizeof(unsigned int)) < 0) { +ff_log_net_error(logctx, AV_LOG_ERROR, "setsockopt(IPV6_MULTI
Re: [FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0
tor 2024-04-11 klockan 20:16 +0800 skrev Zhao Zhili: > We don’t have a minimum required version of Android in FFmpeg. > libavdevice/android_camera requires Android 7, Java MediaCodec > requires Android 4.1, and NDK MediaCodec requires Android 5.0. > > Without an explicit version, it’s unclear for development and test. > > Android 5.0 is released in 2014, is it OK to bump the minimum > required > version to Android 5.0, or any other version you prefer? Don't we already have stuff that detects the Android version and acts accordingly? Dropping 4.1 might lessen the maintenance burden though. I have an old phone (Samsung Galaxy S5) running the most recent LineageOS possible to install on it (16.0), and that uses Android 9. So for me bumping to version 5 sounds fine. Do you have any statistics on Android versions actually in use? /Tomas ___ 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] Multi NVENC Split Frame Encoding in HEVC and AV1
On 11/04/2024 13:58, Diego Felix de Souza via ffmpeg-devel wrote: From: Diego Felix de Souza When Split frame encoding is enabled, each input frame is partitioned into horizontal strips which are encoded independently and simultaneously by separate NVENCs, usually resulting in increased encoding speed compared to single NVENC encoding. --- libavcodec/nvenc.c | 16 libavcodec/nvenc.h | 2 ++ libavcodec/nvenc_av1.c | 8 libavcodec/nvenc_hevc.c | 8 4 files changed, 34 insertions(+) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index b6c5ed3e6b..f4d0d21715 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1696,6 +1696,22 @@ FF_ENABLE_DEPRECATION_WARNINGS if (ctx->weighted_pred == 1) ctx->init_encode_params.enableWeightedPrediction = 1; +#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING +if (avctx->codec->id != AV_CODEC_ID_H264 ) nit: superfluous space In general, this check is probably not necessary, given the h264 encoder does not have this AVOption so it'll always be zero-initialized there, which should be fine? Or would setting it to the equivalent of "auto" cause issues on h264? +ctx->init_encode_params.splitEncodeMode = ctx->split_encode_mode; + +if ((ctx->split_encode_mode != NV_ENC_SPLIT_DISABLE_MODE) && +((ctx->weighted_pred == 1) && (avctx->codec->id == AV_CODEC_ID_HEVC ))) { I think the ffmpeg recommended style would indent this line by 4 spaces. What I usually do, even though it's technically against style-guidelines, is indent the extra lines by 4, and then put the opening { on its own line, since imo it greatly improves readability. also a superfluous space at the end. +av_log(avctx, AV_LOG_WARNING, "Split encoding is not " +"supported if any of the following features: weighted prediction, " +"alpha layer encoding, subframe mode, output into video memory " +"buffer, picture timing/buffering period SEI message insertion " +"with DX12 interface are enabled in case of HEVC. For AV1, split " +"encoding is not supported when output into video memory buffer " +"is enabled.\n"); This message is a bit of a mouthful, and most of it is not applicable to users. I'd maybe shorten it to something like: "Split encoding not supported if weighted prediction enabled." Since that's the only option that can actually cause issues with the current nvenc.c implementation. +} +#endif + if (ctx->bluray_compat) { ctx->aud = 1; ctx->dpb_size = FFMIN(FFMAX(avctx->refs, 0), 6); diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index 85ecaf1b5f..09de00badc 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -81,6 +81,7 @@ typedef void ID3D11Device; // SDK 12.1 compile time feature checks #if NVENCAPI_CHECK_VERSION(12, 1) #define NVENC_NO_DEPRECATED_RC +#define NVENC_HAVE_SPLIT_FRAME_ENCODING #endif // SDK 12.2 compile time feature checks @@ -280,6 +281,7 @@ typedef struct NvencContext int tf_level; int lookahead_level; int unidir_b; +int split_encode_mode; } NvencContext; int ff_nvenc_encode_init(AVCodecContext *avctx); diff --git a/libavcodec/nvenc_av1.c b/libavcodec/nvenc_av1.c index d37ee07bff..45dc3c26e0 100644 --- a/libavcodec/nvenc_av1.c +++ b/libavcodec/nvenc_av1.c @@ -157,6 +157,14 @@ static const AVOption options[] = { { "1","", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_1 }, 0, 0, VE, .unit = "lookahead_level" }, { "2","", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_2 }, 0, 0, VE, .unit = "lookahead_level" }, { "3","", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_LOOKAHEAD_LEVEL_3 }, 0, 0, VE, .unit = "lookahead_level" }, +#endif +#ifdef NVENC_HAVE_SPLIT_FRAME_ENCODING +{ "split_encode_mode", "Specifies the split encoding mode", OFFSET(split_encode_mode), AV_OPT_TYPE_INT, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, NV_ENC_SPLIT_DISABLE_MODE, VE, .unit = "split_encode_mode" }, +{ "disabled", "Disabled for all configurations", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_DISABLE_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "auto", "Enabled or disabled depending on the preset and tuning info",0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "forced","Enabled with number of horizontal strips selected by the driver",0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_SPLIT_AUTO_FORCED_MODE }, 0, 0, VE, .unit = "split_encode_mode" }, +{ "2", "Enabled with number of horizontal strips forced to 2 when
Re: [FFmpeg-devel] [RFC] Bump minimum required version of Android to 5.0
> On Apr 11, 2024, at 21:17, Tomas Härdin wrote: > > tor 2024-04-11 klockan 20:16 +0800 skrev Zhao Zhili: >> We don’t have a minimum required version of Android in FFmpeg. >> libavdevice/android_camera requires Android 7, Java MediaCodec >> requires Android 4.1, and NDK MediaCodec requires Android 5.0. >> >> Without an explicit version, it’s unclear for development and test. >> >> Android 5.0 is released in 2014, is it OK to bump the minimum >> required >> version to Android 5.0, or any other version you prefer? > > Don't we already have stuff that detects the Android version and acts > accordingly? Dropping 4.1 might lessen the maintenance burden though. Check Android API level is easy. There is minimum API level requirement in configure script as far as I know. > > I have an old phone (Samsung Galaxy S5) running the most recent > LineageOS possible to install on it (16.0), and that uses Android 9. So > for me bumping to version 5 sounds fine. > > Do you have any statistics on Android versions actually in use? Search by "Android distribution chart" shows version >= 5.0 is about 99.3%. > > /Tomas > ___ > 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".
[FFmpeg-devel] cannot compile the ffmpeg latest on local
I was trying to compile the ffmpeg in my local using MSYS2 terminal and i am getting this error gcc is unable to create an executable file. If gcc is a cross-compiler, use the --enable-cross-compile option. Only do this if you know what cross compiling means. C compiler test failed. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-u...@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. ___ 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] libavformat/hls.c: support in-stream ID3 metadata update.
Hi all, Le dim. 7 avr. 2024 à 09:46, Romain Beauxis a écrit : > > > Le dim. 7 avr. 2024 à 05:44, Steven Liu a > écrit : > >> Romain Beauxis 于2024年3月26日周二 08:58写道: >> > >> > This patch adds support for updating HLS metadata passed as ID3 frames. >> > >> > This seems like a pretty straight-forward improvement. Updating the >> > metadaata of the first stream seems to be the mechanism is other places >> > in the code and works as expected. >> >> Would it be possible to get this patch committed? My understanding is that it has been reviewed so this should be the next step? The second patch adding FATE tests could be committed separately if it causes issues. The samples for it are here: https://www.dropbox.com/scl/fo/1x74ztoa6yo9q49ignfnt/h?rlkey=xvg5nhgjr515gm6b375evm8n4&dl=0 and should be placed into a $FATE_SAMPLES/hls-adts-meta directory. Thanks! > > --- >> > libavformat/hls.c | 54 --- >> > 1 file changed, 32 insertions(+), 22 deletions(-) >> > >> > diff --git a/libavformat/hls.c b/libavformat/hls.c >> > index f6b44c2e35..ba6634d57a 100644 >> > --- a/libavformat/hls.c >> > +++ b/libavformat/hls.c >> > @@ -93,6 +93,12 @@ enum PlaylistType { >> > PLS_TYPE_VOD >> > }; >> > >> > +#define ID3_PRIV_OWNER_TS >> "com.apple.streaming.transportStreamTimestamp" >> > +#define ID3_PRIV_OWNER_AUDIO_SETUP >> "com.apple.streaming.audioDescription" >> > + >> > +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX >> ID3_PRIV_OWNER_TS >> > +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX >> ID3_PRIV_OWNER_AUDIO_SETUP >> > + >> > /* >> > * Each playlist has its own demuxer. If it currently is active, >> > * it has an open AVIOContext too, and potentially an AVPacket >> > @@ -150,9 +156,7 @@ struct playlist { >> > int64_t id3_offset; /* in stream original tb */ >> > uint8_t* id3_buf; /* temp buffer for id3 parsing */ >> > unsigned int id3_buf_size; >> > -AVDictionary *id3_initial; /* data from first id3 tag */ >> > -int id3_found; /* ID3 tag found at some point */ >> > -int id3_changed; /* ID3 tag data has changed at some point */ >> > +AVDictionary *last_id3; /* data from the last id3 tag */ >> > ID3v2ExtraMeta *id3_deferred_extra; /* stored here until >> subdemuxer is opened */ >> > >> > HLSAudioSetupInfo audio_setup_info; >> > @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c) >> > av_freep(&pls->main_streams); >> > av_freep(&pls->renditions); >> > av_freep(&pls->id3_buf); >> > -av_dict_free(&pls->id3_initial); >> > +av_dict_free(&pls->last_id3); >> > ff_id3v2_free_extra_meta(&pls->id3_deferred_extra); >> > av_freep(&pls->init_sec_buf); >> > av_packet_free(&pls->pkt); >> > @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s, >> AVIOContext *pb, >> >AVDictionary **metadata, int64_t *dts, >> HLSAudioSetupInfo *audio_setup_info, >> >ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta >> **extra_meta) >> > { >> > -static const char id3_priv_owner_ts[] = >> "com.apple.streaming.transportStreamTimestamp"; >> > -static const char id3_priv_owner_audio_setup[] = >> "com.apple.streaming.audioDescription"; >> > ID3v2ExtraMeta *meta; >> > >> > ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta); >> > for (meta = *extra_meta; meta; meta = meta->next) { >> > if (!strcmp(meta->tag, "PRIV")) { >> > ID3v2ExtraMetaPRIV *priv = &meta->data.priv; >> > -if (priv->datasize == 8 && !av_strncasecmp(priv->owner, >> id3_priv_owner_ts, 44)) { >> > +if (priv->datasize == 8 && !av_strncasecmp(priv->owner, >> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) { >> > /* 33-bit MPEG timestamp */ >> > int64_t ts = AV_RB64(priv->data); >> > av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp >> %"PRId64"\n", ts); >> > @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s, >> AVIOContext *pb, >> > *dts = ts; >> > else >> > av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio >> timestamp %"PRId64"\n", ts); >> > -} else if (priv->datasize >= 8 && >> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) { >> > +} else if (priv->datasize >= 8 && >> > + !av_strncasecmp(priv->owner, >> ID3_PRIV_OWNER_AUDIO_SETUP, 36) && >> > + audio_setup_info) { >> > ff_hls_senc_read_audio_setup_info(audio_setup_info, >> priv->data, priv->datasize); >> > } >> > } else if (!strcmp(meta->tag, "APIC") && apic) >> > @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct >> playlist *pls, AVDictionary *metadata, >> > { >> > const AVDictionaryEntry *entry = NULL; >> > const AVDictionaryEntry *oldentry; >> > + >
Re: [FFmpeg-devel] [PATCH 2/2] Add fate test for hls metadata update.
Romain Beauxis: > This patch adds a FATE test for the new HLS metadata update. The fate > sample consists of a two segment AAC hls stream. The first segment has > test title 1 as title metadata while the second has test title 2. > > In the log, we can see that test title 2 is reported for the stream, > indicating that the metadata was updated with the second segment. > > Romain > --- > tests/fate/demux.mak | 3 + > tests/ref/fate/hls-adts-meta-demux | 124 + > 2 files changed, 127 insertions(+) > create mode 100644 tests/ref/fate/hls-adts-meta-demux > > diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak > index d9b9045f0b..7243c2c163 100644 > --- a/tests/fate/demux.mak > +++ b/tests/fate/demux.mak > @@ -160,6 +160,9 @@ fate-ts-demux: CMD = ffprobe_demux > $(TARGET_SAMPLES)/ac3/mp3ac325-4864-small.ts > FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-ts-timed-id3-demux > fate-ts-timed-id3-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/mpegts/id3.ts > > +FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-hls-adts-meta-demux > +fate-fate-hls-adts-meta-demux: CMD = ffprobe_demux > $(TARGET_SAMPLES)/hls-adts-meta/stream.m3u8 > + > FATE_SAMPLES_DEMUX += $(FATE_SAMPLES_DEMUX-yes) > FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_DEMUX) > FATE_FFPROBE_DEMUX += $(FATE_FFPROBE_DEMUX-yes) > diff --git a/tests/ref/fate/hls-adts-meta-demux > b/tests/ref/fate/hls-adts-meta-demux > new file mode 100644 > index 00..ab944695fc > --- /dev/null > +++ b/tests/ref/fate/hls-adts-meta-demux > @@ -0,0 +1,124 @@ > +packet|codec_type=audio|stream_index=0|pts=3416400|pts_time=37.96|dts=3416400|dts_time=37.96|duration=2090|duration_time=0.023222|size=368|pos=0|flags=K__|data_hash=CRC32:c371b0d9 > +packet|codec_type=audio|stream_index=0|pts=3418490|pts_time=37.983222|dts=3418490|dts_time=37.983222|duration=2090|duration_time=0.023222|size=390|pos=368|flags=K__|data_hash=CRC32:950c52b2 > +packet|codec_type=audio|stream_index=0|pts=3420580|pts_time=38.006444|dts=3420580|dts_time=38.006444|duration=2090|duration_time=0.023222|size=357|pos=758|flags=K__|data_hash=CRC32:3e672212 > +packet|codec_type=audio|stream_index=0|pts=3422669|pts_time=38.029656|dts=3422669|dts_time=38.029656|duration=2090|duration_time=0.023222|size=426|pos=1115|flags=K__|data_hash=CRC32:817b6e4c > +packet|codec_type=audio|stream_index=0|pts=3424759|pts_time=38.052878|dts=3424759|dts_time=38.052878|duration=2090|duration_time=0.023222|size=368|pos=1541|flags=K__|data_hash=CRC32:c4c6e1ed > +packet|codec_type=audio|stream_index=0|pts=3426849|pts_time=38.076100|dts=3426849|dts_time=38.076100|duration=2090|duration_time=0.023222|size=389|pos=1909|flags=K__|data_hash=CRC32:67cb6dd9 > +packet|codec_type=audio|stream_index=0|pts=3428939|pts_time=38.099322|dts=3428939|dts_time=38.099322|duration=2090|duration_time=0.023222|size=352|pos=2298|flags=K__|data_hash=CRC32:7a56ff53 > +packet|codec_type=audio|stream_index=0|pts=3431029|pts_time=38.122544|dts=3431029|dts_time=38.122544|duration=2090|duration_time=0.023222|size=378|pos=2650|flags=K__|data_hash=CRC32:f8d5ef58 > +packet|codec_type=audio|stream_index=0|pts=3433118|pts_time=38.145756|dts=3433118|dts_time=38.145756|duration=2090|duration_time=0.023222|size=384|pos=3028|flags=K__|data_hash=CRC32:73a4fb1c > +packet|codec_type=audio|stream_index=0|pts=3435208|pts_time=38.168978|dts=3435208|dts_time=38.168978|duration=2090|duration_time=0.023222|size=353|pos=3412|flags=K__|data_hash=CRC32:4ea999b5 > +packet|codec_type=audio|stream_index=0|pts=3437298|pts_time=38.192200|dts=3437298|dts_time=38.192200|duration=2090|duration_time=0.023222|size=417|pos=3765|flags=K__|data_hash=CRC32:4540aec8 > +packet|codec_type=audio|stream_index=0|pts=3439388|pts_time=38.215422|dts=3439388|dts_time=38.215422|duration=2090|duration_time=0.023222|size=361|pos=4182|flags=K__|data_hash=CRC32:635a04f4 > +packet|codec_type=audio|stream_index=0|pts=3441478|pts_time=38.238644|dts=3441478|dts_time=38.238644|duration=2090|duration_time=0.023222|size=399|pos=4543|flags=K__|data_hash=CRC32:94583c18 > +packet|codec_type=audio|stream_index=0|pts=3443567|pts_time=38.261856|dts=3443567|dts_time=38.261856|duration=2090|duration_time=0.023222|size=384|pos=4942|flags=K__|data_hash=CRC32:21070d79 > +packet|codec_type=audio|stream_index=0|pts=3445657|pts_time=38.285078|dts=3445657|dts_time=38.285078|duration=2090|duration_time=0.023222|size=378|pos=5326|flags=K__|data_hash=CRC32:bd5beb97 > +packet|codec_type=audio|stream_index=0|pts=3447747|pts_time=38.308300|dts=3447747|dts_time=38.308300|duration=2090|duration_time=0.023222|size=362|pos=5704|flags=K__|data_hash=CRC32:8bb15fb7 > +packet|codec_type=audio|stream_index=0|pts=3449837|pts_time=38.331522|dts=3449837|dts_time=38.331522|duration=2090|duration_time=0.023222|size=365|pos=6066|flags=K__|data_hash=CRC32:a1801ece > +packet|codec_type=audio|stream_index=0|pts=3451927|pts_time=38.354744|dts=3451927|dts_time=38.354744|duration=2090|duration
Re: [FFmpeg-devel] cannot compile the ffmpeg latest on local
On 11 Apr 2024, at 15:59, B-2014 Ariyan Kashyap wrote: > I was trying to compile the ffmpeg in my local using MSYS2 terminal and i > am getting this error > > gcc is unable to create an executable file. > If gcc is a cross-compiler, use the --enable-cross-compile option. > Only do this if you know what cross compiling means. > C compiler test failed. > > If you think configure made a mistake, make sure you are using the latest > version from Git. If the latest version fails, report the problem to the > ffmpeg-u...@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. > Include the log file "ffbuild/config.log" produced by configure as this > will help > solve the problem. Citing from this very message: „Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem.“ Please actually do that, else it’s all just guesswork. > ___ > 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] [RFC] Bump minimum required version of Android to 5.0
> 在 2024年4月11日,下午9:57,Zhao Zhili 写道: > > >> >> On Apr 11, 2024, at 21:17, Tomas Härdin wrote: >> >> tor 2024-04-11 klockan 20:16 +0800 skrev Zhao Zhili: >>> We don’t have a minimum required version of Android in FFmpeg. >>> libavdevice/android_camera requires Android 7, Java MediaCodec >>> requires Android 4.1, and NDK MediaCodec requires Android 5.0. >>> >>> Without an explicit version, it’s unclear for development and test. >>> >>> Android 5.0 is released in 2014, is it OK to bump the minimum >>> required >>> version to Android 5.0, or any other version you prefer? >> >> Don't we already have stuff that detects the Android version and acts >> accordingly? Dropping 4.1 might lessen the maintenance burden though. > > Check Android API level is easy. There is minimum API level requirement > in configure script as far as I know. I mean there is no minimum API level requirement in configure. >> >> I have an old phone (Samsung Galaxy S5) running the most recent >> LineageOS possible to install on it (16.0), and that uses Android 9. So >> for me bumping to version 5 sounds fine. >> >> Do you have any statistics on Android versions actually in use? > > Search by "Android distribution chart" shows version >= 5.0 is about 99.3%. > >> >> /Tomas >> ___ >> 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".
[FFmpeg-devel] [PATCH] ffmpeg: Add -copystreamid
Hi Patch attached allows preserving PIDs when remuxing MPEG-TS. James suggested we could generalize this to allow copying from specific streams, but I think if we want to handle a more general case then it would be better to handle streamid via metadata. Passes FATE. /Tomas From 63b10983876077fd0e2b41c21a3c188b8557c602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 11 Apr 2024 16:52:33 +0200 Subject: [PATCH] ffmpeg: Add -copystreamid This causes streamid's to be copied from all input streams to all output streams. Individual streams' streamid can still be set explicitly with -streamid. --- doc/ffmpeg.texi | 10 ++ fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux_init.c | 4 fftools/ffmpeg_opt.c | 5 + 4 files changed, 20 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index e996ab945f..ef61b7118d 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -2096,6 +2096,16 @@ an output mpegts file: ffmpeg -i inurl -streamid 0:33 -streamid 1:36 out.ts @end example +@item -copystreamid +Copy streamid's (PIDs) from input streams to output streams for all streams in all output files. +Can be overridden with -streamid on a per-stream basis. + +For example, to remux an input MPEG-TS file, copying all PIDs except the PID of stream 3, +and setting the PID of stream 3 to 0x123: +@example +ffmpeg -i in.ts -map 0 -c copy -copystreamid -streamid 3:0x123 -y out.ts +@end + @item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{input/output,per-stream}) Apply bitstream filters to matching streams. The filters are applied to each packet as it is received from the demuxer (when used as an input option) or diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 885a7c0c10..e0f8e4d87d 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -685,6 +685,7 @@ extern int64_t stats_period; extern int stdin_interaction; extern AVIOContext *progress_avio; extern float max_error_rate; +extern int copy_streamid; extern char *filter_nbthreads; extern int filter_complex_nbthreads; diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 6d8bd5bcdf..8268595a18 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1073,6 +1073,10 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, ost = &ms->ost; +if (ist && copy_streamid) +ost->st->id = ist->st->id; + +// override -copystreamid if -streamid explicitly set if (o->streamid) { AVDictionaryEntry *e; char idx[16], *p; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 6526e8e3e8..5b4b29d259 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -77,6 +77,7 @@ int filter_complex_nbthreads = 0; int vstats_version = 2; int auto_conversion_filters = 1; int64_t stats_period = 50; +int copy_streamid = 0; static int file_overwrite = 0; @@ -1902,5 +1903,9 @@ const OptionDef options[] = { "set video sync method globally; deprecated, use -fps_mode", "" }, #endif +{ "copystreamid", OPT_TYPE_BOOL, OPT_EXPERT, +{ ©_streamid }, +"copy input stream's streamid (MPEG-TS PID) to output stream, for all streams where -streamid is not set" }, + { NULL, }, }; -- 2.39.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] [PATCH] avutil/frame: flag A53_CC side data type as allowing multiple entries
Some interlaced h264 samples may export one caption per field. Signed-off-by: James Almer --- libavutil/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 0775e2abd9..fdac6f8ee2 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -30,7 +30,6 @@ static const AVSideDataDescriptor sd_props[] = { [AV_FRAME_DATA_PANSCAN] = { "AVPanScan" }, -[AV_FRAME_DATA_A53_CC] = { "ATSC A53 Part 4 Closed Captions" }, [AV_FRAME_DATA_MATRIXENCODING] = { "AVMatrixEncoding" }, [AV_FRAME_DATA_DOWNMIX_INFO]= { "Metadata relevant to a downmix procedure" }, [AV_FRAME_DATA_AFD] = { "Active format description" }, @@ -55,6 +54,7 @@ static const AVSideDataDescriptor sd_props[] = { [AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT] = { "Ambient viewing environment", AV_SIDE_DATA_PROP_GLOBAL }, [AV_FRAME_DATA_SPHERICAL] = { "Spherical Mapping", AV_SIDE_DATA_PROP_GLOBAL }, [AV_FRAME_DATA_ICC_PROFILE] = { "ICC profile", AV_SIDE_DATA_PROP_GLOBAL }, +[AV_FRAME_DATA_A53_CC] = { "ATSC A53 Part 4 Closed Captions", AV_SIDE_DATA_PROP_MULTI }, [AV_FRAME_DATA_SEI_UNREGISTERED]= { "H.26[45] User Data Unregistered SEI message", AV_SIDE_DATA_PROP_MULTI }, }; -- 2.44.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] ffmpeg: Add -copystreamid
tor 2024-04-11 klockan 17:41 +0200 skrev Tomas Härdin: > Hi > > Patch attached allows preserving PIDs when remuxing MPEG-TS. James > suggested we could generalize this to allow copying from specific > streams, but I think if we want to handle a more general case then it > would be better to handle streamid via metadata. > > Passes FATE. Come to think of it, I may need the ability to copy PID from a specific stream after all. Or more correctly, to replace the audio in an MPEG-TS stream but keep all the other streams the same, and keeping the PIDs. I'll see what I can come up with.. /Tomas ___ 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] avutil/frame: flag A53_CC side data type as allowing multiple entries
On Thu, 11 Apr 2024, 16:42 James Almer, wrote: > Some interlaced h264 samples may export one caption per field. > > Signed-off-by: James Almer > --- > libavutil/frame.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavutil/frame.c b/libavutil/frame.c > index 0775e2abd9..fdac6f8ee2 100644 > --- a/libavutil/frame.c > +++ b/libavutil/frame.c > @@ -30,7 +30,6 @@ > > static const AVSideDataDescriptor sd_props[] = { > [AV_FRAME_DATA_PANSCAN] = { "AVPanScan" }, > -[AV_FRAME_DATA_A53_CC] = { "ATSC A53 Part 4 > Closed Captions" }, > [AV_FRAME_DATA_MATRIXENCODING] = { "AVMatrixEncoding" }, > [AV_FRAME_DATA_DOWNMIX_INFO]= { "Metadata relevant to > a downmix procedure" }, > [AV_FRAME_DATA_AFD] = { "Active format > description" }, > @@ -55,6 +54,7 @@ static const AVSideDataDescriptor sd_props[] = { > [AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT] = { "Ambient viewing > environment", AV_SIDE_DATA_PROP_GLOBAL }, > [AV_FRAME_DATA_SPHERICAL] = { "Spherical Mapping", > AV_SIDE_DATA_PROP_GLOBAL }, > [AV_FRAME_DATA_ICC_PROFILE] = { "ICC profile", > AV_SIDE_DATA_PROP_GLOBAL }, > +[AV_FRAME_DATA_A53_CC] = { "ATSC A53 Part 4 > Closed Captions", AV_SIDE_DATA_PROP_MULTI }, > [AV_FRAME_DATA_SEI_UNREGISTERED]= { "H.26[45] User Data > Unregistered SEI message", AV_SIDE_DATA_PROP_MULTI }, > }; > > -- > 2.44.0 > But we merge the captions into a single side data element, no? Kieran > ___ 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] avcodec/libx264: bump minimum required version to 160
On Thu, Apr 11, 2024 at 6:02 AM Nicolas George wrote: > Michael Niedermayer (12024-04-11): > > Maybe its just me but i find it desireable to be able to just > > pull ffmpeg master head, build it and have it work on as many systems > > as possible. > > While the last time FFmpeg added features… is not that recent since > features are more being removed these days, but still recent enough. > This statement is false. Please stop spreading misinformation. -- Vittorio ___ 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] avutil/frame: flag A53_CC side data type as allowing multiple entries
On 4/11/2024 5:17 PM, Kieran Kunhya wrote: On Thu, 11 Apr 2024, 16:42 James Almer, wrote: Some interlaced h264 samples may export one caption per field. Signed-off-by: James Almer --- libavutil/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 0775e2abd9..fdac6f8ee2 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -30,7 +30,6 @@ static const AVSideDataDescriptor sd_props[] = { [AV_FRAME_DATA_PANSCAN] = { "AVPanScan" }, -[AV_FRAME_DATA_A53_CC] = { "ATSC A53 Part 4 Closed Captions" }, [AV_FRAME_DATA_MATRIXENCODING] = { "AVMatrixEncoding" }, [AV_FRAME_DATA_DOWNMIX_INFO]= { "Metadata relevant to a downmix procedure" }, [AV_FRAME_DATA_AFD] = { "Active format description" }, @@ -55,6 +54,7 @@ static const AVSideDataDescriptor sd_props[] = { [AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT] = { "Ambient viewing environment", AV_SIDE_DATA_PROP_GLOBAL }, [AV_FRAME_DATA_SPHERICAL] = { "Spherical Mapping", AV_SIDE_DATA_PROP_GLOBAL }, [AV_FRAME_DATA_ICC_PROFILE] = { "ICC profile", AV_SIDE_DATA_PROP_GLOBAL }, +[AV_FRAME_DATA_A53_CC] = { "ATSC A53 Part 4 Closed Captions", AV_SIDE_DATA_PROP_MULTI }, [AV_FRAME_DATA_SEI_UNREGISTERED]= { "H.26[45] User Data Unregistered SEI message", AV_SIDE_DATA_PROP_MULTI }, }; -- 2.44.0 But we merge the captions into a single side data element, no? Kieran Oh, I must have misread how it was exported. Dropping this patch then. ___ 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] Add optimization in swscale for LA.
On Tue, Apr 09, 2024 at 08:19:19PM +0800, Shiyou Yin wrote: > > > > 2024年3月27日 03:31,Michael Niedermayer 写道: > > > > On Tue, Mar 26, 2024 at 11:11:00AM +0800, Shiyou Yin wrote: > >> > >>> 2024年3月16日 11:03,Shiyou Yin 写道: > >>> > >>> [PATCH 1/3] swscale: [LA] Optimize range convert for yuvj420p. > >>> [PATCH 2/3] swscale: [LA] Optimize yuv2plane1_8_c. > >>> [PATCH 3/3] swscale: [LA] Optimize swscale funcs in input.c > >>> > >>> ___ > >>> 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”. > >> > >> Hi, Michale > >>Could you please help to review this patch set, thanks. > > > > I can apply it if it has been reviewed but i cannot review it currently > > > > thx > > > > Please help to apply this patch set, it has been tested and reviewed by my > colleague. will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "You are 36 times more likely to die in a bathtub than at the hands of a terrorist. Also, you are 2.5 times more likely to become a president and 2 times more likely to become an astronaut, than to die in a terrorist attack." -- Thoughty2 signature.asc Description: PGP signature ___ 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] ffmpeg: Add -copystreamid
On Thu, Apr 11, 2024 at 05:41:48PM +0200, Tomas Härdin wrote: > Hi > > Patch attached allows preserving PIDs when remuxing MPEG-TS. James > suggested we could generalize this to allow copying from specific > streams, but I think if we want to handle a more general case then it > would be better to handle streamid via metadata. > > Passes FATE. > > /Tomas > doc/ffmpeg.texi | 10 ++ > fftools/ffmpeg.h |1 + > fftools/ffmpeg_mux_init.c |4 > fftools/ffmpeg_opt.c |5 + > 4 files changed, 20 insertions(+) > a926f3ca3c894dfa1dc91d479d32278ab7863bfa 0001-ffmpeg-Add-copystreamid.patch > From 63b10983876077fd0e2b41c21a3c188b8557c602 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= > Date: Thu, 11 Apr 2024 16:52:33 +0200 > Subject: [PATCH] ffmpeg: Add -copystreamid > > This causes streamid's to be copied from all input streams to all output > streams. > Individual streams' streamid can still be set explicitly with -streamid. > --- > doc/ffmpeg.texi | 10 ++ > fftools/ffmpeg.h | 1 + > fftools/ffmpeg_mux_init.c | 4 > fftools/ffmpeg_opt.c | 5 + > 4 files changed, 20 insertions(+) rm doc/ffmpeg.pod doc/ffmpeg-all.1 ; make -j32 doc/ffmpeg-all.1 doc/ffmpeg.pod rm: cannot remove 'doc/ffmpeg-all.1': No such file or directory MAN doc/ffmpeg-all.1 POD doc/ffmpeg.pod @example ended by @end table at line 2502 doc/Makefile:88: recipe for target 'doc/ffmpeg.pod' failed make: *** [doc/ffmpeg.pod] Error 255 make: *** Waiting for unfinished jobs pod2man: unable to format doc/ffmpeg-all.pod doc/Makefile:98: recipe for target 'doc/ffmpeg-all.1' failed make: *** [doc/ffmpeg-all.1] Error 1 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 "Used only once"- "Some unspecified defect prevented a second use" "In good condition" - "Can be repaird by experienced expert" "As is" - "You wouldnt want it even if you were payed for it, if you knew ..." signature.asc Description: PGP signature ___ 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] [PATCHSET] AAC decoder refactor
On Thu, Apr 11, 2024 at 07:42:37AM +0200, Lynne wrote: > Apr 10, 2024, 23:57 by mich...@niedermayer.cc: > > > On Wed, Apr 10, 2024 at 08:18:11PM +0200, Michael Niedermayer wrote: > > > >> On Wed, Apr 10, 2024 at 06:48:26PM +0200, Lynne wrote: > >> > Apr 8, 2024, 09:36 by d...@lynne.ee: > >> > > >> > > The following patchset refactors the AAC decoder step by step, > >> > > removing all large-scale templating and abstracting away typed > >> > > DSP functions from symbol parsing. > >> > > > >> > > This series saves 110Kib of binary data from libavcodec.so > >> > > when compiled with Clang 18 with -O3, after stripping. > >> > > > >> > > The patchset can also be viewed here: > >> > > https://github.com/cyanreg/FFmpeg/tree/aac_cleanup > >> > > > >> > > Fate passes on each step, and I've been running this patchset for > >> > > a week with no issues. > >> > > > >> > > This also prepares the decoder for USAC support. > >> > > > >> > > >> > I've rebased the linked repo to current git master if anyone > >> > wants to test. > >> > >> thanks, i will try to test it > >> > > > > make fate-source > > > > TESTsource > > --- ./tests/ref/fate/source 2024-04-08 18:26:00.670129617 +0200 > > +++ tests/data/fate/source 2024-04-10 23:56:18.032896853 +0200 > > @@ -22,6 +22,13 @@ > > compat/djgpp/math.h > > compat/float/float.h > > compat/float/limits.h > > +libavcodec/aac/aacdec.h > > +libavcodec/aac/aacdec_fixed_coupling.h > > +libavcodec/aac/aacdec_fixed_dequant.h > > +libavcodec/aac/aacdec_fixed_prediction.h > > +libavcodec/aac/aacdec_float_coupling.h > > +libavcodec/aac/aacdec_float_prediction.h > > +libavcodec/aac/aacdec_latm.h > > libavcodec/bitstream_template.h > > tools/decode_simple.h > > Use of av_clip() where av_clip_uintp2() could be used: > > Test source failed. Look at tests/data/fate/source.err for details. > > tests/Makefile:310: recipe for target 'fate-source' failed > > make: *** [fate-source] Error 1 > > > > Thanks for testing. Fixed both issues in the repo. > Was only testing with fate-aac while developing. mips: make -k LD ffmpeg_g libavcodec/libavcodec.a(aacsbr.o): In function `ff_aac_sbr_ctx_alloc_init': aacsbr.c:(.text.unlikely+0x1d4): undefined reference to `ff_aacsbr_func_ptr_init_mips' aacsbr.c:(.text.unlikely+0x200): undefined reference to `ff_aacsbr_func_ptr_init_mips' libavcodec/libavcodec.a(sbrdsp.o): In function `ff_sbrdsp_init': sbrdsp.c:(.text.unlikely+0x10): undefined reference to `ff_sbrdsp_init_mips' sbrdsp.c:(.text.unlikely+0xb4): undefined reference to `ff_sbrdsp_init_mips' libavcodec/libavcodec.a(aacpsdsp_float.o): In function `ff_psdsp_init': aacpsdsp_float.c:(.text.unlikely+0x10): undefined reference to `ff_psdsp_init_mips' aacpsdsp_float.c:(.text.unlikely+0x6c): undefined reference to `ff_psdsp_init_mips' collect2: error: ld returned 1 exit status Makefile:136: recipe for target 'ffmpeg_g' failed make: *** [ffmpeg_g] Error 1 LD ffprobe_g libavcodec/libavcodec.a(aacsbr.o): In function `ff_aac_sbr_ctx_alloc_init': aacsbr.c:(.text.unlikely+0x1d4): undefined reference to `ff_aacsbr_func_ptr_init_mips' aacsbr.c:(.text.unlikely+0x200): undefined reference to `ff_aacsbr_func_ptr_init_mips' libavcodec/libavcodec.a(sbrdsp.o): In function `ff_sbrdsp_init': sbrdsp.c:(.text.unlikely+0x10): undefined reference to `ff_sbrdsp_init_mips' sbrdsp.c:(.text.unlikely+0xb4): undefined reference to `ff_sbrdsp_init_mips' libavcodec/libavcodec.a(aacpsdsp_float.o): In function `ff_psdsp_init': aacpsdsp_float.c:(.text.unlikely+0x10): undefined reference to `ff_psdsp_init_mips' aacpsdsp_float.c:(.text.unlikely+0x6c): undefined reference to `ff_psdsp_init_mips' collect2: error: ld returned 1 exit status Makefile:136: recipe for target 'ffprobe_g' failed make: *** [ffprobe_g] Error 1 make: Target 'all' not remade because of errors. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus signature.asc Description: PGP signature ___ 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] avcodec/libx264: bump minimum required version to 160
Hi, On Wed, Apr 10, 2024, 19:32 Michael Niedermayer wrote: > On Wed, Apr 10, 2024 at 03:47:48PM +0200, Niklas Haas wrote: > > On Wed, 10 Apr 2024 15:18:52 +0200 Michael Niedermayer < > mich...@niedermayer.cc> wrote: > > > On Tue, Apr 09, 2024 at 02:53:28PM +0200, Niklas Haas wrote: > > > > On Sat, 06 Apr 2024 22:28:26 +0200 Michael Niedermayer < > mich...@niedermayer.cc> wrote: > > > > > On Fri, Apr 05, 2024 at 07:44:52PM +0200, Niklas Haas wrote: > > > > > > From: Niklas Haas > > > > > > > > > > > > This version is four years old, and present in Debian oldstable, > Ubuntu > > > > > > 22.04 and Leap 15.1. > > > > > > > > > > Ubuntu 20.04 has general support till 2025-05-29 > > > > > Ubuntu 18.04 has security support (ESM) till 2028-04 > > > > > > > > I'll relax it from 160 back down to version 155 then. That covers > Ubuntu > > > > 20.04 and Debian oldoldstable. > > > > > > 18.04 has 152 > > > > > > libx264-dev/bionic,now 2:0.152.2854+gite9a5903-2 amd64 [installed] > > > > > > Ubuntu 18.04 still has security support in ESM and ubuntu pro IIUC > till 2028-04 > > > > Do you think FFmpeg 7.1 will be back-ported to Ubuntu 18.04 for security > > reasons? > > I would not expect that but i also didnt expect 7.0 would be backported > to 22.04 and 24.04 and it seems someone did unofficial backports > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Nations do behave wisely once they have exhausted all other alternatives. > -- Abba Eban > ___ > 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". > I think supporting anything earlier than 20.04 is obscene at this point. -- Sean McGovern > ___ 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".