diff mbox

[FFmpeg-devel] avformat/utils: Stream specifier enhancement

Message ID 6d59fe75-5674-67c7-a2b5-faaea1de79a7@vivanet.hu
State Accepted
Commit a06175d7392326201a131fc09b3ea52617f310df
Headers show

Commit Message

Bodecs Bela April 12, 2018, 8:23 a.m. UTC
2018.04.12. 0:26 keltezéssel, Michael Niedermayer írta:
> On Wed, Apr 11, 2018 at 10:37:41PM +0200, Bodecs Bela wrote:
>> fate test enclosed
>>
>>
>> 2018.04.04. 10:39 keltezéssel, Bodecs Bela írta:
>>>
>>> 2018.04.04. 2:37 keltezéssel, Michael Niedermayer írta:
>>>> On Sun, Apr 01, 2018 at 11:42:34PM +0200, Bodecs Bela wrote:
>>>>> Dear All,
>>>>>
>>>>> currently when specifying the program id you can only decide to select
>>>>> all stream of the specified program (e.g. p:103 will select all streams
>>>>> of program 103) or narrow the selection to a specific stream sub index
>>>>> (e.g. p:145:1 will select 2nd stream of program 145.) But you can not
>>>>> specify like all audio streams of program 145 or 3rd video stream of
>>>>> program 311.
>>>>> In some case, mainly working with multiprogram mpeg-ts containers as
>>>>> input, this feature would be handy.
>>>>> This patch makes it possible to narrow the stream selection among
>>>>> streams of the specified program by stream type and optionally its
>>>>> index. Handled types: a, v, s, d.
>>>>> Examples: p:601:a  will select all audio streams of program 601,
>>>>> p:603:a:1 will select 2nd audio streams of program 603,
>>>>> p:604:v:0 will select first video stream of program 604.
>>>>> This syntax enhancement does not interfere in any way with
>>>>> current/exiting syntax or working command lines
>>>> I think this is a good idea.
>>>> Can you also add fate test(s) for this ? (can be in a seperate patch
>>>> later of course)
>>>>
>>> ok, I will try.
>>>
>>> bb
>>>
>>>> thx
>>>>
>>>> [...]
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>   mpegts.mak |    6 ++++++
>>   1 file changed, 6 insertions(+)
>> da6c059eab100872d0f61d14e40e46012f031bfe  0002-fate-to-test-program-sub-stream-selection-by-its-typ.patch
>>  From 093bdb47d1c5093cbd9427fbd2383a1c802464bb Mon Sep 17 00:00:00 2001
>> From: Bela Bodecs <bodecsb@vivanet.hu>
>> Date: Wed, 11 Apr 2018 22:33:02 +0200
>> Subject: [PATCH] fate: to test program sub stream selection by its type in
>>   mpegts
>>
>> Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
>> ---
>>   tests/fate/mpegts.mak | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/tests/fate/mpegts.mak b/tests/fate/mpegts.mak
>> index bb0d9d9..2b12849 100644
>> --- a/tests/fate/mpegts.mak
>> +++ b/tests/fate/mpegts.mak
>> @@ -9,6 +9,12 @@ FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-la
>>   fate-mpegts-probe-latm: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
>>   fate-mpegts-probe-latm: CMD = run $(PROBE_CODEC_NAME_COMMAND) -i "$(SRC)"
>>   
>> +
>> +FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-program
>> +fate-mpegts-probe-program: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
>> +fate-mpegts-probe-program: CMD = run $(PROBE_CODEC_NAME_COMMAND) -select_streams p:769:v:0 -i "$(SRC)"
>> +
>> +
>>   FATE_SAMPLES_FFPROBE += $(FATE_MPEGTS_PROBE-yes)
> missing reference file
>
> reference file './tests/ref/fate/mpegts-probe-program' not found
> ./tests/fate-run.sh: 419: ./tests/fate-run.sh: cannot open tests/data/fate/mpegts-probe-program.diff: No such file
> Test mpegts-probe-program failed. Look at tests/data/fate/mpegts-probe-program.err for details.
> make: *** [fate-mpegts-probe-program] Error 1
> make: *** Waiting for unfinished jobs....
>
> [...]
>
>
sorry, ref file was not included. Corrected patch enclosed.

bb

>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
From 9df4f0261f475b0e84aad299f190f1c35a9e62c0 Mon Sep 17 00:00:00 2001
From: Bela Bodecs <bodecsb@vivanet.hu>
Date: Wed, 11 Apr 2018 22:33:02 +0200
Subject: [PATCH] fate: to test program sub stream selection by its type in
 mpegts

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
---
 tests/fate/mpegts.mak               | 6 ++++++
 tests/ref/fate/mpegts-probe-program | 8 ++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 tests/ref/fate/mpegts-probe-program

Comments

Michael Niedermayer April 12, 2018, 9:53 p.m. UTC | #1
On Thu, Apr 12, 2018 at 10:23:07AM +0200, Bodecs Bela wrote:
> 
> 
> 2018.04.12. 0:26 keltezéssel, Michael Niedermayer írta:
> >On Wed, Apr 11, 2018 at 10:37:41PM +0200, Bodecs Bela wrote:
> >>fate test enclosed
> >>
> >>
> >>2018.04.04. 10:39 keltezéssel, Bodecs Bela írta:
> >>>
> >>>2018.04.04. 2:37 keltezéssel, Michael Niedermayer írta:
> >>>>On Sun, Apr 01, 2018 at 11:42:34PM +0200, Bodecs Bela wrote:
> >>>>>Dear All,
> >>>>>
> >>>>>currently when specifying the program id you can only decide to select
> >>>>>all stream of the specified program (e.g. p:103 will select all streams
> >>>>>of program 103) or narrow the selection to a specific stream sub index
> >>>>>(e.g. p:145:1 will select 2nd stream of program 145.) But you can not
> >>>>>specify like all audio streams of program 145 or 3rd video stream of
> >>>>>program 311.
> >>>>>In some case, mainly working with multiprogram mpeg-ts containers as
> >>>>>input, this feature would be handy.
> >>>>>This patch makes it possible to narrow the stream selection among
> >>>>>streams of the specified program by stream type and optionally its
> >>>>>index. Handled types: a, v, s, d.
> >>>>>Examples: p:601:a  will select all audio streams of program 601,
> >>>>>p:603:a:1 will select 2nd audio streams of program 603,
> >>>>>p:604:v:0 will select first video stream of program 604.
> >>>>>This syntax enhancement does not interfere in any way with
> >>>>>current/exiting syntax or working command lines
> >>>>I think this is a good idea.
> >>>>Can you also add fate test(s) for this ? (can be in a seperate patch
> >>>>later of course)
> >>>>
> >>>ok, I will try.
> >>>
> >>>bb
> >>>
> >>>>thx
> >>>>
> >>>>[...]
> >>>>
> >>>>
> >>>>
> >>>>_______________________________________________
> >>>>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
> >>  mpegts.mak |    6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>da6c059eab100872d0f61d14e40e46012f031bfe  0002-fate-to-test-program-sub-stream-selection-by-its-typ.patch
> >> From 093bdb47d1c5093cbd9427fbd2383a1c802464bb Mon Sep 17 00:00:00 2001
> >>From: Bela Bodecs <bodecsb@vivanet.hu>
> >>Date: Wed, 11 Apr 2018 22:33:02 +0200
> >>Subject: [PATCH] fate: to test program sub stream selection by its type in
> >>  mpegts
> >>
> >>Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
> >>---
> >>  tests/fate/mpegts.mak | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>
> >>diff --git a/tests/fate/mpegts.mak b/tests/fate/mpegts.mak
> >>index bb0d9d9..2b12849 100644
> >>--- a/tests/fate/mpegts.mak
> >>+++ b/tests/fate/mpegts.mak
> >>@@ -9,6 +9,12 @@ FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-la
> >>  fate-mpegts-probe-latm: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
> >>  fate-mpegts-probe-latm: CMD = run $(PROBE_CODEC_NAME_COMMAND) -i "$(SRC)"
> >>+
> >>+FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-program
> >>+fate-mpegts-probe-program: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
> >>+fate-mpegts-probe-program: CMD = run $(PROBE_CODEC_NAME_COMMAND) -select_streams p:769:v:0 -i "$(SRC)"
> >>+
> >>+
> >>  FATE_SAMPLES_FFPROBE += $(FATE_MPEGTS_PROBE-yes)
> >missing reference file
> >
> >reference file './tests/ref/fate/mpegts-probe-program' not found
> >./tests/fate-run.sh: 419: ./tests/fate-run.sh: cannot open tests/data/fate/mpegts-probe-program.diff: No such file
> >Test mpegts-probe-program failed. Look at tests/data/fate/mpegts-probe-program.err for details.
> >make: *** [fate-mpegts-probe-program] Error 1
> >make: *** Waiting for unfinished jobs....
> >
> >[...]
> >
> >
> sorry, ref file was not included. Corrected patch enclosed.

will apply with the related patch

thx

[...]
Bodecs Bela April 13, 2018, 9:55 a.m. UTC | #2
2018.04.12. 23:53 keltezéssel, Michael Niedermayer írta:
> On Thu, Apr 12, 2018 at 10:23:07AM +0200, Bodecs Bela wrote:
>>
>> 2018.04.12. 0:26 keltezéssel, Michael Niedermayer írta:
>>> On Wed, Apr 11, 2018 at 10:37:41PM +0200, Bodecs Bela wrote:
>>>> fate test enclosed
>>>>
>>>>
>>>> 2018.04.04. 10:39 keltezéssel, Bodecs Bela írta:
>>>>> 2018.04.04. 2:37 keltezéssel, Michael Niedermayer írta:
>>>>>> On Sun, Apr 01, 2018 at 11:42:34PM +0200, Bodecs Bela wrote:
>>>>>>> Dear All,
>>>>>>>
>>>>>>> currently when specifying the program id you can only decide to select
>>>>>>> all stream of the specified program (e.g. p:103 will select all streams
>>>>>>> of program 103) or narrow the selection to a specific stream sub index
>>>>>>> (e.g. p:145:1 will select 2nd stream of program 145.) But you can not
>>>>>>> specify like all audio streams of program 145 or 3rd video stream of
>>>>>>> program 311.
>>>>>>> In some case, mainly working with multiprogram mpeg-ts containers as
>>>>>>> input, this feature would be handy.
>>>>>>> This patch makes it possible to narrow the stream selection among
>>>>>>> streams of the specified program by stream type and optionally its
>>>>>>> index. Handled types: a, v, s, d.
>>>>>>> Examples: p:601:a  will select all audio streams of program 601,
>>>>>>> p:603:a:1 will select 2nd audio streams of program 603,
>>>>>>> p:604:v:0 will select first video stream of program 604.
>>>>>>> This syntax enhancement does not interfere in any way with
>>>>>>> current/exiting syntax or working command lines
>>>>>> I think this is a good idea.
>>>>>> Can you also add fate test(s) for this ? (can be in a seperate patch
>>>>>> later of course)
>>>>>>
>>>>> ok, I will try.
>>>>>
>>>>> bb
>>>>>
>>>>>> thx
>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>   mpegts.mak |    6 ++++++
>>>>   1 file changed, 6 insertions(+)
>>>> da6c059eab100872d0f61d14e40e46012f031bfe  0002-fate-to-test-program-sub-stream-selection-by-its-typ.patch
>>>>  From 093bdb47d1c5093cbd9427fbd2383a1c802464bb Mon Sep 17 00:00:00 2001
>>>> From: Bela Bodecs <bodecsb@vivanet.hu>
>>>> Date: Wed, 11 Apr 2018 22:33:02 +0200
>>>> Subject: [PATCH] fate: to test program sub stream selection by its type in
>>>>   mpegts
>>>>
>>>> Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
>>>> ---
>>>>   tests/fate/mpegts.mak | 6 ++++++
>>>>   1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/tests/fate/mpegts.mak b/tests/fate/mpegts.mak
>>>> index bb0d9d9..2b12849 100644
>>>> --- a/tests/fate/mpegts.mak
>>>> +++ b/tests/fate/mpegts.mak
>>>> @@ -9,6 +9,12 @@ FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-la
>>>>   fate-mpegts-probe-latm: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
>>>>   fate-mpegts-probe-latm: CMD = run $(PROBE_CODEC_NAME_COMMAND) -i "$(SRC)"
>>>> +
>>>> +FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-program
>>>> +fate-mpegts-probe-program: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
>>>> +fate-mpegts-probe-program: CMD = run $(PROBE_CODEC_NAME_COMMAND) -select_streams p:769:v:0 -i "$(SRC)"
>>>> +
>>>> +
>>>>   FATE_SAMPLES_FFPROBE += $(FATE_MPEGTS_PROBE-yes)
>>> missing reference file
>>>
>>> reference file './tests/ref/fate/mpegts-probe-program' not found
>>> ./tests/fate-run.sh: 419: ./tests/fate-run.sh: cannot open tests/data/fate/mpegts-probe-program.diff: No such file
>>> Test mpegts-probe-program failed. Look at tests/data/fate/mpegts-probe-program.err for details.
>>> make: *** [fate-mpegts-probe-program] Error 1
>>> make: *** Waiting for unfinished jobs....
>>>
>>> [...]
>>>
>>>
>> sorry, ref file was not included. Corrected patch enclosed.
> will apply with the related patch
>
> thx
>
> [...]
>
thank you. I got an idea how to enhance it further. I will send it soon 
in  a new thread.

bb

>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/tests/fate/mpegts.mak b/tests/fate/mpegts.mak
index bb0d9d9..2b12849 100644
--- a/tests/fate/mpegts.mak
+++ b/tests/fate/mpegts.mak
@@ -9,6 +9,12 @@  FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-la
 fate-mpegts-probe-latm: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
 fate-mpegts-probe-latm: CMD = run $(PROBE_CODEC_NAME_COMMAND) -i "$(SRC)"
 
+
+FATE_MPEGTS_PROBE-$(call DEMDEC, MPEGTS, HEVC, AAC_LATM) += fate-mpegts-probe-program
+fate-mpegts-probe-program: SRC = $(TARGET_SAMPLES)/mpegts/loewe.ts
+fate-mpegts-probe-program: CMD = run $(PROBE_CODEC_NAME_COMMAND) -select_streams p:769:v:0 -i "$(SRC)"
+
+
 FATE_SAMPLES_FFPROBE += $(FATE_MPEGTS_PROBE-yes)
 
 fate-mpegts: $(FATE_MPEGTS_PROBE-yes)
diff --git a/tests/ref/fate/mpegts-probe-program b/tests/ref/fate/mpegts-probe-program
new file mode 100644
index 0000000..bb1012c
--- /dev/null
+++ b/tests/ref/fate/mpegts-probe-program
@@ -0,0 +1,8 @@ 
+[PROGRAM]
+[STREAM]
+codec_name=hevc
+[/STREAM]
+[/PROGRAM]
+[STREAM]
+codec_name=hevc
+[/STREAM]