Make screenshots with FFMPEG

I am using Wowza with a custom authetication method (mysql).

In my Flashplayer I connect to Wowza using:

nc.connect(‘rtmp://ip:80/app/inst’,userid,somehash);

if connection succeeds I publish a stream:

ns.publish(streamname);

This is working great! Now I want to connect with ffmpeg to this stream to take some screenshots now and then.

I am using the following command:

/usr/local/bin/ffmpeg -y -i “rtmp://ip:80/app/inst/streamname conn=S:userid conn=S:somehash” -frames:v 1 /home/01.png

This gives me the following error:

Unknown connect error (unsupported authentication method?)

[rtmp @ 0x39cdfc0] Server error: Connection failed: Application rejected connection.

I also tried:

/usr/local/bin/ffmpeg -y -i “rtmp://ip:80/app/inst/streamname conn=NS:PARAM1:userid conn=NS:PARAM2:somehash” -frames:v 1 /home/01.png

and also

/usr/local/bin/ffmpeg -y -i “rtmp://ip:80/app/inst/streamname” conn=NS:PARAM1:userid conn=NS:PARAM2:somehash -frames:v 1 /home/01.png

and a lot more other possibilities. What is going wrong? I also added something like live=1 but nothing helps.

I solved the connection, but know I need to know how to create a screenshot of it. Connection is made by adding the parameters to the url as a querystring ?userid&loginhash

It is beter to make screenshots client side!