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

RtmpClient unable to properly read stream #70

Closed
ojw28 opened this issue Jun 25, 2018 · 7 comments
Closed

RtmpClient unable to properly read stream #70

ojw28 opened this issue Jun 25, 2018 · 7 comments

Comments

@ojw28
Copy link

ojw28 commented Jun 25, 2018

This issue was originally reported here: google/ExoPlayer#4319

It appears RtmpClient is unable to read rtmp://76.81.29.11:1935/live/Cam2 correctly. To verify the issue is in RtmpClient I did the following:

  • Capture a dump of the stream using rtmpdump (command line tool). Side load this file onto an Android device and verify it can be played correctly using ExoPlayer.
  • Capture a dump of the stream using LibRtmp (on device). Try and play this. It cannot be played correctly, and shows the same behavior as when trying to play the stream directly in ExoPlayer.
@Srinu-try
Copy link

Hi,

I am facing the above issue with librtmp library used in ExoPlayer.

Request your help in this regard.

@woehrl
Copy link

woehrl commented Nov 18, 2019

Hi,

seems like this problem is still not fixed, right? I have a HD video stream (rtmp) without any audio stream and it just does not play back. If I add a nullsrc audio then it works, but that adds more processing power and time that I don't have available.
The stream looks like this: https://a.uguu.se/Oj8rdrFDO7v3_rtmp_h264_noaudio.flv

Requesting help! Best regards...

@ojw28
Copy link
Author

ojw28 commented Nov 18, 2019

The link you've provided above plays fine for me. It's also an https link rather than rtmp? I'm not sure how it's related to LibRtmp?

@woehrl
Copy link

woehrl commented Nov 18, 2019

Thank you for your swift reply! yes, the file plays perfectly in media players (MPC, VLC). I stored the rtmp stream to a file (raw conversion in VLC) for you to have a look at the stream - what might be wrong with it. I'm using librtmp within ExoPlayer on Android, already using latest release 3.1.0. I could provide you a direct link to the stream source via PN.

@umangsaini
Copy link

Few FLV files signal that both A and V tracks are available, when in fact only Video is available. This creates A/V tracks which will not play if Audio samples are not present.

Can you check in
Exoplayer FlvExtractor.java -> readFlvHeader() if
boolean hasAudio = (flags & 0x04) != 0;

If hasAudio flag is set true for your FLV file, then Video only playback will be an issue. FFMPEG is able to play such content over RTMP.

@woehrl
Copy link

woehrl commented Nov 18, 2019

Ok, I managed to clone the repo and included it in my project. That way I could perfectly detect if the flv headers set an audio track.

I found out that my gstreamer pipeline including the flvmux element did NOT add an audio stream, but the receiving nginx-rtmp module by default sets an audio track as given even if there is none in the input stream: url

So I just had to set meta copy; in my nginx server configuration. Now it works!

Thank you very much for your input! Best regards, Florian

@ojw28
Copy link
Author

ojw28 commented Nov 18, 2019

Glad you were able to resolve this! I'm going to close this issue because I think it was fixed by #75, and was left open by accident :).

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