:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/android.sdp} :sout-keep
Firstly, "vb=0" and "scale=1" don't seem correct. I remember something about transcode{} needing at least scale or vb set in order to work.
1) if I create the stream from VLC this work ok, but if I create by command line this work fine but the local player start to playback the streaming and I don't need it on the server.
I think adding "-I dummy" to your command (at the beggining, right after "vlc.exe" or "vlc") will make this command run only on on sout and not on display.
2) I want to make possible restart automatically the streaming if the source disconnect for some reason.
Depending on your source (HTTP? RTSP?) you would set "--http-reconnect=true" after your "sout" (see the VLC man page for more details). In my experience, this hasn't worked properly so I was forced to write a shell script that would check every minute to see if the output was dead and then kill/restart VLC.