-1

I am working with an application which would be play or stream an video through RTMP protocol using Wowza Media server. I am able to stream a video from device to wowza server using MediaLibDemos Everything is fine while streaming a video.

But, while playing a video from Wowza media server i am unable to play that video. It prints below log,

Code:

2014-08-04 16:31:36.585 RTMPStreamPlayer[3841:60b] ******************************************** connectControl: host = rtmp://58.68.93.211:1935/coder/
2014-08-04 16:31:36.589 RTMPStreamPlayer[3841:4a03] MPMediaDecoder -> playing: try to open the stream rtmp://58.68.93.211:1935/coder//Mobile27 ...
2014-08-04 16:31:36.591 RTMPStreamPlayer[3841:4a03] @@@@@@@@@@@@@@@@@@>>>> MPMediaDecoder -> openStream: (BEGIN)
[flv @ 0x13f4a00] Stream discovered after head already parsed
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[flv @ 0x13f4a00] negative cts, previous timestamps might be wrong
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[h264 @ 0xc02200] AVC: nal size 21102622
[h264 @ 0xc02200] missing picture in access unit with size 40
[flv @ 0x13f4a00] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
----------------------------------- FORMAT --------------------------------------------------
Input #0, flv, from 'rtmp://58.68.93.211:1935/coder//Mobile27':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p(tv), 320x240 [SAR 1:1 DAR 4:3], 24.42 fps, 24 tbr, 1k tbn, 48 tbc
Stream #0:1: Audio: none, 0 channels
Stream #0:2: Data: none
---------------------------------------------------------------------------------------------
[NULL @ 0xc09600] No codec provided to avcodec_open2()
2014-08-04 16:31:39.785 RTMPStreamPlayer[3841:4a03] MPMediaDecoder -> ERROR avcodec_open2() <audio> : Invalid argument
2014-08-04 16:31:39.786 RTMPStreamPlayer[3841:4a03] MPMediaDecoder -> playing: stream is not opened, wait about 1 sec
2014-08-04 16:31:40.349 RTMPStreamPlayer[3841:60b] ******************************************** connectControl: host = rtmp://58.68.93.211:1935/coder/
2014-08-04 16:31:40.856 RTMPStreamPlayer[3841:4a03] MPMediaDecoder -> playing: try to open the stream (null) ...
2014-08-04 16:31:40.858 RTMPStreamPlayer[3841:4a03] @@@@@@@@@@@@@@@@@@>>>> MPMediaDecoder -> openStream: (BEGIN)
2014-08-04 16:31:40.860 RTMPStreamPlayer[3841:4a03] MPMediaDecoder -> ERROR avformat_open_input() : Protocol not found
2014-08-04 16:31:40.861 RTMPStreamPlayer[3841:4a03] DEALLOC MPMediaDecoder

The streaming video plays fine through FlashRTMPPlayer on desktop browsers. But, also the application through iOS supports to stream rtmp://hsn.mpl.miisolutions.net/hsn-live01/mp4:420p500kB31

What may be problem in my case? Has anyone worked on this? How to fix this? Any help appreciated.

Thanks in Advance.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Praveenkumar
  • 24,084
  • 23
  • 95
  • 173

1 Answers1

-1

Finally, i have found a way to achieve this,

I have converted the rtmp protocol into HLS format as per Wowza Media System below setup instructions link,

  1. Reference Link 1

  2. Reference Link 2

For Ex : An, RTMP stream can play as HLS like below -

rtmp://yoururl:1935/yourappname/video

into

http://yoururl:1935/yourappname/video/playlist.m3u8

And, stream this url into my MPMoviePlayerController it works like charm.

Praveenkumar
  • 24,084
  • 23
  • 95
  • 173