Page 1 of 1
How to use TCP connect first
Posted: 27 May 2013 05:40
by richard.kang
Hi,
I am new here,hello!
I have a question . I want VLC for Android connect my camera use TCP,but I find that VLC for Android use UDP first.Only when UDP fail it will use TCP.
How can I use TCP at the first time?
Thanks in advance.
Re: How to use TCP connect first
Posted: 27 May 2013 12:46
by edwardw
What streaming protocol do you use?
Re: How to use TCP connect first
Posted: 28 May 2013 03:12
by richard.kang
What streaming protocol do you use?
I use RTSP protocol.
My camera only accept TCP,so I have to wait for about 20s then VLC can connect with camera.That's too long.
Do you have any idea?
Thanks.
Re: How to use TCP connect first
Posted: 04 Jun 2013 09:51
by Sébastien Escudier
there is an option to force rtsp tcp
It's In the GUI.
Or in command line : --rtsp-tcp
Re: How to use TCP connect first
Posted: 06 Jun 2013 03:15
by richard.kang
I can not found the command line...
and I found no option in the GUI...
Can you show me the code please?
Re: How to use TCP connect first
Posted: 06 Jun 2013 04:08
by edwardw
Add "--rtsp-tcp" to the list around line 512 on vlc-android/jni/libvlcjni.c
Re: How to use TCP connect first
Posted: 07 Jun 2013 10:23
by richard.kang
Add "--rtsp-tcp" to the list around line 512 on vlc-android/jni/libvlcjni.c
I have added like this:
const char *argv[] = {
"-I", "dummy",
"--no-osd",
"--no-video-title-show",
"--no-stats",
"--no-plugins-cache",
"--no-drop-late-frames",
"--avcodec-fast",
"--avcodec-threads=0",
"--rtsp-tcp=true",
"--subsdec-encoding", subsencodingstr,
enable_time_stretch ? "--audio-time-stretch" : "--no-audio-time-stretch",
use_opensles ? "--aout=opensles" : "--aout=android_audiotrack",
"--androidsurface-chroma", chromastr != NULL && chromastr[0] != 0 ? chromastr : "RV32",
"--rtsp-tcp",
};
But,it still take 13s to start the video.
Re: How to use TCP connect first
Posted: 07 Jun 2013 13:47
by edwardw
You don't need the =true part
Re: How to use TCP connect first
Posted: 08 Jun 2013 03:14
by richard.kang
Thank you edwardw .
I have tried for many times.Like "--rtsp-tcp",change this code to other line.But it's still not work.