[FFmpeg-devel] [PATCH] avcodec/libjxlenc: avoid failure when level 10 is required

2022-06-25 Thread Leo Izen
If a level 10 codestream is required, JxlEncoderSetBasicInfo will fail as it verifies the codestream level restrictions. However, there's no way for the library to provide the info on what codestream level is actually required until the BasicInfo struct is already set. Thus, we work around this pro

[FFmpeg-devel] [PATCH] avformat/matroskaenc: Fix use of uninitialized value

2022-06-25 Thread Andreas Rheinhardt
Regression since 67eea6cf026a70940ea402d54685d67c660b49cd. Affects only WebVTT when muxing WebM. (This is covered by the webm-webvtt-remux FATE test which fails for several FATE boxes on fate-ffmpeg.org.) Signed-off-by: Andreas Rheinhardt --- I tested with Valgrind before 67eea6cf026a70940ea402d5

Re: [FFmpeg-devel] 答复: [PATCH] avcodec/v4l2_m2m: close the invalid file descriptor -1 in function v4l2_m2m_destroy_context

2022-06-25 Thread Andriy Gelman
Hi, On Sat, 25. Jun 03:04, Wujian(Chin) wrote: > Hi: > Please review it. > Thks! > > -邮件原件- > 发件人: Wujian(Chin) > 发送时间: 2022年6月15日 19:15 > 收件人: 'ffmpeg-devel@ffmpeg.org' > 主题: [PATCH] avcodec/v4l2_m2m: close the invalid file descriptor -1 in > function v4l2_m2m_destroy_context Maybe t

[FFmpeg-devel] [PATCH] avformat/hlsenc: Add resend_headers option

2022-06-25 Thread huheng
Add pat and pmt table at start of each segment in single_file mode enhanced compatibility of hls stream. Because some hls clients separate parsing segment of hls stream, the absence of pat/pmt will cause parsing to fail. Signed-off-by: huheng --- libavformat/hlsenc.c | 5 + 1 file changed, 5

[FFmpeg-devel] [PATCH] libavformat/hlsenc.c resend headers when generate a new segment in single_file mode

2022-06-25 Thread huheng
Add pat and pmt table at start of each segment in single_file mode enhanced compatibility of hls stream Because some hls clients separate parsing segment of hls stream, the absence of pat/pmt will cause parsing to fail Signed-off-by: huheng --- libavformat/hlsenc.c | 5 + 1 file changed, 5

Re: [FFmpeg-devel] [PATCH v9 0/2] libjxl Colorspace fixes

2022-06-25 Thread Niklas Haas
On Fri, 24 Jun 2022 19:33:52 +0200 Niklas Haas wrote: > LGTM > > On Fri, 24 Jun 2022 12:50:54 -0400 Leo Izen wrote: > > Changes in v9: > > - Minor cosmetic changes, as requested by Anton K > > - More liberally commented casework, a.r.b. Haasn > > - Structured flow to be a bit more readable > >

Re: [FFmpeg-devel] [PATCH] avformat/hls:use EXT-X-START instead of live_start_index if it's in playlist

2022-06-25 Thread Li Kai
OK, I add the option description in doc/demuxers.texi. About invalid EXT-X-START value, it's not played on Safari. So I make it error to handle. You opinion, it's better way. The latest patch fix it. On 2022/6/25 21:26, Steven Liu wrote: > > >> 在 2022年6月25日,13:24,Li Kai 写道: >> >> Ok, I add al

Re: [FFmpeg-devel] [PATCH] avformat/hls:use EXT-X-START instead of live_start_index if it's in playlist

2022-06-25 Thread Steven Liu
> 在 2022年6月25日,13:24,Li Kai 写道: > > Ok, I add allowed_x_start option, and the option default is 0. So current What about use “prefer_x_start” for option name. BTW, add option descriptions into document doc/demuxers.texi +} else if (av_strstart(line, "#EXT-X-START:", &ptr)) { +

Re: [FFmpeg-devel] [PATCH v5 24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding

2022-06-25 Thread Andreas Rheinhardt
Soft Works: > > > > From: ffmpeg-devel on behalf of Andreas > Rheinhardt > Sent: Saturday, June 25, 2022 1:42 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v5 24/25] fftools/ffmpeg: Introduce > subtitle filtering and new frame-b

Re: [FFmpeg-devel] [PATCH v5 24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding

2022-06-25 Thread Soft Works
From: ffmpeg-devel on behalf of Andreas Rheinhardt Sent: Saturday, June 25, 2022 1:42 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v5 24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding Micha

Re: [FFmpeg-devel] [PATCH] avfilter/Makefile: always make colorspace.o

2022-06-25 Thread Gyan Doshi
Pushed as 0744c84792f78bc4de082ef8ca041f66852b506b On 2022-06-25 01:44 pm, Gyan Doshi wrote: On 2022-06-25 12:43 pm, Andreas Rheinhardt wrote: Gyan Doshi: On 2022-06-25 12:16 pm, Andreas Rheinhardt wrote: Gyan Doshi: Unbreaks libavfilter builds when configured with a subset of filters. d

Re: [FFmpeg-devel] [PATCH v5 24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding

2022-06-25 Thread Andreas Rheinhardt
Michael Niedermayer: > On Sat, Jun 25, 2022 at 09:57:56AM +, softworkz wrote: >> From: softworkz >> >> This commit actually enables subtitle filtering in ffmpeg by >> sending and receiving subtitle frames to and from a filtergraph. >> >> The heartbeat functionality from the previous sub2video

Re: [FFmpeg-devel] [PATCH v5 24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding

2022-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2022 at 09:57:56AM +, softworkz wrote: > From: softworkz > > This commit actually enables subtitle filtering in ffmpeg by > sending and receiving subtitle frames to and from a filtergraph. > > The heartbeat functionality from the previous sub2video implementation > is removed

[FFmpeg-devel] [PATCH v5 25/25] avcodec/dvbsubdec: Fix conditions for fallback to default resolution

2022-06-25 Thread softworkz
From: softworkz The previous code expected a segment of type CLUT definition to exist in order to accept a set of segments to be complete. This was an incorrect assumption as the presence of a CLUT segment is not mandatory. (version 1.6.1 of the spec is probably a bit more clear about this than e

[FFmpeg-devel] [PATCH v5 23/25] avcodec/subtitles: Migrate subtitle encoders to frame-based API

2022-06-25 Thread softworkz
From: softworkz and provide a compatibility shim for the legacy api Signed-off-by: softworkz --- libavcodec/assenc.c | 189 ++-- libavcodec/avcodec.h| 5 +- libavcodec/codec_internal.h | 12 --- libavcodec/dvbsubenc.c | 96 ++

[FFmpeg-devel] [PATCH v5 22/25] avfilter/snull, strim: Add snull and strim filters

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- configure| 2 +- libavfilter/Makefile | 2 ++ libavfilter/allfilters.c | 2 ++ libavfilter/sf_snull.c | 50 libavfilter/trim.c | 46 +++- 5 files

[FFmpeg-devel] [PATCH v5 21/25] avfilter/text2graphicsub: Added text2graphicsub subtitle filter

2022-06-25 Thread tcoza
From: tcoza Added a text2graphicsub subtitle filter which converts text-based subtitle tracks to bitmap-based subtitle tracks. The filter uses libass to render the subtitles. It takes as parameters an output height and width, as well as a number of colors in the output palette as well as sources

[FFmpeg-devel] [PATCH v5 20/25] avfilter/subfeed: add subtitle feed filter

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subfeed.c | 412 +++ 3 files changed, 414 insertions(+) create mode 100644 libavfilter/sf_subfeed.c diff --git a/libavfilter/Make

[FFmpeg-devel] [PATCH v5 19/25] avfilter/subscale: Add filter for scaling and/or re-arranging graphical subtitles

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 164 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 884 ++ 5 files changed, 1051 insertions

[FFmpeg-devel] [PATCH v5 18/25] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- configure|1 + doc/filters.texi | 55 ++ libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/sf_graphicsub2text.c | 1137 ++ 5 fil

[FFmpeg-devel] [PATCH v5 17/25] avfilter/splitcc: Add splitcc filter for closed caption handling

2022-06-25 Thread softworkz
From: softworkz - splitcc {V -> VS) Extract closed-caption (A53) data from video frames as subtitle Frames ffmpeg -y -loglevel verbose -i "https://streams.videolan.org/streams /ts/CC/NewsStream-608-ac3.ts" -filter_complex "[0:v]splitcc[vid1], textmod=mode=remove_chars:find='@',[vid1]overlay_

[FFmpeg-devel] [PATCH v5 16/25] avfilter/stripstyles: Add stripstyles filter

2022-06-25 Thread softworkz
From: softworkz - stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- doc/filters.texi | 37 ++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 237

[FFmpeg-devel] [PATCH v5 15/25] avfilter/textmod: Add textmod, censor and show_speaker filters

2022-06-25 Thread softworkz
From: softworkz - textmod {S -> S) Modify subtitle text in a number of ways - censor {S -> S) Censor subtitles using a word list - show_speaker {S -> S) Prepend speaker names from ASS subtitles to the visible text lines Signed-off-by: softworkz --- doc/filters.texi | 206 ++

[FFmpeg-devel] [PATCH v5 14/25] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2022-06-25 Thread softworkz
From: softworkz - overlaytextsubs {VS -> V) Overlay text subtitles onto a video stream. - textsubs2video {S -> V) Converts text subtitles to video frames Signed-off-by: softworkz --- configure| 2 + doc/filters.texi | 113 + libavfilter/Makefi

[FFmpeg-devel] [PATCH v5 13/25] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters

2022-06-25 Thread softworkz
From: softworkz - overlaygraphicsubs (VS -> V) Overlay graphic subtitles onto a video stream - graphicsub2video {S -> V) Converts graphic subtitles to video frames (with alpha) Gets auto-inserted for retaining compatibility with sub2video command lines Signed-off-by: softworkz --- doc

[FFmpeg-devel] [PATCH v5 09/25] avfilter/subtitles: Add subtitles.c for subtitle frame allocation

2022-06-25 Thread softworkz
From: softworkz Analog to avfilter/video.c and avfilter/audio.c Signed-off-by: softworkz --- libavfilter/Makefile| 1 + libavfilter/avfilter.c | 4 +++ libavfilter/internal.h | 1 + libavfilter/subtitles.c | 63 + libavfilter/subtitles.h | 44 ++

[FFmpeg-devel] [PATCH v5 12/25] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- configure| 2 +- libavfilter/allfilters.c | 2 ++ libavfilter/buffersink.c | 54 ++ libavfilter/buffersink.h | 7 libavfilter/buffersrc.c | 72 libavfilter/

[FFmpeg-devel] [PATCH v5 08/25] fftools/play, probe: Adjust for subtitle changes

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/ffplay.c | 102 +- fftools/ffprobe.c | 47 + 2 files changed, 77 insertions(+), 72 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 040afa0189..111e157979 1

[FFmpeg-devel] [PATCH v5 11/25] avfilter/avfilter: Fix hardcoded input index

2022-06-25 Thread softworkz
From: softworkz This fix targets (rare) cases where multiple input pads have a .filter_frame function. ff_request_frame_to_filter needs to call ff_request_frame with the correct input pad instead of the hardcoded first one. Signed-off-by: softworkz --- libavfilter/avfilter.c | 18 +

[FFmpeg-devel] [PATCH v5 07/25] avcodec/subtitles: Replace deprecated enum values

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavcodec/ass.h | 2 +- libavcodec/assdec.c| 2 +- libavcodec/dvbsubdec.c | 2 +- libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/pgssubdec.c | 2 +- libavcodec/xsubdec.c | 2 +- 7 files changed, 7 insertions(+),

[FFmpeg-devel] [PATCH v5 06/25] avcodec, avutil: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing

2022-06-25 Thread softworkz
From: softworkz Also add - hard_space callback (for upcoming fix) - extensible callback (for future extension) - new API which allows tag filtering Signed-off-by: softworkz --- libavcodec/Makefile | 56 +++--- libavcodec/ass.h | 151 +-- lib

[FFmpeg-devel] [PATCH v5 10/25] avfilter/avfilter: Handle subtitle frames

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavfilter/avfilter.c | 12 +--- libavfilter/avfilter.h | 11 +++ libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 16 libavfilter/formats.h | 3 +++ libavfilter/internal.h

[FFmpeg-devel] [PATCH v5 04/25] avcodec/libzvbi: set subtitle type

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavcodec/libzvbi-teletextdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c index 92466cc11e..2aab10a548 100644 --- a/libavcodec/libzvbi-teletextdec.c +++ b/libavcodec/li

[FFmpeg-devel] [PATCH v5 05/25] avfilter/subtitles: Update vf_subtitles to use new decoding api

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavfilter/vf_subtitles.c | 67 ++ 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 82e140e986..0ae156ad07 100644 --- a/libavfilter/vf_s

[FFmpeg-devel] [PATCH v5 03/25] avcodec/subtitles: Introduce new frame-based subtitle decoding API

2022-06-25 Thread softworkz
From: softworkz - Modify avcodec_send_packet() to support subtitles via the regular frame based decoding API - Add decode_subtitle_shim() which takes subtitle frames, and serves as a compatibility shim to the legacy subtitle decoding API until all subtitle decoders are migrated to the frame

[FFmpeg-devel] [PATCH v5 02/25] avutil/frame: Prepare AVFrame for subtitle handling

2022-06-25 Thread softworkz
From: softworkz Root commit for adding subtitle filtering capabilities. In detail: - Add type (AVMediaType) field to AVFrame Replaces previous way of distinction which was based on checking width and height to determine whether a frame is audio or video - Add subtitle fields to AVFrame - Add

[FFmpeg-devel] [PATCH v5 00/25] Subtitle Filtering 2022

2022-06-25 Thread ffmpegagent
Subtitle Filtering 2022 === This is a substantial update to the earlier subtitle filtering patch series. A primary goal has been to address others' concerns as much as possible on one side and to provide more clarity and control over the way things are working. Clarity is is s

[FFmpeg-devel] [PATCH v5 01/25] avcodec, avutil: Move enum AVSubtitleType to avutil, add new and deprecate old values

2022-06-25 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavcodec/avcodec.h | 19 + libavutil/Makefile | 1 + libavutil/subfmt.h | 68 libavutil/version.h | 1 + 4 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 libavuti

[FFmpeg-devel] [PATCH v2 2/2] ffmpeg: add option -isync

2022-06-25 Thread Gyan Doshi
This is a per-file input option that adjusts an input's timestamps with reference to another input, so that emitted packet timestamps account for the difference between the start times of the two inputs. Typical use case is to sync two or more live inputs such as from capture devices. Both the tar

[FFmpeg-devel] [PATCH v2 1/2] avformat: add AVFormatContext.first_pkt_wallclock

2022-06-25 Thread Gyan Doshi
Stores wallclock time for the first packet received. Used for crude sync offset among inputs. --- doc/APIchanges | 3 +++ libavformat/avformat.h | 10 ++ libavformat/demux.c| 3 +++ libavformat/options.c | 1 + libavformat/version.h | 2 +- 5 files changed, 18 insertions(

Re: [FFmpeg-devel] [PATCH] avfilter/Makefile: always make colorspace.o

2022-06-25 Thread Gyan Doshi
On 2022-06-25 12:43 pm, Andreas Rheinhardt wrote: Gyan Doshi: On 2022-06-25 12:16 pm, Andreas Rheinhardt wrote: Gyan Doshi: Unbreaks libavfilter builds when configured with a subset of filters. drawutils added ff_draw_init2 in 6c3a82f043 which calls functions defined in colorspace.c. So t

[FFmpeg-devel] [PATCH v2 2/2] ffmpeg: add option -isync

2022-06-25 Thread Gyan Doshi
This is a per-file input option that adjusts an input's timestamps with reference to another input, so that emitted packet timestamps account for the difference between the start times of the two inputs. Typical use case is to sync two or more live inputs such as from capture devices. Both the tar

[FFmpeg-devel] [PATCH v2 1/2] avformat: add AVFormatContext.first_pkt_wallclock

2022-06-25 Thread Gyan Doshi
Stores wallclock time for the first packet received. Used for crude sync offset among inputs. --- doc/APIchanges | 3 +++ libavformat/avformat.h | 10 ++ libavformat/demux.c| 3 +++ libavformat/options.c | 1 + libavformat/version.h | 2 +- 5 files changed, 18 insertions(

Re: [FFmpeg-devel] [PATCH 3/4] lavc/bitstream: templatize for BE/LE

2022-06-25 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Anton Khirnov: >> Allows using both BE and LE bitstream readers in the same file. >> --- >> libavcodec/bitstream.h | 379 ++ >> libavcodec/bitstream_template.h | 392 >> tests/ref/fate/source |

Re: [FFmpeg-devel] [PATCH] avfilter/Makefile: always make colorspace.o

2022-06-25 Thread Andreas Rheinhardt
Gyan Doshi: > > > On 2022-06-25 12:16 pm, Andreas Rheinhardt wrote: >> Gyan Doshi: >>> Unbreaks libavfilter builds when configured with a subset of filters. >>> >>> drawutils added ff_draw_init2 in 6c3a82f043 which calls functions >>> defined in >>> colorspace.c. So the latter needs to be built a