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

Playing network stream #17

Closed
EduardMe opened this issue Jan 16, 2013 · 5 comments
Closed

Playing network stream #17

EduardMe opened this issue Jan 16, 2013 · 5 comments
Labels

Comments

@EduardMe
Copy link

Hi,

I have successfully compiled your project leaving out the subtitle libraries, which created some problems for me (1. I could not load submodules, it is asking me for a password for appunite, 2. building failed after sourcing the missing libraries from the original repos).

I can play local mp4 files with the ffmpeg example project on Android. But my goal is to play streams.

Im doing all my tests from the example project (so internet permissions are set, I double-checked it). I could not run the example http streams and I could not run a VLC http stream, although it works with the VLC app for android and from other computers and it works with the MediaPlayer class from Android.

I have also tried to play a rtp stream using ffmpeg as streamer and a sdp file to describe the stream. It looks like the spd file is successfully read and interpreted, but I always get following error message:

"Could not open video file: XXX (-1094995529: invalid data found when processing input)"

Furthermore I get this from ffmpeg:

Format sdp probed with size=2048 and score=50
video codec set to: mpeg4
'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)

Then it says it has problems to resolve the hostname. Im not getting this errors, when Im streaming from PC to PC using the same configuration (with different IPs obviously).

Can you help me to resolve these issues? How do I play RTP streams using a SDP file?

Thanks!

@jacek-marchwicki
Copy link
Member

  1. Do you have:
    [url "ssh://review.appunite.com"]
    insteadOf = https://review.appunite.com
    in your ~/.gitconfig ?
    if you have just remove those lines - those lines is only for people who have key on our company review system.
  2. I did not use RTP streams with ffmpeg - and I do not know if this works. But im quite sure that http streams work. (I do not know i live streams work too). To test simple streams just upload some mp4/h264 video file on your http server (apache2/Twisted) and it should work via url.
  3. This is some tip from ffmpeg "(pthread support is required)" - maybe you have to compile pthreads to ffmpeg?

@EduardMe
Copy link
Author

Hi Jacek,

thanks for the quick response.

  1. No this is the only thing I didnt try. But anyways, I could successfully build the project without fribidi, freetype and ass libraries. I commented out the #define SUBTITLES and got no errors. You think this could cause problems?
  2. In fact I just tried live streams. I will try this too.
  3. I have also tried a build with --enable-pthreads flag. It gave me the same error messages. Perhaps I missed out something.

Another thought: Live streaming produces a few error even in normal use, where it works. These errors are related to the fact that the player is not playing from the beginning and so not receiving headers or keyframes in time, but after some time. It also needs to figure out other settings as I can see from the command line. Perhaps the player implementation in Android is not that patient and throws an exception as soon as it doesnt all fit?

@EduardMe
Copy link
Author

One more finding:

I have modified udp.c to output the hostname given to the function. The output is:

"v=0"

Checking the sdp file, I find "v=0" in the second line:

SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 53.21.0
m=video 8888 RTP/AVP 96
b=AS:200
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1

Furthermore I have changed "v=0" to some ip address. In this case it gives me the first segment of the ip address. For example "127." for "127.0.0.1".

Im using the localhost address, because Im streaming directly to the client.

So it seems the SDP file is not correctly read for the IP-Address and this is why it can not resolve the hostname.

Any suggestions why? Where could I start debugging?

@jacek-marchwicki
Copy link
Member

  1. You can use this library safely without subtitles
  2. Are you sure that pthreads are compiled in? I do not know what this error exacly mean - maybe you have to ask some ffmpeg expoert or look in to source code of ffmpeg.

I do not know sdp. but http://helixforum.realnetworks.com/helix_support/topics/what_are_the_required_sdp_file_parameters_for_rtp_sdp_live_ingest_to_helix_universal_media_server - says that v=0 it is version number

just grep ffmpeg source code for your errors and maybe you will find something.

@fgal9363
Copy link

fgal9363 commented Jun 3, 2013

I'm having the same problems with the pthreads compilation.
I've enabled pthreads both in configure and build_android but I still get the same error.

'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)

Have you found any solution for that?

Thanks,

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

No branches or pull requests

3 participants