How to use TCP connect first

VLC for Android and Chrome OS specific usage questions
richard.kang
New Cone
New Cone
Posts: 5
Joined: 27 May 2013 05:25

How to use TCP connect first

Postby richard.kang » 27 May 2013 05:40

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.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: How to use TCP connect first

Postby edwardw » 27 May 2013 12:46

What streaming protocol do you use?

richard.kang
New Cone
New Cone
Posts: 5
Joined: 27 May 2013 05:25

Re: How to use TCP connect first

Postby richard.kang » 28 May 2013 03:12

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.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: How to use TCP connect first

Postby Sébastien Escudier » 04 Jun 2013 09:51

there is an option to force rtsp tcp
It's In the GUI.
Or in command line : --rtsp-tcp

richard.kang
New Cone
New Cone
Posts: 5
Joined: 27 May 2013 05:25

Re: How to use TCP connect first

Postby richard.kang » 06 Jun 2013 03:15

I can not found the command line...
and I found no option in the GUI...
Can you show me the code please?

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: How to use TCP connect first

Postby edwardw » 06 Jun 2013 04:08

Add "--rtsp-tcp" to the list around line 512 on vlc-android/jni/libvlcjni.c

richard.kang
New Cone
New Cone
Posts: 5
Joined: 27 May 2013 05:25

Re: How to use TCP connect first

Postby richard.kang » 07 Jun 2013 10:23

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.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: How to use TCP connect first

Postby edwardw » 07 Jun 2013 13:47

You don't need the =true part

richard.kang
New Cone
New Cone
Posts: 5
Joined: 27 May 2013 05:25

Re: How to use TCP connect first

Postby richard.kang » 08 Jun 2013 03:14

Thank you edwardw .
I have tried for many times.Like "--rtsp-tcp",change this code to other line.But it's still not work.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 9 guests