Re: [FFmpeg-devel] [DEVEL][PATCH v2] ffmpeg: fix channel_layout bug on non-default layout

2017-11-12 Thread Kv Pham
Le 12 nov. 2017 5:01 PM, "Michael Niedermayer"  a
écrit :

On Sat, Nov 11, 2017 at 02:15:25AM +0100, pkv.stream wrote:
> Le 11/11/2017 à 1:07 AM, Michael Niedermayer a écrit :
> >On Fri, Nov 10, 2017 at 10:27:48PM +0100, pkv.stream wrote:
> >>Le 10/11/2017 à 1:12 AM, Michael Niedermayer a écrit :
> >>>On Thu, Nov 09, 2017 at 09:37:33PM +0100, pkv.stream wrote:
> Hi Michael,
> 
> >>  ffmpeg_opt.c |   11 ++-
> >>  1 file changed, 10 insertions(+), 1 deletion(-)
> >>2af07f4366efdfaf1018bb2ea29be672befe0823  0001-ffmpeg-fix-channel_
layout-bug-on-non-default-layout.patch
> >> From 4ec55dc88923108132307b41300a1abddf32e6f7 Mon Sep 17 00:00:00
2001
> >>From: pkviet 
> >>Date: Mon, 2 Oct 2017 11:14:31 +0200
> >>Subject: [PATCH] ffmpeg: fix channel_layout bug on non-default
layout
> >>
> >>Fix for ticket 6706.
> >>The -channel_layout option was not working when the channel layout
was not
> >>a default one (ex: for 4 channels, quad was interpreted as 4.0
which is
> >>the default layout for 4 channels; or octagonal interpreted as 7.1).
> >>This led to the spurious auto-insertion of an auto-resampler filter
> >>remapping the channels even if input and output had identical
channel
> >>layouts.
> >>The fix operates by directly calling the channel layout if defined
in
> >>options. If the layout is undefined, the default layout is selected
as
> >>before the fix.
> >>---
> >>  ffmpeg_opt.c | 11 ++-
> >>  1 file changed, 10 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
> >>index 100fa76..cf5a63c 100644
> >>--- a/ffmpeg_opt.c
> >>+++ b/ffmpeg_opt.c
> >>@@ -1804,6 +1804,12 @@ static OutputStream 
> >>*new_audio_stream(OptionsContext
*o, AVFormatContext *oc, in
> >>  MATCH_PER_STREAM_OPT(audio_channels, i,
audio_enc->channels, oc, st);
> >>+AVDictionaryEntry *output_layout =
av_dict_get(o->g->codec_opts,
> >>+
 "channel_layout",
> >>+   NULL,
AV_DICT_MATCH_CASE);
> >This doesnt look right
> >
> >not an issue of the patch as such but
> >why is the channel_layout option per file and not per stream?
> just my ignorance; do you mean this is not the right way to retrieve
> the channel_layout option from an audio stream ?
> >>>I think there is more buggy with how the channel_layout is handled
> >>>
> >>>try this:
> >>>./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -channel_layout 5 test.wav
> >>>and this:
> >>>./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -channel_layout:a 5 test.wav
> >>>
> >>>while it may appear that the are both working this is deceiving.
> >>>I think only the channel number gets actually used in the 2nd case
> >>>
> >>>Look at what your code with av_dict_get() reads.
> >>>It does not obtain the 5 in the 2nd case
> >>ok I fixed that by using the flag AV_DICT_IGNORE_SUFFIX ; now
> >>-channel_layout:a works as expected.
> >>I fixed also all the styling issues you spotted (mixed declarations,
> >>{} for if etc).
> >>
> >>Still not understanding your initial comment though :
> >>'why is the channel_layout option per file and not per stream?'
> >>
> >>do you mean o->g->codec_opts is not where I should retrieve the
> >>channel_layout ? if not where from ?
> >>
> >>Thanks
> >>
> >>>[...]
> >>>
> >>>
> >>>___
> >>>ffmpeg-devel mailing list
> >>>ffmpeg-devel@ffmpeg.org
> >>>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >>  ffmpeg_opt.c |   12 ++--
> >>  1 file changed, 10 insertions(+), 2 deletions(-)
> >>849898d28e989ffa5cc598c6fe4d43847b636132  0001-ffmpeg-fix-channel_
layout-bug-on-non-default-layout.patch
> >> From 6d4f1c14135f9473b77e1c649d0e7bbaeba00a50 Mon Sep 17 00:00:00 2001
> >>From: pkviet 
> >>Date: Mon, 2 Oct 2017 11:14:31 +0200
> >>Subject: [PATCH] ffmpeg: fix channel_layout bug on non-default layout
> >>
> >>Fix for ticket 6706.
> >>The -channel_layout option was not working when the channel layout was
not
> >>a default one (ex: for 4 channels, quad was interpreted as 4.0 which is
> >>the default layout for 4 channels; or octagonal interpreted as 7.1).
> >>This led to the spurious auto-insertion of an auto-resampler filter
> >>remapping the channels even if input and output had identical channel
> >>layouts.
> >>The fix operates by directly calling the channel layout if defined in
> >>options. If the layout is undefined, the default layout is selected as
> >>before the fix.
> >>---
> >>  fftools/ffmpeg_opt.c | 12 ++--
> >>  1 file changed, 10 insertions(+), 2 deletions(-)
> >>
> >>diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> >>index ca6f10d..cb25d7b 100644
> >>--- a/fftools/ffmpeg_opt.c
> >>+++ b/fftools/ffmpeg_opt.c
> >>@@ -1785,6 +1785,7 @@ static OutputStream 

Re: [FFmpeg-devel] [PATCH] aacenc: WIP support for PCEs

2017-11-10 Thread Kv Pham
> Hi atomnuker,
>
> that's wonderful;
>
> there are two things also:
>
> 1) there are changes to make to the list of channel layouts not requiring
> PCE
>
> ==> AV_CH_LAYOUT_5POINT0 to AV_CH_LAYOUT_5POINT0_BACK since the previous
> is 5.0(side) while the latter is 5.0 which is what is in spec (table 1.19
> ISO/IEC 14496-3:200X(E) or table 42 ISO/IEC 13818-7:2004(E) )
>
> see patch in attachment (can't be applied directly due to rebasing issues
> from your initial patch)
>
>
Checked the spec, you're right, fixed.


Great, you're right also about side being better than back in the commit
message.




> 2) for everything to work I had to also apply the patch from here:
>
> http://ffmpeg.org/pipermail/ffmpeg-devel/2017-October/217357.html
>
> If you ffmpeg -loglevel debug , you will see that on non-default channel
> layouts, there is an auto insertion of a resampler filter : the
> channel_layout option is not passed correctly in the chain.
>
> for instance: ffmpeg -channel_layout octagonal -i input.wav -c:a aac
> -channel_layout octagonal out.mkv will matrix the input from octagonal to
> 7.1 before the encoding.
>
> Check ticket 6706 for details of the issue.
>
> I am not knowledgeable enough to be sure my fix is correct; it's working
> for sure, but I've had very few feedback (only Michael and Moritz about
> styling issues).
>


Pining Michael to take a look at it.



Discussing this with Michael.
My patch fails when there is down or upmixing.
I think there are at least two bugs hiding one behind another within the
filter chain.
It's a pity because this cripples your PCE implementation to ffmpeg default
channel layouts only (2.1 4.0 5.0 5.1 6.1 7.1 hexadecagonal), where 4.0 5.0
5.1 7.1 do not require PCE anyway.
I'll try to find a solution but senior dev help might be needed because
this is quite convoluted.

Best


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] avformat/opensrt: add Haivision Open SRT protocol

2017-11-09 Thread Kv Pham
Le 9 nov. 2017 10:32 AM, "Nablet Developer"  a écrit :

protocol requires libsrt (https://github.com/Haivision/srt) to be
installed

Signed-off-by: Nablet Developer 
---
 configure   |  10 ++
 libavformat/Makefile|   1 +
 libavformat/opensrt.c   | 418 ++
++
 libavformat/protocols.c |   1 +
 4 files changed, 430 insertions(+)
 create mode 100644 libavformat/opensrt.c

diff --git a/configure b/configure
index f396abd..b44df0e 100755
--- a/configure
+++ b/configure
@@ -293,6 +293,7 @@ External library support:
   --enable-opengl  enable OpenGL rendering [no]
   --enable-openssl enable openssl, needed for https support
if gnutls is not used [no]
+  --enable-opensrt enable Haivision Open SRT protoco [no]
   --disable-sndio  disable sndio support [autodetect]
   --disable-schannel   disable SChannel SSP, needed for TLS support on
Windows if openssl and gnutls are not used
[autodetect]
@@ -1638,6 +1639,7 @@ EXTERNAL_LIBRARY_LIST="
 openal
 opencl
 opengl
+opensrt
 "

 HWACCEL_AUTODETECT_LIBRARY_LIST="
@@ -3139,6 +3141,8 @@ libsmbclient_protocol_deps="libsmbclient gplv3"
 libssh_protocol_deps="libssh"
 mmsh_protocol_select="http_protocol"
 mmst_protocol_select="network"
+opensrt_protocol_select="network"
+opensrt_protocol_deps="opensrt"
 rtmp_protocol_conflict="librtmp_protocol"
 rtmp_protocol_select="tcp_protocol"
 rtmp_protocol_suggest="zlib"
@@ -6102,6 +6106,8 @@ enabled omx   && require_header OMX_Core.h
 enabled omx_rpi   && { check_header OMX_Core.h ||
{ ! enabled cross_compile && add_cflags
-isystem/opt/vc/include/IL && check_header OMX_Core.h ; } ||
die "ERROR: OpenMAX IL headers not found";
} && enable omx
+#enabled opensrt   && check_lib srt srt/srt.h srt_socket -lsrt
+enabled opensrt   && require_pkg_config libsrt "srt >= 1.2.0"
srt/srt.h srt_socket
 enabled openssl   && { use_pkg_config openssl openssl
openssl/ssl.h OPENSSL_init_ssl ||
use_pkg_config openssl openssl
openssl/ssl.h SSL_library_init ||
check_lib openssl openssl/ssl.h
SSL_library_init -lssl -lcrypto ||
@@ -6156,6 +6162,10 @@ if enabled decklink; then
 esac
 fi

+if enabled opensrt; then
+opensrt_protocol_extralibs="$opensrt_protocol_extralibs -lsrt"
+fi
+
 enabled securetransport &&
 check_func SecIdentityCreate "-Wl,-framework,CoreFoundation
-Wl,-framework,Security" &&
 check_lib securetransport "Security/SecureTransport.h
Security/Security.h" "SSLCreateContext SecItemImport"
"-Wl,-framework,CoreFoundation -Wl,-framework,Security" ||
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 146a465..5116d31 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -596,6 +596,7 @@ TLS-OBJS-$(CONFIG_SCHANNEL)  +=
tls_schannel.o
 OBJS-$(CONFIG_TLS_PROTOCOL)  += tls.o $(TLS-OBJS-yes)
 OBJS-$(CONFIG_UDP_PROTOCOL)  += udp.o
 OBJS-$(CONFIG_UDPLITE_PROTOCOL)  += udp.o
+OBJS-$(CONFIG_OPENSRT_PROTOCOL)  += opensrt.o
 OBJS-$(CONFIG_UNIX_PROTOCOL) += unix.o

 # libavdevice dependencies
diff --git a/libavformat/opensrt.c b/libavformat/opensrt.c
new file mode 100644
index 000..bc58368
--- /dev/null
+++ b/libavformat/opensrt.c
@@ -0,0 +1,418 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
+ */
+
+/**
+ * @file
+ * Haivision Open SRT (Secure Reliable Transport) protocol
+ */
+
+#include "avformat.h"
+#include "libavutil/avassert.h"
+#include "libavutil/parseutils.h"
+#include "libavutil/opt.h"
+#include "libavutil/time.h"
+
+#include "internal.h"
+#include "network.h"
+#include "os_support.h"
+#include "url.h"
+#if HAVE_POLL_H
+#include 
+#endif
+
+#include "tcp.h"
+
+#if CONFIG_OPENSRT_PROTOCOL
+#include 
+#endif
+
+enum SRTMode {
+SRT_MODE_CALLER = 0,
+SRT_MODE_LISTENER = 1,
+SRT_MODE_RENDEZVOUS = 2
+};
+
+typedef struct SRTContext {
+struct TCPContext tcp_context;
+/* SRT socket options (srt/srt.h) */
+int64_t maxbw;
+int pbkeylen;
+char * 

Re: [FFmpeg-devel] [FFmpeg-cvslog] aacenc: support extended channel layouts using PCEs

2017-11-09 Thread Kv Pham
Le 9 nov. 2017 10:12 AM, "Nicolas George"  a écrit :

Le nonidi 19 brumaire, an CCXXVI, Rostislav Pehlivanov a écrit :
> ffmpeg | branch: master | Rostislav Pehlivanov  |
Mon Oct  3 19:53:11 2016 +0100| [fbf295e2bd4d48d7a0a094ed5afce2fa5b6cf35a]
| committer: Rostislav Pehlivanov
>
> aacenc: support extended channel layouts using PCEs
>
> This commit implements support for PCE (Program Configuration Elements)
in the
> AAC encoder, and as such allows for encoding of channel layouts not
present
> in the presets defined by the spec (which only lists the 8 most common
ones).
>
> This has been a highly requested feature and is also the first open
source encoder
> to support this many layouts.
>
> Many thanks to pkviet  who implemented support for
and
> verified all channel layouts.

This broke fate-aac-yoraw-encode.

stddev:  160.76 PSNR: 52.21 MAXDIFF: 3105 bytes:   576972/   577536
stddev: |160.76 - 259| >= 17


Regards,

--
  Nicolas George


Thanks a lot.
That's probably related to the fixes that I pointed out in my last message
on the thread.
I'll run fate later today on my aacdev branch on github
github.com/pkviet/FFmpeg to check that this fixes the issues.
(amusant de croiser un autre archicube; moi, s92. Les échanges sont parfois
vraiment musclés ici, il ne faut pas être susceptible ! :) )
Regards,
pkv
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [DEVEL][PATCH] ffmpeg: fix channel_layout bug on non-default layout

2017-10-04 Thread Kv Pham
Le 4 oct. 2017 11:24 PM, "Moritz Barsnick"  a écrit :

On Mon, Oct 02, 2017 at 21:50:50 +0200, pkv.stream wrote:
>  if (!ost->stream_copy) {
> -char *sample_fmt = NULL;
> +
> + char *sample_fmt = NULL;
>

This is very obviously a patch which will not be accepted.


> -MATCH_PER_STREAM_OPT(sample_fmts, str, sample_fmt, oc, st);
> + AVDictionaryEntry *output_layout =
av_dict_get(o->g->codec_opts, "channel_layout",NULL, AV_DICT_MATCH_CASE);
> +if (output_layout)
> +ost->enc_ctx->channel_layout =
strtoull(output_layout->value, NULL, 10);
> +
> + MATCH_PER_STREAM_OPT(sample_fmts, str, sample_fmt, oc, st);

Your indentation is totally wrong, and makes use of tabs. Please follow
the ffmpeg style.


Ah sorry for being careless.
Thanks for pointing out. Will correct.


Moritz
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] ffmpeg options: Enable trailing ? for map_channel

2017-08-25 Thread Kv Pham
Thanks a lot Michael. (and for spotting the avfree I missed)

Le 25 août 2017 11:44 PM, "Michael Niedermayer"  a
écrit :

On Thu, Aug 24, 2017 at 11:10:49PM +0200, pkv.stream wrote:
> Thanks a lot Martin !!! all sorted out thanks to your kind help.
> I had run fate previously but obviously missed something; so re-run
> and it's ok.
>
> I created two tests per your advice testing for a third channel in a
> stereo file and then in a 2.1 file.
> Instead of CRC, I've used MD5 because the extant mapchan fate tests
> were using it.
>
> Updated patch in attachment.
>
> Michael: would that be OK or do you see other changes to make ?
>
>
>

>  doc/ffmpeg.texi |   13 +++-
>  ffmpeg_opt.c|   21
+---
>  tests/fate/ffmpeg.mak   |8 +++
>  tests/ref/fate/mapchan-2ch-extract-ch0-ch2-trailing |1
>  tests/ref/fate/mapchan-3ch-extract-ch0-ch2-trailing |1
>  5 files changed, 40 insertions(+), 4 deletions(-)
> 1d35047c00f25dc1391a541eb704a03a9c9198de  0001-ffmpeg-options-Enable-
trailing-for-map_channel.patch
> From 5c3b0fed39b713b19ed53b5704b1fce63b2742ad Mon Sep 17 00:00:00 2001
> From: pkviet 
> Date: Tue, 22 Aug 2017 11:30:45 +0200
> Subject: [PATCH] ffmpeg options: Enable trailing ? for map_channel
>
> The -map option allows for a trailing ? so that an error is not thrown if
> the input stream does not exist.
> This capability is extended to the map_channel option.
> This allows a ffmpeg command not to break if an input channel does not
> exist, which can be of use (for instance, scripts processing audio
> channels with sources having unset number of audio channels).

added missing av_free()
applied

thanks

[...]

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] ffmpeg options: Enable trailing ? for map_channel

2017-08-24 Thread Kv Pham
Thanks a lot Martin. I had spotted ffmpeg.mak but your input is very helpful

Le 24 août 2017 11:32 AM, "Martin Vignali" <martin.vign...@gmail.com> a
écrit :

2017-08-24 11:03 GMT+02:00 Kv Pham <pkv.str...@gmail.com>:

> Ah ok!
> Sure, I will do that. I need first to acquaint myself more with fate.
>
>
>
Hello,

You can take a look at ./tests/fate/ffmpeg.mak (begin of the file seems to
have test for map_channel)

I think you need to add two test, one when the channel is found, and one
when the channel is not found.

The idea is to find an ffmpeg cmd, using generator (as input file), or
input file already in the fate-suite if possible
and use framecrc for example, as output, (with a minimal log level)

Then you add the result as a txt file in \tests\ref\fate (with a naming
consistent with the name of the test)

Martin
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] ffmpeg options: Enable trailing ? for map_channel

2017-08-24 Thread Kv Pham
Ah ok!
Sure, I will do that. I need first to acquaint myself more with fate.


Le 24 août 2017 10:52 AM, "Michael Niedermayer" <mich...@niedermayer.cc> a
écrit :

On Thu, Aug 24, 2017 at 10:36:20AM +0200, Kv Pham wrote:
> Yes I did a make fate. Went ok.
> Is there a log to attach ? Or stdout ?

i meant
can you add a test that tests the new feature when one runs make fate
that is
if the user runs "make fate"
it would execute ffmpeg with map and "trailing ?"


>
>
> Le 24 août 2017 10:34 AM, "Michael Niedermayer" <mich...@niedermayer.cc> a
> écrit :
>
> On Thu, Aug 24, 2017 at 08:17:58AM +0200, pkv.stream wrote:
> > Le 24/08/2017 à 2:30 AM, Michael Niedermayer a écrit :
> > >On Wed, Aug 23, 2017 at 06:48:14PM +0200, pkv.stream wrote:
> > >>Hello,
> > >>
> > >>the following patch allows one to add a trailing ? to -map_channel
> > >>as in -map option.
> > >>
> > >>E.g: -map_channel 0.0.2? so that if the channel does not exist, the
> > >>command does not stop.
> > >>
> > >>This is similar to what one can do with -map.
> > >>
> > >>Thanks for any input.
> > >>
> > >>
> > >>  ffmpeg_opt.c |   24 
> > >>  1 file changed, 20 insertions(+), 4 deletions(-)
> > >>28689933986d73050286e700752ace032df6dc1b  0001-ffmpeg-options-Enable-
> trailing-for-map_channel.patch
> > >> From 07959dfe79816d03c30b8027f45b41d60078b3fa Mon Sep 17 00:00:00
2001
> > >>From: pkviet <pkv.str...@gmail.com>
> > >>Date: Tue, 22 Aug 2017 11:30:45 +0200
> > >>Subject: [PATCH] ffmpeg options: Enable trailing ? for map_channel
> > >>
> > >>The -map option allows for a trailing ? so that an error is not thrown
> if
> > >>the input stream does not exist.
> > >>This capability is extended to the map_channel option.
> > >>This allows a ffmpeg command not to break if an input channel does not
> > >>exist, which can be of use (for instance, scripts processing audio
> > >>channels with sources having unset number of audio channels).
> > >>---
> > >>  ffmpeg_opt.c | 24 
> > >>  1 file changed, 20 insertions(+), 4 deletions(-)
> > >the patch contains tabs (cannot be pushed to git master)
> > >and this is missing an update to the documentation
> >
> > thanks Michael.
> > Patch corrected per your instructions.
> > Updated doc , provided an example and removed all tabs !
>
> ok, thanks
> can you also add a self test to "make fate" ?
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Let us carefully observe those good qualities wherein our enemies excel us
> and endeavor to excel them, by avoiding what is faulty, and imitating what
> is excellent in them. -- Plutarch
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] ffmpeg options: Enable trailing ? for map_channel

2017-08-24 Thread Kv Pham
Yes I did a make fate. Went ok.
Is there a log to attach ? Or stdout ?


Le 24 août 2017 10:34 AM, "Michael Niedermayer"  a
écrit :

On Thu, Aug 24, 2017 at 08:17:58AM +0200, pkv.stream wrote:
> Le 24/08/2017 à 2:30 AM, Michael Niedermayer a écrit :
> >On Wed, Aug 23, 2017 at 06:48:14PM +0200, pkv.stream wrote:
> >>Hello,
> >>
> >>the following patch allows one to add a trailing ? to -map_channel
> >>as in -map option.
> >>
> >>E.g: -map_channel 0.0.2? so that if the channel does not exist, the
> >>command does not stop.
> >>
> >>This is similar to what one can do with -map.
> >>
> >>Thanks for any input.
> >>
> >>
> >>  ffmpeg_opt.c |   24 
> >>  1 file changed, 20 insertions(+), 4 deletions(-)
> >>28689933986d73050286e700752ace032df6dc1b  0001-ffmpeg-options-Enable-
trailing-for-map_channel.patch
> >> From 07959dfe79816d03c30b8027f45b41d60078b3fa Mon Sep 17 00:00:00 2001
> >>From: pkviet 
> >>Date: Tue, 22 Aug 2017 11:30:45 +0200
> >>Subject: [PATCH] ffmpeg options: Enable trailing ? for map_channel
> >>
> >>The -map option allows for a trailing ? so that an error is not thrown
if
> >>the input stream does not exist.
> >>This capability is extended to the map_channel option.
> >>This allows a ffmpeg command not to break if an input channel does not
> >>exist, which can be of use (for instance, scripts processing audio
> >>channels with sources having unset number of audio channels).
> >>---
> >>  ffmpeg_opt.c | 24 
> >>  1 file changed, 20 insertions(+), 4 deletions(-)
> >the patch contains tabs (cannot be pushed to git master)
> >and this is missing an update to the documentation
>
> thanks Michael.
> Patch corrected per your instructions.
> Updated doc , provided an example and removed all tabs !

ok, thanks
can you also add a self test to "make fate" ?

[...]

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] ffmpeg options: Enable trailing ? for map_channel

2017-08-23 Thread Kv Pham
Ah sorry about that. I forgot about the tabs.
Will correct and add update to doc.
Thanks


Le 24 août 2017 2:32 AM, "Michael Niedermayer"  a
écrit :

> On Wed, Aug 23, 2017 at 06:48:14PM +0200, pkv.stream wrote:
> > Hello,
> >
> > the following patch allows one to add a trailing ? to -map_channel
> > as in -map option.
> >
> > E.g: -map_channel 0.0.2? so that if the channel does not exist, the
> > command does not stop.
> >
> > This is similar to what one can do with -map.
> >
> > Thanks for any input.
> >
> >
>
> >  ffmpeg_opt.c |   24 
> >  1 file changed, 20 insertions(+), 4 deletions(-)
> > 28689933986d73050286e700752ace032df6dc1b  0001-ffmpeg-options-Enable-
> trailing-for-map_channel.patch
> > From 07959dfe79816d03c30b8027f45b41d60078b3fa Mon Sep 17 00:00:00 2001
> > From: pkviet 
> > Date: Tue, 22 Aug 2017 11:30:45 +0200
> > Subject: [PATCH] ffmpeg options: Enable trailing ? for map_channel
> >
> > The -map option allows for a trailing ? so that an error is not thrown if
> > the input stream does not exist.
> > This capability is extended to the map_channel option.
> > This allows a ffmpeg command not to break if an input channel does not
> > exist, which can be of use (for instance, scripts processing audio
> > channels with sources having unset number of audio channels).
> > ---
> >  ffmpeg_opt.c | 24 
> >  1 file changed, 20 insertions(+), 4 deletions(-)
>
> the patch contains tabs (cannot be pushed to git master)
> and this is missing an update to the documentation
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Elect your leaders based on what they did after the last election, not
> based on what they say before an election.
>
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel