Re: [FFmpeg-devel] [PATCH] lavfi: add colorlevels filter
On 12/11/14, Lou Logan l...@lrcd.com wrote: Nice. A user was asking for this recently (can't remember where). On Wed, 10 Dec 2014 14:26:51 +, Paul B Mahol wrote: Signed-off-by: Paul B Mahol one...@gmail.com --- doc/filters.texi | 41 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_colorlevels.c | 254 +++ 4 files changed, 297 insertions(+) create mode 100644 libavfilter/vf_colorlevels.c diff --git a/doc/filters.texi b/doc/filters.texi index 0ea3955..444dfda 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2934,6 +2934,47 @@ colorbalance=rs=.3 @end example @end itemize +@section colorlevels + +Adjust video input frames using levels. + +The filter accepts the following options: + +@table @option +@item rimim rimin Fixed. +@item gimin +@item bimin +@item aimin +Adjust red, green, blue and alpha input black point. +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{0}. How about a master point to control RGB all at once in case each value is the same for each component? It can be added later. +@item rimax +@item gimax +@item bimax +@item aimax +Adjust red, green, blue and alpha input white point. +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{1}. + +Input levels are used to lighten highlights (bright tones), darken shadows +(dark tones), change the balance of bright and dark tones. + +@item romim romin Fixed. +@item gomin +@item bomin +@item aomin +Adjust red, green, blue and alpha output black point. +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{0}. + +@item romax +@item gomax +@item bomax +@item aomax +Adjust red, green, blue and alpha output white point. +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{1}. + +Output levels allows manual selection of a constrained output level range. +@end table + I'd like to see an example or two in the docs. I added 3 examples from you. Perhaps this filter could implement 'presets' and 'psfile' options for Photoshop levels preset files such as in curves filter. Attached is an example ALV file. The preset could be added later. I could not decipher attached ALV file. Here are some of the PS presets and their values. Darker: rimin=0.0588235294:gimin=0.0588235294:bimin=0.0588235294 Increase Contrast 1: rimin=0.0392156863:gimin=0.0392156863:bimin=0.0392156863:rimax=0.9607843137:gimax=0.9607843137:bimax=0.9607843137 Increase Contrast 2: rimin=0.0784313725:gimin=0.0784313725:bimin=0.0784313725:rimax=0.9215686275:gimax=0.9215686275:bimax=0.9215686275 Increase Contrast 3: rimin=0.1176470588:gimin=0.1176470588:bimin=0.1176470588:rimax=0.8823529412:gimax=0.8823529412:bimax=0.8823529412 Lighter: rimax=0.9019607843:gimax=0.9019607843:bimax=0.9019607843 I didn't figure out Lighten Shadows, Midtones Brighter, and Midtones Darker. Maybe I'll look again later. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add colorlevels filter
On Wed, Dec 10, 2014 at 02:26:51PM +, Paul B Mahol wrote: Signed-off-by: Paul B Mahol one...@gmail.com --- doc/filters.texi | 41 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_colorlevels.c | 254 +++ 4 files changed, 297 insertions(+) create mode 100644 libavfilter/vf_colorlevels.c diff --git a/doc/filters.texi b/doc/filters.texi index 0ea3955..444dfda 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2934,6 +2934,47 @@ colorbalance=rs=.3 @end example @end itemize +@section colorlevels + +Adjust video input frames using levels. + +The filter accepts the following options: + +@table @option +@item rimim +@item gimin +@item bimin +@item aimin +Adjust red, green, blue and alpha input black point. +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{0}. + +@item rimax +@item gimax +@item bimax +@item aimax +Adjust red, green, blue and alpha input white point. +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{1}. + +Input levels are used to lighten highlights (bright tones), darken shadows +(dark tones), change the balance of bright and dark tones. + +@item romim +@item gomin +@item bomin +@item aomin +Adjust red, green, blue and alpha output black point. +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{0}. + +@item romax +@item gomax +@item bomax +@item aomax +Adjust red, green, blue and alpha output white point. +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{1}. + +Output levels allows manual selection of a constrained output level range. +@end table + One of the most common usage for the color levels is to have an automatic adjustment of the range on the luma level. Typically, doing this: https://lut.im/OiNweWNU/MraUtDBe using a threshold on both side. Maybe you want to add such feature later thought. [...] -- Clément B. pgptqHzztHO71.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add colorlevels filter
On Thu, Dec 11, 2014 at 11:41:42AM +0100, Clément Bœsch wrote: On Wed, Dec 10, 2014 at 02:26:51PM +, Paul B Mahol wrote: Signed-off-by: Paul B Mahol one...@gmail.com --- doc/filters.texi | 41 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_colorlevels.c | 254 +++ 4 files changed, 297 insertions(+) create mode 100644 libavfilter/vf_colorlevels.c diff --git a/doc/filters.texi b/doc/filters.texi index 0ea3955..444dfda 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2934,6 +2934,47 @@ colorbalance=rs=.3 @end example @end itemize +@section colorlevels + +Adjust video input frames using levels. + +The filter accepts the following options: + +@table @option +@item rimim +@item gimin +@item bimin +@item aimin +Adjust red, green, blue and alpha input black point. +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{0}. + +@item rimax +@item gimax +@item bimax +@item aimax +Adjust red, green, blue and alpha input white point. +Allowed ranges for options are @code{[-1.0, 1.0]}. Defaults are @code{1}. + +Input levels are used to lighten highlights (bright tones), darken shadows +(dark tones), change the balance of bright and dark tones. + +@item romim +@item gomin +@item bomin +@item aomin +Adjust red, green, blue and alpha output black point. +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{0}. + +@item romax +@item gomax +@item bomax +@item aomax +Adjust red, green, blue and alpha output white point. +Allowed ranges for options are @code{[0, 1.0]}. Defaults are @code{1}. + +Output levels allows manual selection of a constrained output level range. +@end table + One of the most common usage for the color levels is to have an automatic adjustment of the range on the luma level. Typically, doing this: https://lut.im/OiNweWNU/MraUtDBe using a threshold on both side. Maybe you want to add such feature later thought. btw, libpostproc supports auto levels, -vf pp=al [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: USPP filter
On date Wednesday 2014-12-10 23:31:56 +0530, arwa arif encoded: Updated the patch. From 4683bd42a8148ec23c47de748adcf705c7aa9415 Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Sun, 7 Dec 2014 18:56:46 +0530 Subject: [PATCH] lavfi: USPP Filter --- doc/filters.texi | 25 +++ libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_uspp.c| 491 ++ 4 files changed, 518 insertions(+) create mode 100644 libavfilter/vf_uspp.c missing dependencies in configure diff --git a/doc/filters.texi b/doc/filters.texi index 8c16c7a..09051da 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8804,6 +8804,31 @@ unsharp=7:7:-2:7:7:-2 @end example @end itemize +@section uspp + +Apply ultra slow/simple postprocessing filter that compresses and decompresses +the image at several (or - in the case of @option{quality} level @code{8} - all) +shifts and average the results. + +The way this differs from the behavior of spp is that uspp actually encodes +decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8 +DCT similar to MJPEG. + +The filter accepts the following options: + +@table @option +@item quality +Set quality. This option defines the number of levels for averaging. It accepts +an integer in the range 0-8. If set to @code{0}, the filter will have no +effect. A value of @code{8} means the higher quality. For each increment of +that value the speed drops by a factor of approximately 2. Default value is +@code{3}. + +@item qp +Force a constant quantization parameter. If not set, the filter will use the QP +from the video stream (if available). +@end table + @anchor{vidstabdetect} @section vidstabdetect diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 2c56e38..62940fe 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -193,6 +193,7 @@ OBJS-$(CONFIG_TINTERLACE_FILTER) += vf_tinterlace.o OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o OBJS-$(CONFIG_TRIM_FILTER) += trim.o OBJS-$(CONFIG_UNSHARP_FILTER)+= vf_unsharp.o +OBJS-$(CONFIG_USPP_FILTER) += vf_uspp.o OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o vf_vidstabdetect.o OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o vf_vidstabtransform.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 2352d44..adb86be 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -208,6 +208,7 @@ void avfilter_register_all(void) REGISTER_FILTER(TRANSPOSE, transpose, vf); REGISTER_FILTER(TRIM, trim, vf); REGISTER_FILTER(UNSHARP,unsharp,vf); +REGISTER_FILTER(USPP, uspp, vf); REGISTER_FILTER(VFLIP, vflip, vf); REGISTER_FILTER(VIDSTABDETECT, vidstabdetect, vf); REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf); diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c new file mode 100644 index 000..7819983 --- /dev/null +++ b/libavfilter/vf_uspp.c @@ -0,0 +1,491 @@ +/* + * Copyright (c) 2003 Michael Niedermayer michae...@gmx.at + * Copyright (c) 2014 Arwa Arif arwaarif1...@gmail.com + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * @file + * Ultra Slow/Simple Post-processing filter. + * + * Originally written by Michael Niedermayer for the MPlayer project, and + * ported by Arwa Arif for FFmpeg. + */ + +#include libavutil/avassert.h +#include libavutil/imgutils.h +#include libavutil/opt.h +#include libavutil/pixdesc.h +#include internal.h +#include libavcodec/avcodec.h +#include avfilter.h + +#define MAX_LEVEL 8 /* quality levels */ +#define BLOCK 16 + +typedef struct { +const AVClass *av_class; +int log2_count; +int qp; +int qscale_type; +int temp_stride[3]; +uint8_t *src[3]; +int16_t *temp[3]; +int outbuf_size; +uint8_t *outbuf; +AVCodecContext *avctx_enc[BLOCK*BLOCK]; +AVFrame
Re: [FFmpeg-devel] [PATCH] lavfi: USPP filter
I checked the ouput with quality 8, I am getting a broken output. From 65260f8414082340b67ef0667602c53c24ff23e4 Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Sun, 7 Dec 2014 18:56:46 +0530 Subject: [PATCH] lavfi: USPP Filter --- configure|1 + doc/filters.texi | 25 +++ libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_uspp.c| 490 ++ 5 files changed, 518 insertions(+) create mode 100644 libavfilter/vf_uspp.c diff --git a/configure b/configure index c046e34..e37285a 100755 --- a/configure +++ b/configure @@ -2614,6 +2614,7 @@ vidstabtransform_filter_deps=libvidstab pixfmts_super2xsai_test_deps=super2xsai_filter tinterlace_merge_test_deps=tinterlace_filter tinterlace_pad_test_deps=tinterlace_filter +uspp_filter_deps=gpl avcodec zmq_filter_deps=libzmq zoompan_filter_deps=swscale diff --git a/doc/filters.texi b/doc/filters.texi index 8c16c7a..09051da 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8804,6 +8804,31 @@ unsharp=7:7:-2:7:7:-2 @end example @end itemize +@section uspp + +Apply ultra slow/simple postprocessing filter that compresses and decompresses +the image at several (or - in the case of @option{quality} level @code{8} - all) +shifts and average the results. + +The way this differs from the behavior of spp is that uspp actually encodes +decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8 +DCT similar to MJPEG. + +The filter accepts the following options: + +@table @option +@item quality +Set quality. This option defines the number of levels for averaging. It accepts +an integer in the range 0-8. If set to @code{0}, the filter will have no +effect. A value of @code{8} means the higher quality. For each increment of +that value the speed drops by a factor of approximately 2. Default value is +@code{3}. + +@item qp +Force a constant quantization parameter. If not set, the filter will use the QP +from the video stream (if available). +@end table + @anchor{vidstabdetect} @section vidstabdetect diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 2c56e38..62940fe 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -193,6 +193,7 @@ OBJS-$(CONFIG_TINTERLACE_FILTER) += vf_tinterlace.o OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o OBJS-$(CONFIG_TRIM_FILTER) += trim.o OBJS-$(CONFIG_UNSHARP_FILTER)+= vf_unsharp.o +OBJS-$(CONFIG_USPP_FILTER) += vf_uspp.o OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o vf_vidstabdetect.o OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o vf_vidstabtransform.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 2352d44..adb86be 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -208,6 +208,7 @@ void avfilter_register_all(void) REGISTER_FILTER(TRANSPOSE, transpose, vf); REGISTER_FILTER(TRIM, trim, vf); REGISTER_FILTER(UNSHARP,unsharp,vf); +REGISTER_FILTER(USPP, uspp, vf); REGISTER_FILTER(VFLIP, vflip, vf); REGISTER_FILTER(VIDSTABDETECT, vidstabdetect, vf); REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf); diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c new file mode 100644 index 000..c96df42 --- /dev/null +++ b/libavfilter/vf_uspp.c @@ -0,0 +1,490 @@ +/* + * Copyright (c) 2003 Michael Niedermayer michae...@gmx.at + * Copyright (c) 2014 Arwa Arif arwaarif1...@gmail.com + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * @file + * Ultra Slow/Simple Post-processing filter. + * + * Originally written by Michael Niedermayer for the MPlayer project, and + * ported by Arwa Arif for FFmpeg. + */ + +#include libavutil/avassert.h +#include libavutil/imgutils.h +#include libavutil/opt.h +#include libavutil/pixdesc.h +#include internal.h +#include libavcodec/avcodec.h +#include avfilter.h + +#define MAX_LEVEL 8 /* quality levels */ +#define BLOCK 16 + +typedef struct { +const AVClass *av_class; +int log2_count;
[FFmpeg-devel] [PATCH] avcodec/libutvideoenc: fix leak of info array on error
Fixes CID1257657 Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libutvideoenc.cpp |1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libutvideoenc.cpp b/libavcodec/libutvideoenc.cpp index 3298e64..3deb1c7 100644 --- a/libavcodec/libutvideoenc.cpp +++ b/libavcodec/libutvideoenc.cpp @@ -100,6 +100,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) if (utv-buffer == NULL) { av_log(avctx, AV_LOG_ERROR, Could not allocate output buffer.\n); +av_free(info); return AVERROR(ENOMEM); } -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/libutvideoenc: Check avpicture_get_size() return code
On 12/11/2014 1:09 PM, Michael Niedermayer wrote: Fixes CID1257656 Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libutvideoenc.cpp |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) OK. Though I still prefer this file is just removed. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/libutvideoenc: Check avpicture_get_size() return code
On Thu, Dec 11, 2014 at 03:53:02PM +, Derek Buitenhuis wrote: On 12/11/2014 1:09 PM, Michael Niedermayer wrote: Fixes CID1257656 Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libutvideoenc.cpp |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) OK. applied thanks Though I still prefer this file is just removed. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/libutvideoenc: fix leak of info array on error
On Thu, Dec 11, 2014 at 03:54:26PM +, Derek Buitenhuis wrote: On 12/11/2014 2:52 PM, Michael Niedermayer wrote: Fixes CID1257657 Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libutvideoenc.cpp |1 + 1 file changed, 1 insertion(+) OK. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/hlsenc: added HLS encryption
Added HLS encryption with -hls_key_info_file key_info_file option. The first line of key_info_file specifies the key URI for the playlist, and the second line specifies the path to the file containing the encryption key. Changes to key_info_file will be reflected in segment encryption along with an entry in the playlist for the new key URI. Also added -hls_flags random_iv option flag to use a random IV for encryption instead of the segment number. Signed-off-by: Christian Suloway csulo...@globaleagleent.com --- doc/muxers.texi | 11 +++ libavformat/hlsenc.c | 257 +-- 2 files changed, 262 insertions(+), 6 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index a1264d2..29a5de3 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -263,6 +263,13 @@ ffmpeg in.nut -hls_segment_filename 'file%03d.ts' out.m3u8 This example will produce the playlist, @file{out.m3u8}, and segment files: @file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc. +@item hls_key_info_file @var{file} +Use in the information in @var{file} for segment encryption. The first line of +@var{file} specifies the key URI for the playlist. The second line specifies +the path to the file containing the encryption key as a single packed array of +16 octets in binary format. Changes to @var{file} will result in segment +encryption with the new key and an entry in the playlist for the new key URI. + @item hls_flags single_file If this flag is set, the muxer will store all segments in a single MPEG-TS file, and will use byte ranges in the playlist. HLS playlists generated with @@ -277,6 +284,10 @@ Will produce the playlist, @file{out.m3u8}, and a single segment file, @item hls_flags delete_segments Segment files removed from the playlist are deleted after a period of time equal to the duration of the segment plus the duration of the playlist. + +@item hls_flags random_iv +Segment file encryption will use a random initialization vector (IV) instead of +the segment number. @end table @anchor{ico} diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 79f3a23..5bde70e 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -32,17 +32,24 @@ #include libavutil/avstring.h #include libavutil/opt.h #include libavutil/log.h +#include libavutil/lfg.h +#include libavutil/random_seed.h #include avformat.h #include internal.h #include os_support.h +#define BLOCKSIZE 16 + typedef struct HLSSegment { char filename[1024]; double duration; /* in seconds */ int64_t pos; int64_t size; +char *key_uri; +char *iv_string; + struct HLSSegment *next; } HLSSegment; @@ -50,6 +57,7 @@ typedef enum HLSFlags { // Generate a single media file and use byte ranges in the playlist. HLS_SINGLE_FILE = (1 0), HLS_DELETE_SEGMENTS = (1 1), +HLS_RANDOM_IV = (1 2), } HLSFlags; typedef struct HLSContext { @@ -86,9 +94,23 @@ typedef struct HLSContext { char *format_options_str; AVDictionary *format_options; +char *key_info_file; +char *key_file; +char *key_uri; +char *key_string; +char *iv_string; +AVLFG *lfg; + AVIOContext *pb; } HLSContext; +static void hls_free_segment(HLSSegment *en) +{ + av_freep(en-key_uri); + av_freep(en-iv_string); + av_freep(en); +} + static int hls_delete_old_segments(HLSContext *hls) { HLSSegment *segment, *previous_segment = NULL; @@ -145,7 +167,7 @@ static int hls_delete_old_segments(HLSContext *hls) { av_free(path); previous_segment = segment; segment = previous_segment-next; -av_free(previous_segment); +hls_free_segment(previous_segment); } fail: @@ -154,6 +176,157 @@ fail: return ret; } +static int hls_encryption_init(AVFormatContext *s) +{ +HLSContext *hls = s-priv_data; + +if (hls-flags HLS_RANDOM_IV) { +hls-lfg = av_malloc(sizeof(AVLFG)); +if (!hls-lfg) +return AVERROR(ENOMEM); +av_lfg_init(hls-lfg, av_get_random_seed()); +} + +return 0; +} + +static int hls_encryption_start(HLSContext *hls) +{ + +int ret = 0, i, j, rotate_iv = 0; +AVIOContext *pb = NULL; +AVIOContext *dyn_buf = NULL; +uint8_t buf[1024], *tmp = NULL, *key = NULL, *iv = NULL; +char *p, *tstr, *saveptr = NULL, *key_string = NULL; +unsigned int u; + +if ((ret = avio_open(pb, hls-key_info_file, AVIO_FLAG_READ)) 0) { +av_log(hls, AV_LOG_ERROR, error opening key info file %s\n, + hls-key_info_file); +goto fail; +} + +ret = avio_open_dyn_buf(dyn_buf); +if (ret 0) { +avio_closep(pb); +goto fail; +} + +while ((ret = avio_read(pb, buf, sizeof(buf))) 0) +avio_write(dyn_buf, buf, ret); +avio_closep(pb); +if (ret != AVERROR_EOF ret 0) { +avio_close_dyn_buf(dyn_buf, tmp); +goto fail; +} + +avio_w8(dyn_buf,
[FFmpeg-devel] [PATCH] doc: add FFREPORT example
And fix a few nits. Signed-off-by: Lou Logan l...@lrcd.com --- doc/fftools-common-opts.texi | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index 54d1888..7d52c1a 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -204,21 +204,29 @@ directory. This file can be useful for bug reports. It also implies @code{-loglevel verbose}. -Setting the environment variable @code{FFREPORT} to any value has the +Setting the environment variable @env{FFREPORT} to any value has the same effect. If the value is a ':'-separated key=value sequence, these -options will affect the report; options values must be escaped if they +options will affect the report; option values must be escaped if they contain special characters or the options delimiter ':' (see the -``Quoting and escaping'' section in the ffmpeg-utils manual). The -following option is recognized: +``Quoting and escaping'' section in the ffmpeg-utils manual). + +The following options are recognized: @table @option @item file set the file name to use for the report; @code{%p} is expanded to the name of the program, @code{%t} is expanded to a timestamp, @code{%%} is expanded to a plain @code{%} @item level -set the log level +set the log verbosity level using a numerical value (see @code{-loglevel}). @end table +For example, to output a report to a file named @file{ffreport.log} +using a log level of @code{32} (alias for log level @code{info}): + +@example +FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output +@end example + Errors in parsing the environment variable are not fatal, and will not appear in the report. -- 2.1.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/mov: Disable XMP metadata by default
On Thu, Dec 11, 2014 at 01:22:28AM +, Vittorio Giovara wrote: On Tue, Dec 9, 2014 at 10:15 PM, wm4 nfx...@googlemail.com wrote: On Tue, 9 Dec 2014 21:33:41 +0100 Reimar Döffinger reimar.doeffin...@gmx.de wrote: On Tue, Dec 09, 2014 at 12:59:24PM +, Vittorio Giovara wrote: On Tue, Dec 9, 2014 at 8:04 AM, wm4 nfx...@googlemail.com wrote: On Tue, 9 Dec 2014 02:57:01 +0100 Michael Niedermayer michae...@gmx.at wrote: It seems very wrong to export this info optionally just because ffmpeg.c is too stupid to handle it correctly. Not exporting saves a little bit of memory too, since you have to allocate the space where to export this metadata to too. We're often talking about more than hundreds of megabytes. WTF, 100 MBs of XML? In media files? Yep, it's not uncommon that xmp contains the all the save states of the project files (eg the list of undo action), imports, outputs proxies and other stuff. It gets to ridiculous dimensions pretty quickly. From that aspect it might make more sense to have a generic option to not export metadata larger than a certain size for example. Or some other system. Until now, the method for exporting large metadata-like blobs was adding new streams. E.g. picture attachments and fonts. That would be neat. Until then, can we have this patch committed? applied i hope this is what most prefer [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: USPP filter
On Thu, Dec 11, 2014 at 06:59:21PM +0530, arwa arif wrote: I checked the ouput with quality 8, I am getting a broken output. configure|1 doc/filters.texi | 25 ++ libavfilter/Makefile |1 libavfilter/allfilters.c |1 libavfilter/vf_uspp.c| 490 +++ 5 files changed, 518 insertions(+) 1f610e84c08438ed67bce91c097e42f13bb0b9cc 0001-lavfi-USPP-Filter.patch From 65260f8414082340b67ef0667602c53c24ff23e4 Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Sun, 7 Dec 2014 18:56:46 +0530 Subject: [PATCH] lavfi: USPP Filter --- configure|1 + doc/filters.texi | 25 +++ libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_uspp.c| 490 ++ 5 files changed, 518 insertions(+) create mode 100644 libavfilter/vf_uspp.c patch applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat: add dump_metadata_lines
On Thu, Dec 11, 2014 at 01:18:21AM +, Vittorio Giovara wrote: On Wed, Dec 10, 2014 at 1:23 PM, wm4 nfx...@googlemail.com wrote: On Wed, 10 Dec 2014 03:38:03 +0100 Lukasz Marek lukasz.m.lu...@gmail.com wrote: W dniu środa, 10 grudnia 2014 Vittorio Giovara vittorio.giov...@gmail.com napisał(a): On Tue, Dec 9, 2014 at 10:17 PM, wm4 nfx...@googlemail.com javascript:; wrote: On Tue, 9 Dec 2014 14:10:22 +0100 Michael Niedermayer michae...@gmx.at javascript:; wrote: TODO: bump version, update APIChanges Signed-off-by: Michael Niedermayer michae...@gmx.at javascript:; --- libavformat/avformat.h |8 libavformat/dump.c | 24 ++-- libavformat/options_table.h |1 + 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 2e54ed1..cbe3608 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1616,6 +1616,14 @@ typedef struct AVFormatContext { */ char *format_whitelist; +/** + * Maximum number of lines per metadata tag to dump with av_log. + * -1 means default + * - encoding: unused + * - decoding: set by user through AVOptions (NO direct access) + */ +int dump_metadata_lines; + /* * All fields below this line are not part of the public API. They * may not be used outside of libavformat and can be changed and diff --git a/libavformat/dump.c b/libavformat/dump.c index 56b37ff..38286b8 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -126,7 +126,7 @@ static void print_fps(double d, const char *postfix) av_log(NULL, AV_LOG_INFO, %1.0fk %s, d / 1000, postfix); } -static void dump_metadata(void *ctx, AVDictionary *m, const char *indent) +static void dump_metadata(void *ctx, AVDictionary *m, const char *indent, int dump_metadata_lines_arg) { if (m !(av_dict_count(m) == 1 av_dict_get(m, language, NULL, 0))) { AVDictionaryEntry *tag = NULL; @@ -135,16 +135,28 @@ static void dump_metadata(void *ctx, AVDictionary *m, const char *indent) while ((tag = av_dict_get(m, , tag, AV_DICT_IGNORE_SUFFIX))) if (strcmp(language, tag-key)) { const char *p = tag-value; +int lines = 0; +int dump_metadata_lines = dump_metadata_lines_arg; +if (dump_metadata_lines == -1) { +dump_metadata_lines = strcmp(comment, tag-key) ? 1 : 25; +} av_log(ctx, AV_LOG_INFO, %s %-16s: , indent, tag-key); while (*p) { char tmp[256]; size_t len = strcspn(p, \x8\xa\xb\xc\xd); +if (lines = dump_metadata_lines) { +av_log(ctx, AV_LOG_INFO, [%SIZE_SPECIFIER bytes ommited, use \'-dump_metadata_lines max\' to see more], strlen(p)); +break; +} av_strlcpy(tmp, p, FFMIN(sizeof(tmp), len+1)); av_log(ctx, AV_LOG_INFO, %s, tmp); p += len; if (*p == 0xd) av_log(ctx, AV_LOG_INFO, ); -if (*p == 0xa) av_log(ctx, AV_LOG_INFO, \n%s %-16s: , indent, ); +if (*p == 0xa) { +av_log(ctx, AV_LOG_INFO, \n%s %-16s: , indent, ); +lines++; +} if (*p) p++; } av_log(ctx, AV_LOG_INFO, \n); @@ -420,7 +432,7 @@ static void dump_stream_format(AVFormatContext *ic, int i, av_log(NULL, AV_LOG_INFO, (clean effects)); av_log(NULL, AV_LOG_INFO, \n); -dump_metadata(NULL, st-metadata, ); +dump_metadata(NULL, st-metadata, , ic-dump_metadata_lines); dump_sidedata(NULL, st, ); } @@ -438,7 +450,7 @@ void av_dump_format(AVFormatContext *ic, int index, index, is_output ? ic-oformat-name : ic-iformat-name, is_output ? to : from, url); -dump_metadata(NULL, ic-metadata, ); +dump_metadata(NULL, ic-metadata, , ic-dump_metadata_lines); if (!is_output) { av_log(NULL, AV_LOG_INFO, Duration: ); @@ -480,7 +492,7 @@ void av_dump_format(AVFormatContext *ic, int index, av_log(NULL, AV_LOG_INFO, end %f\n, ch-end * av_q2d(ch-time_base)); -dump_metadata(NULL, ch-metadata, );
Re: [FFmpeg-devel] [PATCH] lavfi: USPP filter
arwa arif arwaarif1994 at gmail.com writes: I checked the ouput with quality 8, I am getting a broken output. Yes, that's ticket #3596. Congratulation for porting the filter, will you do fspp next? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: USPP filter
Since, fspp is written in assembly language also, I am not very sure if I will be able to do it. From e1168f18aac0d97c7c0a3a55c397f8f2313a0de0 Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Fri, 12 Dec 2014 11:14:26 +0530 Subject: [PATCH] Delete mp=uspp --- doc/filters.texi |1 - libavfilter/Makefile |1 - libavfilter/libmpcodecs/vf_uspp.c | 394 - 3 files changed, 396 deletions(-) delete mode 100644 libavfilter/libmpcodecs/vf_uspp.c diff --git a/doc/filters.texi b/doc/filters.texi index 09051da..882caa0 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6120,7 +6120,6 @@ The list of the currently supported filters follows: @item ilpack @item pp7 @item softpulldown -@item uspp @end table The parameter syntax and behavior for the listed filters are the same diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 62940fe..6b7291e 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -227,7 +227,6 @@ OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_fspp.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_ilpack.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_pp7.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_softpulldown.o -OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_uspp.o # multimedia filters OBJS-$(CONFIG_AVECTORSCOPE_FILTER) += avf_avectorscope.o diff --git a/libavfilter/libmpcodecs/vf_uspp.c b/libavfilter/libmpcodecs/vf_uspp.c deleted file mode 100644 index fb4329d..000 --- a/libavfilter/libmpcodecs/vf_uspp.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Copyright (C) 2005 Michael Niedermayer michae...@gmx.at - * - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include stdio.h -#include stdlib.h -#include string.h -#include inttypes.h -#include math.h -#include assert.h - -#include config.h - -#include mp_msg.h -#include cpudetect.h - -#include libavutil/mem.h -#include libavcodec/avcodec.h - -#include img_format.h -#include mp_image.h -#include vf.h -#include av_helpers.h -#include libvo/fastmemcpy.h - -#define XMIN(a,b) ((a) (b) ? (a) : (b)) - -#define BLOCK 16 - -//===// -DECLARE_ALIGNED(8, static const uint8_t, dither)[8][8] = { -{ 0*4, 48*4, 12*4, 60*4, 3*4, 51*4, 15*4, 63*4, }, -{ 32*4, 16*4, 44*4, 28*4, 35*4, 19*4, 47*4, 31*4, }, -{ 8*4, 56*4, 4*4, 52*4, 11*4, 59*4, 7*4, 55*4, }, -{ 40*4, 24*4, 36*4, 20*4, 43*4, 27*4, 39*4, 23*4, }, -{ 2*4, 50*4, 14*4, 62*4, 1*4, 49*4, 13*4, 61*4, }, -{ 34*4, 18*4, 46*4, 30*4, 33*4, 17*4, 45*4, 29*4, }, -{ 10*4, 58*4, 6*4, 54*4, 9*4, 57*4, 5*4, 53*4, }, -{ 42*4, 26*4, 38*4, 22*4, 41*4, 25*4, 37*4, 21*4, }, -}; - -static const uint8_t offset[511][2]= { -{ 0, 0}, -{ 0, 0}, { 8, 8}, -{ 0, 0}, { 4, 4}, {12, 8}, { 8,12}, -{ 0, 0}, {10, 2}, { 4, 4}, {14, 6}, { 8, 8}, { 2,10}, {12,12}, { 6,14}, - -{ 0, 0}, {10, 2}, { 4, 4}, {14, 6}, { 8, 8}, { 2,10}, {12,12}, { 6,14}, -{ 5, 1}, {15, 3}, { 9, 5}, { 3, 7}, {13, 9}, { 7,11}, { 1,13}, {11,15}, - -{ 0, 0}, { 8, 0}, { 0, 8}, { 8, 8}, { 5, 1}, {13, 1}, { 5, 9}, {13, 9}, -{ 2, 2}, {10, 2}, { 2,10}, {10,10}, { 7, 3}, {15, 3}, { 7,11}, {15,11}, -{ 4, 4}, {12, 4}, { 4,12}, {12,12}, { 1, 5}, { 9, 5}, { 1,13}, { 9,13}, -{ 6, 6}, {14, 6}, { 6,14}, {14,14}, { 3, 7}, {11, 7}, { 3,15}, {11,15}, - -{ 0, 0}, { 8, 0}, { 0, 8}, { 8, 8}, { 4, 0}, {12, 0}, { 4, 8}, {12, 8}, -{ 1, 1}, { 9, 1}, { 1, 9}, { 9, 9}, { 5, 1}, {13, 1}, { 5, 9}, {13, 9}, -{ 3, 2}, {11, 2}, { 3,10}, {11,10}, { 7, 2}, {15, 2}, { 7,10}, {15,10}, -{ 2, 3}, {10, 3}, { 2,11}, {10,11}, { 6, 3}, {14, 3}, { 6,11}, {14,11}, -{ 0, 4}, { 8, 4}, { 0,12}, { 8,12}, { 4, 4}, {12, 4}, { 4,12}, {12,12}, -{ 1, 5}, { 9, 5}, { 1,13}, { 9,13}, { 5, 5}, {13, 5}, { 5,13}, {13,13}, -{ 3, 6}, {11, 6}, { 3,14}, {11,14}, { 7, 6}, {15, 6}, { 7,14}, {15,14}, -{ 2, 7}, {10, 7}, { 2,15}, {10,15}, { 6, 7}, {14, 7}, { 6,15}, {14,15}, - -{ 0, 0}, { 8, 0}, { 0, 8}, { 8, 8}, { 0, 2}, { 8, 2}, { 0,10}, { 8,10}, -{ 0, 4}, { 8, 4}, { 0,12}, { 8,12}, { 0, 6}, { 8, 6}, { 0,14}, { 8,14}, -{ 1, 1}, { 9, 1}, { 1, 9}, { 9, 9}, { 1, 3}, { 9, 3}, { 1,11}, { 9,11}, -{ 1, 5}, { 9, 5}, { 1,13}, { 9,13}, { 1, 7}, { 9, 7}, { 1,15}, { 9,15}, -{ 2, 0}, {10, 0},
Re: [FFmpeg-devel] [PATCH] lavfi: USPP filter
On 12/12/14 2:53 AM, arwa arif wrote: From e1168f18aac0d97c7c0a3a55c397f8f2313a0de0 Mon Sep 17 00:00:00 2001 From: Arwa Arif arwaarif1...@gmail.com Date: Fri, 12 Dec 2014 11:14:26 +0530 Subject: [PATCH] Delete mp=uspp --- doc/filters.texi |1 - libavfilter/Makefile |1 - libavfilter/libmpcodecs/vf_uspp.c | 394 - 3 files changed, 396 deletions(-) delete mode 100644 libavfilter/libmpcodecs/vf_uspp.c You forgot to remove the references to the filter in libavfilter/vf_mp.c and bump lavfi's micro version. Rest is ok. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat: Implement subtitle charenc guessing
This also moves general charenc conversion from avcodec to avformat; the version in avcodec is left, but renamed; I'm not sure if that's the optimal solution. The documentation could probably use some improvements, and a few more options could be added to ENCA. This very simply prefers libguess over ENCA, and ENCA over uchardet, but will fall back on a less-preferred guess if something decodes wrong, and will drop illegal sequences in iconv if all else fails. It'd be possible to have ffmpeg.c present a UI if multiple guesses are returned, and other library consumers could do the same. --- configure | 15 +++ libavcodec/options_table.h | 2 +- libavformat/aqtitledec.c| 2 + libavformat/assdec.c| 2 + libavformat/avformat.h | 50 + libavformat/jacosubdec.c| 2 + libavformat/microdvddec.c | 2 + libavformat/mpl2dec.c | 2 + libavformat/mpsubdec.c | 2 + libavformat/options_table.h | 7 ++ libavformat/pjsdec.c| 2 + libavformat/realtextdec.c | 2 + libavformat/samidec.c | 2 + libavformat/srtdec.c| 2 + libavformat/stldec.c| 2 + libavformat/subtitles.c | 262 +++- libavformat/subtitles.h | 1 + libavformat/subviewer1dec.c | 2 + libavformat/subviewerdec.c | 2 + libavformat/utils.c | 2 + libavformat/vplayerdec.c| 2 + libavformat/webvttdec.c | 2 + 22 files changed, 365 insertions(+), 4 deletions(-) diff --git a/configure b/configure index e2e3619..a5a9f9b 100755 --- a/configure +++ b/configure @@ -199,6 +199,9 @@ External library support: --enable-gnutls enable gnutls, needed for https support if openssl is not used [no] --disable-iconv disable iconv [autodetect] + --disable-libguess disable libguess [autodetect] + --disable-uchardet disable universalchardet [autodetect] + --enable-encadisable enca [no] --enable-ladspa enable LADSPA audio filtering [no] --enable-libaacplus enable AAC+ encoding via libaacplus [no] --enable-libass enable libass subtitles rendering, @@ -1342,6 +1345,9 @@ EXTERNAL_LIBRARY_LIST= frei0r gnutls iconv +libguess +uchardet +enca ladspa libaacplus libass @@ -4358,6 +4364,7 @@ die_license_disabled gpl libxavs die_license_disabled gpl libxvid die_license_disabled gpl libzvbi die_license_disabled gpl x11grab +die_license_disabled gpl enca die_license_disabled nonfree libaacplus die_license_disabled nonfree libfaac @@ -5117,6 +5124,14 @@ enabled vdpau enabled xlib # Funny iconv installations are not unusual, so check it after all flags have been set disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv +disabled iconv || disabled libguess || disable libguess { +check_pkg_config libguess libguess.h libguess_determine_encoding require_pkg_config libguess libguess.h libguess_determine_encoding enable libguess; +} +disabled iconv || disabled uchardet || disable uchardet { +check_pkg_config uchardet uchardet.h uchardet_new require_pkg_config uchardet uchardet.h uchardet_new enable uchardet; +} +enabled enca check_func_headers enca.h enca_analyse || check_lib2 enca.h enca_analyse -lenca || die ERROR: enca not found + enabled debug add_cflags -g$debuglevel add_asflags -g$debuglevel # add some useful compiler flags if supported diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 1d5b078..93b3105 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -472,7 +472,7 @@ static const AVOption avcodec_options[] = { {ka, Karaoke,0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_KARAOKE }, INT_MIN, INT_MAX, A|E, audio_service_type}, {request_sample_fmt, sample format audio decoders should prefer, OFFSET(request_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64=AV_SAMPLE_FMT_NONE}, -1, INT_MAX, A|D, request_sample_fmt}, {pkt_timebase, NULL, OFFSET(pkt_timebase), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0}, -{sub_charenc, set input text subtitles character encoding, OFFSET(sub_charenc), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, S|D}, +{sub_charenc_lavc, set input text subtitles character encoding, OFFSET(sub_charenc), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, S|D}, {sub_charenc_mode, set input text subtitles character encoding mode, OFFSET(sub_charenc_mode), AV_OPT_TYPE_FLAGS, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, -1, INT_MAX, S|D, sub_charenc_mode}, {do_nothing, NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_DO_NOTHING}, INT_MIN, INT_MAX, S|D, sub_charenc_mode}, {auto,NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, INT_MIN, INT_MAX, S|D, sub_charenc_mode}, diff --git a/libavformat/aqtitledec.c