how to authenticate using rtmpsink

Peter Maersk-Moller pmaersk at gmail.com
Thu Nov 12 07:58:53 PST 2015


Hi Yakov.

You are probably getting closer. However I hope the username and password
in your example are not yours ....

You might try use FLME and then inspect the URL passed by FLME  using
Wireshark or tcpdump etc.
That's how I did with YouTube, UStream, Twitch and Akamai in the past.

In my previous post, I also list the slashver I use for YouTube/Ustream. It
was different from the one for Akamai. You may want to try out different
versions and perhaps throw in a couple of '%20' as shown in the flashver
example. It may or may not be needed.

Bets regards

Peter MM

On Thu, Nov 12, 2015 at 4:19 PM, Yakov Sudeikin <yakovs at setplex.com> wrote:

> Thank you, good to know I am on the right path, bt here is my command:
>
> GST_DEBUG=2 gst-launch-1.0 -v --gst-debug=flvmux:0,rtmpsink:0 videotestsrc
> pattern=0 is-live=true !  'video/x-raw, format=(string)BGRA,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> framerate=30/1, width=1280, height=720' ! queue ! videoconvert ! x264enc
> bitrate=64 bframes=0 ! h264parse !
> 'video/x-h264,level=(string)4.1,profile=main' ! queue ! mux. audiotestsrc
> is-live=true ! 'audio/x-raw, format=(string)S16LE, endianness=(int)1234,
> signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100,
> channels=(int)2' ! queue ! faac bitrate=128000 ! aacparse !
> 'audio/mpeg,mpegversion=4,stream-format=raw' ! queue ! flvmux
> streamable=true name=mux ! queue ! rtmpsink 'location=rtmp://
> p.ep343383.i.akamaientrypoint.net/EntryPoint/testakamai_1_1200 at 395960
> live=true pubUser=395960 pubPasswd=KgNbUF
> flashver=FMLE/3.0(compatible;FMSc/1.0)'
>
>
> this either crashes silently (core dumped) or says:
>
> 0:00:02.714325843 11713      0x1534320 ERROR                   rtmp :0::
> PublisherAuth, Authentication failed: unknown auth mode: [
> AccessManager.Reject ] : [ authmod=adobe ] :
> ?reason=cannot_load_password_file
> 0:00:02.714489954 11713      0x1534320 ERROR                   rtmp :0::
> rtmp server requested close
>
> I looked all possible manuals (gstreamer, akamai, librtmp, stackoverflow),
> and cannot find anything about authentications methods or password_files.
>
> Thank you,
> Yakov
>
>
> On Thu, Nov 12, 2015 at 5:07 PM, Peter Maersk-Moller <pmaersk at gmail.com>
> wrote:
>
>> Hi Yakov
>>
>> You may find some useful information about using GStreamer to feed
>> Content Distributions Networks on this page
>> http://sourceforge.net/p/snowmix/wiki/Snowmix%20and%20CDNs/
>>
>> The trick is to compose a rather complicated location string. I haven't
>> tested the Akamai setup recently, so expect some changes needed. The
>> location string was reverse engineered using Wireshark.
>>
>> You need to set a couple of variables, here shown using bash
>>
>>     akamai_server='INSERT_YOUR_AKAMAI_SERVER_NAME_HERE'
>>     akamai_user='INSERT_YOUR_AKAMAI_USER_NAME_HERE'
>>     akamai_pass='INSERT_YOUR_AKAMAI_PASSWORD_NAME_HERE'
>>     flashver='FME/3.0%20(compatible;%20FMSc%201.0)'
>>     akamai_flashver="flashver=FMLE/3.0(compatible;FMSc/1.0) playpath=I4Ckpath_12 at 44448"
>>     stream_key="live=true pubUser=$akamai_user pubPasswd=$akamai_pass"
>>     location="rtmp://$akamai_server/EntryPoint $stream_key $akamai_flashver"
>>
>> It will be really helpful if you tell how far you get with this so I can
>> update the information.
>>
>> Best regards
>> Peter Maersk-Moller
>>
>> On Thu, Nov 12, 2015 at 2:14 PM, Yakov Sudeikin <yakovs at setplex.com>
>> wrote:
>>
>>> I cannot find any info on how to auth with user/password to the akamai
>>> server using rtmpsink.
>>>
>>> I tried various schemes:
>>>
>>> location=rtmp://server/app/play pubUser=user pubPaswd=pwd
>>>
>>> location=rtmp://user:pass@server/app/play
>>>
>>> location=rtmp://server/app/play user=user pasword=pwd
>>>
>>> location=rtmp://server/app/play?user=user&pasword=pwd
>>>
>>> g_object_set(rtmp_elem, "pubPaswd", pwd, NULL)
>>>
>>> ....
>>>
>>> nothing seems to work, I get "server closed the connection" message
>>> immediately form akamai.
>>>
>>> or should I write to librtmp mail list instead?
>>>
>>> thank you
>>> Yakov
>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151112/620ca026/attachment.html>


More information about the gstreamer-devel mailing list