Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to force rtsp streaming using TCP mode? #1346

Closed
Tuzr opened this issue May 24, 2016 · 11 comments
Closed

How to force rtsp streaming using TCP mode? #1346

Tuzr opened this issue May 24, 2016 · 11 comments

Comments

@Tuzr
Copy link

Tuzr commented May 24, 2016

In the earlier version, we can use setAvOption( ) like below:
ijkMediaPlayer.setAvOption("rtsp_transport", "tcp");

But, the newer version didn't provide this function.
I had try
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "rtsp_transport", "tcp");
and
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp");

It doesn't work for me. Could someone tell me how to solve it ?

Any advice is appreciated, Thanks.

@bbcallen
Copy link
Contributor

Actually, rtsp is disabled by default in later version. You need to enable it manually, see README.

@Tuzr
Copy link
Author

Tuzr commented May 24, 2016

@bbcallen
Thanks, I know that.
At first, I use the "module-default.sh" to init.
And I use the ijkplayer-example project to play rtsp streaming on my Android device. It works.
But I had some parameters those have to set in the earlier version, like "rtsp_transport" in TCP mode.

@bbcallen
Copy link
Contributor

Sorry, no idea. I'm not familiar with rtsp.
You can add some log in libavformat/rtsp.c to see if options are passed down correctly.

@Tuzr
Copy link
Author

Tuzr commented May 24, 2016

@bbcallen
Thanks for advice ! I will try it.

@huanglongyu
Copy link

@Tuzr
hello, have u solved this problem?

@Tuzr
Copy link
Author

Tuzr commented Jun 6, 2016

@huanglongyu
Finally, I solve it by below
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp");
You can see it use tcp mode on log.

@huanglongyu
Copy link

@Tuzr
I used tcp mode, it does not work. It almost 1-2s delay , same as before
In ur first comment u said that did not work either, is there some othre option u setted?
and may I know the delay in ur project now?

@Tuzr
Copy link
Author

Tuzr commented Jun 6, 2016

@huanglongyu
At first,I had some problem but it's not the same as tcp, anyway it's a misunderstanding.
Finally I use this option, and see the log with TCP mode.
I use it to play a webcam streaming, the delay is also about 1~2 sec, maybe even more.

@huanglongyu
Copy link

@Tuzr
copy that, thanks

@spaul13
Copy link

spaul13 commented Feb 19, 2018

@Tuzr @bbcallen @Tuzr I need to use the rtsp streaming using TCP. I have a video stored on the server and one server code running on the server machine. Can you tell me how to use ijkplayer so that it would fetch the video accordingly and display it on the phone after decoding and making it as frame_texture?
I just want to know how to use the rtsp streaming using TCP

@Tuzr
Copy link
Author

Tuzr commented Feb 21, 2018

@spaul13
I've not update for several years,
as I mentioned at 2016 like below, it was success at that time.
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants