After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759863 - rtmpsink fails to authorize with rtmp server
rtmpsink fails to authorize with rtmp server
Status: RESOLVED DUPLICATE of bug 787102
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-25 15:37 UTC by Tapas Kumar Kundu
Modified: 2018-01-18 17:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
logs from only librtmp and rtmpsink (3.00 KB, text/plain)
2015-12-26 17:01 UTC, Tapas Kumar Kundu
Details
logs from only librtmp and rtmpsink (2.90 KB, text/plain)
2015-12-26 17:05 UTC, Tapas Kumar Kundu
Details

Description Tapas Kumar Kundu 2015-12-25 15:37:35 UTC
I can use ffmpeg to broadcast to following rtmp url but gstreamer rtmpsink always fails to broadcast with following rtmp url.

rtmp://USERIDHIDDEN:PASSWORDHIDDEN@mtvnyc.dyndns.tv/AAAAAA/BBBBB/CCCCCC


however, rtmpsink always works if I go to another server use a diferent url without user id and password. 

This causes rtmpsink to be unusable with any rtmp server which needs user id and password for authentication.
Comment 1 Sebastian Dröge (slomo) 2015-12-26 10:49:57 UTC
Try with
> "rtmp://USERIDHIDDEN:PASSWORDHIDDEN@mtvnyc.dyndns.tv/AAAAAA/BBBBB/CCCCCC live=1"

Note the space before live. There seem to be some bugs in librtmp that require such things.
Comment 2 Sebastian Dröge (slomo) 2015-12-26 10:50:24 UTC
If this still doesn't work, please provide a debug log with everything from rtmpsrc and librtmp.
Comment 3 Tapas Kumar Kundu 2015-12-26 16:45:56 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> Try with
> > "rtmp://USERIDHIDDEN:PASSWORDHIDDEN@mtvnyc.dyndns.tv/AAAAAA/BBBBB/CCCCCC live=1"
> 
> Note the space before live. There seem to be some bugs in librtmp that
> require such things.

I already tried it before reporting bug here :) . This does not work.

How do i enable all logging specifically only for librtmp and rtmpsink ?
Comment 4 Tapas Kumar Kundu 2015-12-26 17:01:34 UTC
Created attachment 317897 [details]
logs from only librtmp and rtmpsink

(In reply to Sebastian Dröge (slomo) from comment #2)
> If this still doesn't work, please provide a debug log with everything from
> rtmpsrc and librtmp.

I used GST_DEBUG=*rtmp*:9 to enable all logs only for both rtmpsink and librtmp.
Comment 5 Tapas Kumar Kundu 2015-12-26 17:05:41 UTC
Created attachment 317898 [details]
logs from only librtmp and rtmpsink

(In reply to Sebastian Dröge (slomo) from comment #2)
> If this still doesn't work, please provide a debug log with everything from
> rtmpsrc and librtmp.

I used GST_DEBUG=*rtmp*:9 to enable all logs only for both rtmpsink and librtmp.

I hidded password/userid
Comment 6 Tim-Philipp Müller 2015-12-27 16:26:19 UTC
This doesn't look like a GStreamer problem?

rtmp :0:: RTMP_Connect0, failed to connect socket. 110 (Connection timed out)
Comment 7 Tapas Kumar Kundu 2015-12-27 16:30:12 UTC
(In reply to Tim-Philipp Müller from comment #6)
> This doesn't look like a GStreamer problem?
> 
> rtmp :0:: RTMP_Connect0, failed to connect socket. 110 (Connection timed out)

If you look into ffmpeg code then you will see that it is doing authorization for user id/password . You can pass same url to ffmpeg. ffmpeg has this code in 

https://www.ffmpeg.org/doxygen/2.5/rtmpproto_8c.html#a9a7e091fd7ebaac40c3f908a229d03c7 


Isn't that gstreamer should also do in same way ?
Comment 8 Sebastian Dröge (slomo) 2015-12-28 08:42:34 UTC
librtmp does not have this API, you're looking at ffmpeg's internal RTMP implementation there.

It seems like librtmp is no longer properly maintained and ffmpeg's internal RTMP support got lots of changes for problems like this. Someone would have to either pick up librtmp development, or someone will have to write a new RTMP plugin around some other library.
Comment 9 Tapas Kumar Kundu 2015-12-28 15:41:40 UTC
(In reply to Sebastian Dröge (slomo) from comment #8)
> librtmp does not have this API, you're looking at ffmpeg's internal RTMP
> implementation there.
> 
> It seems like librtmp is no longer properly maintained and ffmpeg's internal
> RTMP support got lots of changes for problems like this. Someone would have
> to either pick up librtmp development, or someone will have to write a new
> RTMP plugin around some other library.

I think that gstreamer needs to write some plugin which can handle authentication. Otherwise, it is embarrassing to see some authentication is working in ffmpeg smoothly but gstreamer does not support it (although gstreamer has more nice audio-video sync feature than ffmpeg). 


Any idea when we can get more enhancement in gstrtmpsink ready for handling this authentication ?
Comment 10 Sebastian Dröge (slomo) 2015-12-28 15:55:10 UTC
When you implement it, or someone else who needs it enough to spend time on implementing it.

There's also http://cgit.freedesktop.org/~ds/gst-rtmp/ which could be used as a base for a better implementation.
Or someone could extract a better librtmp library from the code in ffmpeg.
Comment 11 Tapas Kumar Kundu 2015-12-28 15:59:56 UTC
(In reply to Sebastian Dröge (slomo) from comment #10)
> When you implement it, or someone else who needs it enough to spend time on
> implementing it.
> 
> There's also http://cgit.freedesktop.org/~ds/gst-rtmp/ which could be used
> as a base for a better implementation.

Does this new gstrtmp2sink.c has authentication support for user id / password ? Could you please point me to code / function call where authentication needs to be done. 

It will be faster if you help me to understand/implement this authentication. 

I also want to know what other features you have in new gstrtmp2sink.c ? 


Thanks you so much.
Comment 12 Sebastian Dröge (slomo) 2015-12-28 16:05:00 UTC
I don't know the code myself, but to get that code in a useable state you have to understand all of it anyway. There's more work needed to get that releasable.
Comment 13 Tapas Kumar Kundu 2015-12-28 17:02:33 UTC
(In reply to Sebastian Dröge (slomo) from comment #12)
> I don't know the code myself, but to get that code in a useable state you
> have to understand all of it anyway. There's more work needed to get that
> releasable.

hmm . what about existing gstrtmpsink.c ? . You told me that this code has better implementation  than existing code (see #comment 10). Can you please explain why you think that it has better implementation ?
Comment 14 Sebastian Dröge (slomo) 2015-12-29 08:26:16 UTC
It's having better network code, the one in librtmp is rather suboptimal. The new code is missing a lot of cleanup and features so far though, but it would be more future-proof
Comment 15 Damian Ziobro 2017-08-31 20:40:00 UTC
Tapas,
 Please find a patch attached to this ticket: https://bugzilla.gnome.org/show_bug.cgi?id=787102

It may also solve this issue.
Comment 16 Tim-Philipp Müller 2018-01-18 17:50:11 UTC

*** This bug has been marked as a duplicate of bug 787102 ***