diff mbox series

[FFmpeg-devel] lavf/tee: pass options to protocol.

Message ID 20200602185627.592077-1-george@nsup.org
State Accepted
Commit a45be55d5b54827220ed9097932c9e2141488526
Headers show
Series [FFmpeg-devel] lavf/tee: pass options to protocol. | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Nicolas George June 2, 2020, 6:56 p.m. UTC
Fix trac ticket #8705.

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavformat/tee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Not tested, I have no icecast server at hand. I will ask the reporter to
test.

Comments

Marvin Scholz June 3, 2020, 2:38 a.m. UTC | #1
Hi, thanks a lot for working on a fix for this.

I've just tried it and it does not seem to work, I still can't pass
options to the icecast protocol using tee.

Command I tried was:

ffmpeg -re -i input.mov -c copy -f tee -password hackme -content_type 
audio/ogg -map 0:v -map 0:a 
"icecast://source@127.0.0.1:8888/test.ts|test.ts"


On 2 Jun 2020, at 20:56, Nicolas George wrote:

> Fix trac ticket #8705.
>
> Signed-off-by: Nicolas George <george@nsup.org>
> ---
>  libavformat/tee.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> Not tested, I have no icecast server at hand. I will ask the reporter 
> to
> test.
>
>
> diff --git a/libavformat/tee.c b/libavformat/tee.c
> index f2b11fcb35..c5c59975e6 100644
> --- a/libavformat/tee.c
> +++ b/libavformat/tee.c
> @@ -295,7 +295,7 @@ static int open_slave(AVFormatContext *avf, char 
> *slave, TeeSlave *tee_slave)
>              goto end;
>      }
>
> -    ret = ff_format_output_open(avf2, filename, NULL);
> +    ret = ff_format_output_open(avf2, filename, &options);
>      if (ret < 0) {
>          av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", 
> slave,
>                 av_err2str(ret));
> -- 
> 2.26.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Nicolas George June 3, 2020, 9:49 a.m. UTC | #2
Marvin Scholz (12020-06-03):
> Hi, thanks a lot for working on a fix for this.
> 
> I've just tried it and it does not seem to work, I still can't pass
> options to the icecast protocol using tee.
> 
> Command I tried was:
> 
> ffmpeg -re -i input.mov -c copy -f tee -password hackme -content_type
> audio/ogg -map 0:v -map 0:a
> "icecast://source@127.0.0.1:8888/test.ts|test.ts"

Please see the comments of the trac ticket, this issue is addressed.
Nothing in your command line says that -content_type applies to icecast
and not to the file output.

It was confirmed this change fixes the ticket. I will push it in a few
days if nobody finds an issue.

> On 2 Jun 2020, at 20:56, Nicolas George wrote:

Also please remember that top-posting is not accepted here.

Regards,
Marvin Scholz June 3, 2020, 11:29 a.m. UTC | #3
On 3 Jun 2020, at 11:49, Nicolas George wrote:

> Marvin Scholz (12020-06-03):
>> Hi, thanks a lot for working on a fix for this.
>>
>> I've just tried it and it does not seem to work, I still can't pass
>> options to the icecast protocol using tee.
>>
>> Command I tried was:
>>
>> ffmpeg -re -i input.mov -c copy -f tee -password hackme -content_type
>> audio/ogg -map 0:v -map 0:a
>> "icecast://source@127.0.0.1:8888/test.ts|test.ts"
>
> Please see the comments of the trac ticket, this issue is addressed.
> Nothing in your command line says that -content_type applies to icecast
> and not to the file output.

How would I make that explicit? I checked the command line given on the
ticket and I fail to spot the difference, did I get the order wrong or
do I miss something else?

>
> It was confirmed this change fixes the ticket. I will push it in a few
> days if nobody finds an issue.
>
>> On 2 Jun 2020, at 20:56, Nicolas George wrote:
>
> Also please remember that top-posting is not accepted here.

Sorry for that.

>
> Regards,
>
> -- 
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Nicolas George June 3, 2020, 11:33 a.m. UTC | #4
Marvin Scholz (12020-06-03):
> How would I make that explicit? I checked the command line given on the
> ticket and I fail to spot the difference, did I get the order wrong or
> do I miss something else?

Quote of the last comment:

| I tested your patch, it works perfectly.
|
| (as in, now
| "[content_type=video/webm]icecast://source:password@example.domain:8000/video.webm|savedVideo.webm"
| works as expected )

This the way to pass an option to an output.

Regards,
Marvin Scholz June 3, 2020, 11:42 a.m. UTC | #5
On 3 Jun 2020, at 13:33, Nicolas George wrote:

> Marvin Scholz (12020-06-03):
>> How would I make that explicit? I checked the command line given on 
>> the
>> ticket and I fail to spot the difference, did I get the order wrong 
>> or
>> do I miss something else?
>
> Quote of the last comment:
>
> | I tested your patch, it works perfectly.
> |
> | (as in, now
> | 
> "[content_type=video/webm]icecast://source:password@example.domain:8000/video.webm|savedVideo.webm"
> | works as expected )
>
> This the way to pass an option to an output.
>

Oh whoops I completely overlooked that and got confused by the command 
line on the
ticket itself.
That indeed works fine now with your patch, thanks a lot for the fix, as 
this
greatly simplifies sourcing different icecast mountpoints at once for 
testing.

> Regards,
>
> -- 
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Nicolas George June 4, 2020, 10:55 a.m. UTC | #6
Marvin Scholz (12020-06-03):
> Oh whoops I completely overlooked that and got confused by the command line
> on the
> ticket itself.
> That indeed works fine now with your patch, thanks a lot for the fix, as
> this
> greatly simplifies sourcing different icecast mountpoints at once for
> testing.

Thanks for the confirmation.

I just pushed the patch.

I think it is a candidate for back-porting.

Regards,
Nicolas George Aug. 9, 2020, 11:06 a.m. UTC | #7
Nicolas George (12020-06-02):
> Fix trac ticket #8705.
> 
> Signed-off-by: Nicolas George <george@nsup.org>
> ---
>  libavformat/tee.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> Not tested, I have no icecast server at hand. I will ask the reporter to
> test.

Ping? Will apply next time I think about it if nobody objects.

Regards,
Paul B Mahol Aug. 9, 2020, 12:28 p.m. UTC | #8
On 8/9/20, Nicolas George <george@nsup.org> wrote:
> Nicolas George (12020-06-02):
>> Fix trac ticket #8705.
>>
>> Signed-off-by: Nicolas George <george@nsup.org>
>> ---
>>  libavformat/tee.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>> Not tested, I have no icecast server at hand. I will ask the reporter to
>> test.
>
> Ping? Will apply next time I think about it if nobody objects.

No way, you need at least one other developer to support your patch(es).

>
> Regards,
>
> --
>   Nicolas George
>
Marvin Scholz Aug. 9, 2020, 12:59 p.m. UTC | #9
On 9 Aug 2020, at 13:06, Nicolas George wrote:

> Nicolas George (12020-06-02):
>> Fix trac ticket #8705.
>>
>> Signed-off-by: Nicolas George <george@nsup.org>
>> ---
>>  libavformat/tee.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>> Not tested, I have no icecast server at hand. I will ask the reporter to
>> test.
>
> Ping? Will apply next time I think about it if nobody objects.
>

I think I already wrote this back when the patch was proposed,
but I tested it and it works fine.
I dont think it can cause any issues in other cases either,
so LGTM.



> Regards,
>
> -- 
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Nicolas George Aug. 9, 2020, 1:31 p.m. UTC | #10
Marvin Scholz (12020-08-09):
> I think I already wrote this back when the patch was proposed,
> but I tested it and it works fine.
> I dont think it can cause any issues in other cases either,
> so LGTM.

Sorry, I fumbled my mailbox search, I had already applied this.

Regards,
diff mbox series

Patch

diff --git a/libavformat/tee.c b/libavformat/tee.c
index f2b11fcb35..c5c59975e6 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -295,7 +295,7 @@  static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
             goto end;
     }
 
-    ret = ff_format_output_open(avf2, filename, NULL);
+    ret = ff_format_output_open(avf2, filename, &options);
     if (ret < 0) {
         av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,
                av_err2str(ret));