yixia / Vitamio-iOS

Vitamio for iOS
http://www.vitamio.org/en/
451 stars 176 forks source link

No audio after 5-10 seconds playing video live stream in device #3

Closed vminc closed 10 years ago

vminc commented 10 years ago

When I play a video stream, it works fine on simulator, but when I build on device, the following problem always happen:

My device is iPhone5, running iOS 6.1.

EchoLiao commented 10 years ago

Pls submit your stream url for us to test or locate that problem..

vminc commented 10 years ago

The stream URL is http://112.197.2.11:1935/live/vtv3.stream/playlist.m3u8. Thanks!

EchoLiao commented 10 years ago

is this URL valid? we can't play it with any player even in PC player or browser. But we can download the m3u8 file, the m3u8 file may be invalid.

EchoLiao commented 10 years ago

I tested it again and can play now. it have problem with VMDecodingSchemeSoftware decoding scheme as you push above.

To solve this problem just change decoding scheme to VMDecodingSchemeQuickTime,

- (void)mediaPlayer:(VMediaPlayer *)player setupManagerPreference:(id)arg
{
    player.decodingSchemeHint = VMDecodingSchemeQuickTime;
}
vminc commented 10 years ago

Thanks for your help! Will this solution work for all video formats or it only works for quickTime format?

EchoLiao commented 10 years ago

All formats. btw, You don't need worry about it, even if vitamio failed with VMDecodingSchemeQuickTime, it also auto change to other scheme.

vminc commented 10 years ago

Thanks !

vminc commented 10 years ago

The problem still happens even if I use VMDecodingSchemeQuickTime. Here's the stream I used to test rtmp://113.161.212.25/live/atv1

The audio only disappears if I don't pause/start the player during buffering :

However if I pause/start the player like above, the video player does not play as smooth as vitamio for Android under the same network condition. The buffer size I used is 200 000.

kirti301290 commented 8 years ago

@vminc i tried to play rtmp file using this SDK but does no play i passed Options key keys[0] = @"-rtmp_live"; vals[0] = @"-1";

pls reply me i tried to play to many time pls.