Closed mhcpan closed 8 years ago
Version 5.0.0 has not been officially published on github, it is somewhat difficult to get help for her here, because here is for version 4.x.
I have the same problem, with streaming and local audios, and rtmp links too. The log shows "THREAD AUDIO_DECODE START", but I cat't hear anything. The same for all my devices. I would keep vitamio 4.2 but google sent us an email about to update vitamio because of security problems with 4.2 version...
Having the same issue here. 4.x works fine, 5.x will go through the process of starting the stream up, but none of the callbacks are ever fired except for OnInfoListener. The other messages aren't even sent;- It's not that the callbacks aren't registered, it's that handleMessage in Vitamio's MediaPlayer class isn't called with anything other than with the 'what' code 200 (MEDIA_INFO). Forcing the stream to start manually once the logs indicate it's ready does nothing.
I don't want to go back to 4.x, but as there's no other working alternative, it may be that we have no option but to do so until 5.x actually works. And if it's not done by the 14th March deadline put in by google, well, we'll have to find a way around it. Which is SO not ideal.
Same issue here. Please resolve problem with audio streaming.
12-27 20:04:26.865 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: FIND_NAME_SYM ffmpeg, ff_ass_split
12-27 20:04:26.865 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: FIND_NAME_SYM ffmpeg, ff_ass_split_dialog
12-27 20:04:26.865 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: FIND_NAME_SYM ffmpeg, ff_ass_split_free
12-27 20:04:26.865 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: FIND_NAME_SYM ffmpeg, av_close_input_file
12-27 20:04:26.866 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: LOAD FFMPEG END: /data/user/0/ro.package_name/lib/libffmpeg.so
12-27 20:04:26.866 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: LOAD VVO START: /data/user/0/ro.package_name/lib/libvvo.9.so
12-27 20:04:26.873 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: FIND_NAME_SYM vvo, render_yuv
12-27 20:04:26.873 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: LOAD VVO END: /data/user/0/ro.package_name/lib/libvvo.9.so
12-27 20:04:26.873 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: LOAD VAO START: /data/user/0/ro.package_name/lib/libvao.0.so
12-27 20:04:26.876 21057-25200/ro.package_name I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
12-27 20:04:26.879 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: LOAD VAO END: /data/user/0/ro.package_name/lib/libvao.0.so
12-27 20:04:26.880 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: VPLAYER INIT BEGIN
12-27 20:04:26.880 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0
12-27 20:04:26.880 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: Application package name: ro.package_name
12-27 20:04:26.880 21057-21057/ro.package_name D/Vitamio[5.0.0][Player]: RENDER RGB
12-27 20:04:26.880 21057-25208/ro.package_name D/Vitamio[5.0.0][Player]: THREAD NOTIFY START
12-27 20:04:26.886 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: VPLAYER INIT END
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: CPU implementer:0x51
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: CPU architecture:7
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: processor:3
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: BogoMIPS:38.40
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: Revision:0000
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: CPU revision:1
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: Serial:0000000000000000
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: Hardware:Qualcomm MSM8974PRO-AC
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: CPU variant:0x2
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: Processor:ARMv7 Processor rev 1 (v7l)
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: Features:swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32
12-27 20:04:26.886 21057-25208/ro.package_name D/Vitamio[Player]: CPU part:0x06f
12-27 20:04:26.887 21057-25208/ro.package_name D/Vitamio[Player]: CPU architecture: 7
12-27 20:04:26.887 21057-25208/ro.package_name D/Vitamio[Player]: GET CPU FATURE: V5TE V6 VFP V7A VFPV3 NEON
12-27 20:04:27.563 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: stop player, stop to play
12-27 20:04:27.563 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: stop
12-27 20:04:27.563 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: stop called in state 1
12-27 20:04:27.565 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: Copyright (c) YIXIA (http://yixia.com).
THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-27 20:04:27.565 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0
12-27 20:04:27.565 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: Application package name: ro.package_name
12-27 20:04:27.565 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: SURFACE INIT FAILED
12-27 20:04:27.565 21057-21057/ro.package_name D/Vitamio[5.0.0][Player]: prepare
12-27 20:04:27.565 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: PREPARE SIG: 0
12-27 20:04:27.566 21057-21057/ro.package_name I/Vitamio[5.0.0][Player]: start
12-27 20:04:27.566 21057-21057/ro.package_name E/Vitamio[5.0.0][Player]: start called in state 4
12-27 20:04:27.567 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: THREAD PREPARE START
12-27 20:04:27.567 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: THREAD PREPARE ATTACHED
12-27 20:04:27.568 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: Copyright (c) YIXIA (http://yixia.com).
THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-27 20:04:27.568 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0
12-27 20:04:27.568 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: OPEN FILE http://mobile.url_stream_here.ro:8127
12-27 20:04:27.629 21057-25228/ro.package_name E/Vitamio[5.0.0][Player]: [aac @ 0xb37ffc00] channel element 1.14 is not allocated
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: Input #0, aac, from 'http://mobile.url_stream_here.ro:8127':
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: Metadata:
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-notice1 :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: <BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-notice2 :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-name :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: Station name
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-genre :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: christian
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-url :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: http://www.url_stream_here.ro
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-pub :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: 1
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: icy-br :
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: 64
12-27 20:04:27.646 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: StreamTitle :
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: Nelu Andresoi - Track 10 [ www.url_stream_here.ro ]
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: StreamUrl :
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: http://www.url_stream_here.ro
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: Duration:
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: N/A
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: , bitrate:
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: 52 kb/s
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: Stream #0:0
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: : Audio: aac (HE-AAC), 44100 Hz, stereo, fltp, 52 kb/s
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: METADATA: <BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR> Mobilechristianhttp://www.url_stream_here.ro164[ www.url_stream_here.ro ]http://www.url_stream_here.ro
12-27 20:04:27.647 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: META AUDIO: 0. und, META SUBTITLE:
12-27 20:04:27.647 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: FIND CODEC_ID 86018
12-27 20:04:27.647 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: WOW: BRILLIANT C COUNT 4
12-27 20:04:27.649 21057-25228/ro.package_name D/Vitamio[5.0.0][Player]: OPEN CODEC aac
12-27 20:04:27.649 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: OPEN STREAM AUDIO BEGIN
12-27 20:04:27.650 21057-25233/ro.package_name D/Vitamio[5.0.0][Player]: THREAD AUDIO_DECODE START
12-27 20:04:27.650 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: Copyright (c) YIXIA (http://yixia.com).
THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
12-27 20:04:27.650 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0
12-27 20:04:27.650 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: Application package name: ro.package_name
12-27 20:04:27.650 21057-25228/ro.package_name I/Vitamio[5.0.0][Player]: 2, 48000, 0
12-27 20:04:27.659 21057-21057/ro.package_name I/Vitamio[Player]: Info (704, 0)
12-27 20:04:27.660 21057-21057/ro.package_name W/info listener: 704 0
Please resolve this issue.
And one another issue when i comile my android package in Android M says that libffmpeg has text realocations, how to solve this ?
@iosifnicolae2 I have the same problem, and the video has been unable to play.
i have the same problem too, and i'm getting error with if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) return;
@brdn
From Demo source change
if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) return;
to
Vitamio.isInitialized(this);
i tried already but can'T hear nothing
This will work on "onCreate" method :
Vitamio.isInitialized(getApplicationContext());
is same, can't hear nothing..
this work : @Override public boolean onInfo(MediaPlayer arg0, int arg1, int arg2) { android.util.Log.d("onInfo", ""+arg1); switch (arg1) { case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK : long buffersize=mPlayer.audioTrackInit(); mPlayer.audioInitedOk(buffersize); break; case MediaPlayer.MEDIA_INFO_UNKNOW_TYPE: Log.e(" VITAMIO--TYPE_CHECK stype not include onInfo mediaplayer unknow type "); break;
case MediaPlayer.MEDIA_INFO_BUFFERING_START:
if (mListener != null)
mListener.onBufferStart();
else
mPlayer.pause();
break;
case MediaPlayer.MEDIA_INFO_BUFFERING_END:
if (mListener != null)
mListener.onBufferComplete();
else
mPlayer.start();
break;
case MediaPlayer.MEDIA_INFO_DOWNLOAD_RATE_CHANGED:
if (mListener != null)
mListener.onDownloadRateChanged(arg2);
break;
}
return true;
}
buitienhd91
would you able to upload a sample code how you implement public boolean onInfo(MediaPlayer arg0, int arg1, int arg2) ??
i tried with your code, and it doesnt work,
it basically won't trigger mPlayer.start()
dowload : https://github.com/crossle/VitamioMediaPlayerDemo VideoActivity.java if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) return; change to
PlayerService.java change to: @Override public boolean onInfo(MediaPlayer arg0, int arg1, int arg2) {
switch (arg1) {
case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK:
long buffersize = mPlayer.audioTrackInit();
mPlayer.audioInitedOk(buffersize);
break;
case MediaPlayer.MEDIA_INFO_UNKNOW_TYPE:
Log.e(" VITAMIO--TYPE_CHECK stype not include onInfo mediaplayer unknow type ");
break;
case MediaPlayer.MEDIA_INFO_BUFFERING_START:
if (isPlaying()) {
if (mListener != null) {
mListener.onBufferStart();
} else {
mPlayer.pause();
}
needResume = true;
}
break;
case MediaPlayer.MEDIA_INFO_BUFFERING_END:
if (needResume) {
if (mListener != null) {
mListener.onBufferComplete();
} else {
mPlayer.start();
}
}
break;
case MediaPlayer.MEDIA_INFO_DOWNLOAD_RATE_CHANGED:
if (mListener != null) {
mListener.onDownloadRateChanged(arg2);
}
break;
}
return true;
}
Thanks, buitienhd91 I met the same problem, and I solved it by add only the following lines in the playService.java @Override public boolean onInfo(MediaPlayer mp, int what, int extra) { switch (what) { case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK: // line added 1 long buffersize = mPlayer.audioTrackInit(); // line added 2 mPlayer.audioInitedOk(buffersize); // line added 3 break; // line added 4
By the way, I just use it playing online audio stream. Now, with the version 5.0, I found it is buffering more quickly than before.
Hi buitienhd91, i replaced if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) return; to Vitamio.isInitialized(getApplicationContext());
but my playerservice is different, how should i change it?
public void playMusic(final String url){
location = radioListElement.getFrequency();
MainActivity.setViewPagerSwitch();
MainActivity.startBufferingAnimation();
MainActivity.getStartOrStopBtn().setImageResource(R.drawable.pause);
try {
mediaPlayer.reset();
mediaPlayer.setDataSource(url);
mediaPlayer.prepareAsync();
urlUpdater = url;
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
mediaPlayer.start();
MainActivity.stopBufferingAnimation();
//MainActivity.getRadioListLocation().setText(radioListElement.getFrequency());
//urlUpdater = url;
}
});
} catch (IOException e) {
e.printStackTrace();
}
}
}
log; 01-02 16:44:56.870: I/Vitamio[5.0.0]Player: OPEN STREAM AUDIO BEGIN 01-02 16:44:56.871: I/Vitamio[5.0.0]Player: Copyright (c) YIXIA (http://yixia.com). 01-02 16:44:56.871: I/Vitamio[5.0.0]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 01-02 16:44:56.871: I/Vitamio[5.0.0]Player: Vitamio Version 5.0.0 01-02 16:44:56.871: I/Vitamio[5.0.0]Player: 2, 48000, 0 01-02 16:44:56.871: D/Vitamio[5.0.0]Player: THREAD AUDIO_DECODE START 01-02 16:44:56.891: I/VitamioPlayer: Info (704, 0)
but can't hear nothing
Hi brdn, I reckon that you should add lines like:
mediaPlayer.setOnInfoListener(listener);
when you implement the listener add the code: case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK: long buffersize = mPlayer.audioTrackInit(); mPlayer.audioInitedOk(buffersize); break;
wish the above would help you.
tonyliuxt thank so much, it's worked with this method, and now is working more faster than vitamio 4.2
Hi @brdn @tonyliuxt , my player code is
private void play(String url) {
try {
RaddioApplication.PLAYER_STATE = StreamService.RADIO_STATE_CONNECTING;
sendStateChanged(StreamService.RADIO_STATE_BUFFERING);
RaddioApplication.radioPlayer.reset();
RaddioApplication.radioPlayer.setDataSource(url);
RaddioApplication.radioPlayer.prepareAsync();
RaddioApplication.radioPlayer
.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
mediaPlayer.start();
try {
RaddioApplication.createNotification(RaddioApplication
.getInstance().getApplicationContext(),
RaddioApplication._radio);
} catch (Exception e) {
}
sendStateChanged(StreamService.RADIO_STATE_PLAYING);
}
});
} catch (IOException e) {
e.printStackTrace();
}
}
my log also is
01-04 11:04:37.864: D/Vitamio[5.0.0][Player](11314): THREAD AUDIO_DECODE START
What should i change it? Thank you very much!!
try this,
private void play(String url) { try { RaddioApplication.PLAYER_STATE = StreamService.RADIO_STATE_CONNECTING; sendStateChanged(StreamService.RADIO_STATE_BUFFERING); RaddioApplication.radioPlayer.reset(); RaddioApplication.radioPlayer.setDataSource(url); RaddioApplication.radioPlayer.prepareAsync(); RaddioApplication.radioPlayer .setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mediaPlayer) { mediaPlayer.start(); try { RaddioApplication.createNotification(RaddioApplication .getInstance().getApplicationContext(), RaddioApplication._radio); } catch (Exception e) { }
sendStateChanged(StreamService.RADIO_STATE_PLAYING);
}
});
} catch (IOException e) {
e.printStackTrace();
}
mediaPlayer.setOnInfoListener(new MediaPlayer.OnInfoListener() {
@Override
public boolean onInfo(MediaPlayer mp, int what, int extra) {
// TODO Auto-generated method stub
switch (what) {
case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK:
long buffersize = mediaPlayer.audioTrackInit();
mediaPlayer.audioInitedOk(buffersize);
break;
}
return false;
}
});
}
@brdn you're a genius!! Thank you!!
no no, the @tonyliuxt is genius :)
I'm debugging, but onPrepared is not called. No need to use onPrepared method ? Are only these codes needed ?
case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK:
long buffersize = mediaPlayer.audioTrackInit();
mediaPlayer.audioInitedOk(buffersize);
thank you
@nskr
you need that codes in @Override public boolean onInfo(MediaPlayer arg0, int arg1, int arg2) { .... }
you can have a look at https://github.com/ahpiau18/StreamPlayerVitamio5 i have created a simple Android project
@ahpiau18 Yes, have been able to make audio streaming work. Thanks a ton for the solution.
Now one issue is that 5.0 doesn't play mms(WMA) streams, even though 4.0 used to work on that. e.g. try the stream mms://onair1.xdevel.com/RadioNorba_32
Getting error - E/Vitamio[5.0.0]Player: avformat_open_input: Protocol not found : -1330794744
Any ideas on that?
Any
Thanks guys, u guys solutions works like a charm.
HI I add Vitamio 5 and I got this error with Vitamio 4 All it's OK "Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2"
@tonyliuxt thank you so much ))
How to play audio stream rtmp? Thank you.
@nisit15 rtmp working without problems.. did you tried?
Yes, I try use Playback is not work.
HashMap<String, String> options = new HashMap<String, String>(); options.put("rtmp_playpath", "fsb"); options.put("rtmp_swfurl", "http://www.cdn-br.com/swf/player.swf"); options.put("rtmp_live", "1"); options.put("rtmp_pageurl", "http://www.cdn-br.com/mastertv/FSB.htm"); mediaPlayer.setDataSource("rtmp://31.204.153.72/live/", options);
Do you have code example?
please help me,Thank you.
จาก: Berdan notifications@github.com ส่ง: 7 มีนาคม 2559 1:25 ถึง: yixia/VitamioBundle สำเนาถึง: Nisit ชื่อเรื่อง: Re: [VitamioBundle] vitamio 5.0 not working with adio streaming (#337)
@nisit15https://github.com/nisit15 rtmp working without problems.. did you tried?
— Reply to this email directly or view it on GitHubhttps://github.com/yixia/VitamioBundle/issues/337#issuecomment-192954576.
hi @nisit15 what is the error? did you checked sample from @ahpiau18 ? https://github.com/ahpiau18/StreamPlayerVitamio5
I can run sample above, After that I try change
streamAudio("rtmp://lb-media.mcot.net:1935/MCOTRadio");
in code line 40; It's not working, How to play this stream audio? Thank you.
จาก: Berdan notifications@github.com ส่ง: 7 มีนาคม 2559 19:53 ถึง: yixia/VitamioBundle สำเนาถึง: Nisit ชื่อเรื่อง: Re: [VitamioBundle] vitamio 5.0 not working with adio streaming (#337)
hi @nisit15https://github.com/nisit15 what is the error? did you checked sample from @ahpiau18https://github.com/ahpiau18 ? https://github.com/ahpiau18/StreamPlayerVitamio5
— Reply to this email directly or view it on GitHubhttps://github.com/yixia/VitamioBundle/issues/337#issuecomment-193237267.
Hi @nisit15 try m3u url http://rstream.mcot.net:8000/am1494.m3u :) or try rtmp://lb-media.mcot.net:1935/MCOTRadio/am1494.stream
Great! this link is can play rtmp://lb-media.mcot.net:1935/MCOTRadio/am1494.stream Thank you sir. :+1:
we face when play songs(Play songs from SDCARD) and we are forward song /previous songs when some time it throw Unfortunate error "getDuration INVALID STATE : 4" .and also we we play songs from sdCard so please help us.
@tonyliuxt: I'm facing weird issue in my app. We face problems with next/previous actions while playing songs one after another. Below is my code. It would be really great help, if you can suggest something to fix it. I'm playing songs from SD card or Device memory. I'm not playing it online/stream.
Here is my code please help me play audio file from sdcard/Memorycard. this code for play songs . and this code is write in playservice.java file.
mp_bg.reset();
mp_bg.setDataSource(list_all_songs.get(index).get("data"));
mp_bg.prepareAsync();
mp_bg.setPlaybackSpeed(ftr_speed);
mp_bg.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
try {
mp_bg.start();
Log.d("Test&Trace","Call MedaiPlayer Start");
eq = new Equalizer(0, mp_bg.getAudioSessionId());
bass_boost = new BassBoost(0, mp_bg.getAudioSessionId());
reverb = new PresetReverb(0, mp_bg.getAudioSessionId());
String str_genre = list_all_songs.get(index).get("genre");
if (str_genre.equals("")) {
if (is_eq) {
Log.e("service", "" + is_eq);
eq_setup();
}
} else {
setgenrepreset(str_genre);
}
if (is_bass) {
bass_setup();
}
if (is_reverb) {
reverb_setup();
}
}catch (Exception e){e.printStackTrace();}
}
});
mp_bg.setOnInfoListener(new MediaPlayer.OnInfoListener() {
@Override
public boolean onInfo(MediaPlayer mp, int what, int extra) {
switch (what) {
case MediaPlayer.MEDIA_INFO_FILE_OPEN_OK: // line added 1
Log.d("XXX", ">>>>>>>>>>>>>>>>>>>>>>>> onInfo: MEDIA_INFO_FILE_OPEN_OK");
long buffersize = mp_bg.audioTrackInit(); // line added 2
mp_bg.audioInitedOk(buffersize); // line added 3
break;
case MediaPlayer.MEDIA_INFO_UNKNOW_TYPE:
Log.e("Test&Trace"," VITAMIO--TYPE_CHECK stype not include onInfo mediaplayer unknow type ");
break;
}
return true;
}
});
Useing this code we play songs but when we forward or previous the songs when It stop "unfortunately app" so we trace the error when it give "E/Vitamio[5.0.0][Player]: getDuration INVALID STATE : 4" so please help us.
Hi, I'm again. vitamio can play this link http://www.bbc.co.uk/worldservice/meta/tx/nb/live/eneuk.pls ?
Basically the issue was solved by @buitienhd91
@nisit15, suggest you read @buitienhd91 and @tonyliuxt post to get an idea.
Hello Developers,
I am using vitamio 5.0 version, but the rtmp streaming in not working,
Please help me out. Here is my logs -
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: VPLAYER RELEASE BEGIN
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: player release, set exit. do not send message again
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: prepare pthread_cancel / pthread_kill 0
05-03 12:58:48.941: D/Vitamio[5.0.0]Player: PREPAREHANDLER 12
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: THREAD PREPARE DETTACHED, ret = 0
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: prepare pthread_join 0
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FILE CLOSE BEGIN
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FREE VIDEOPIC BEGIN
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FREE VIDEOPIC 2 END
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FREE SUBPIC BEGIN
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FREE SUBPIC 1 END
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FREE AUDIOFRAME BEGIN
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FREE AUDIOFRAME 8 END
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: DELETE GLOBAL REF BEGIN
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: DELETE GLOBAL REF END
05-03 12:58:48.941: I/Vitamio[5.0.0]Player: FILE CLOSE END
05-03 12:58:49.021: D/Vitamio[5.0.0]Player: THREAD NOTIFY END
05-03 12:58:49.021: I/Vitamio[5.0.0]Player: VPLAYER RELEASE END
Can any one help me to playing audio using vitameo. I just update new version 5.0 also replace :+1: Vitamio.isInitialized(MainActivity.this); But still audio is not playing and show above image exception. i am attaching my playing Async class here.
@pmrajani
Vitamio.isInitialized(MainActivity.this);
should be
Vitamio.isInitialized(getApplicationContext());
@brdn It it possible to upload app on splay store using old SDK? Bcz it was working fine with old SDK but google now reject my app with new version 5.0.
Mail from Form Google play store
@pmrajani vitamio < v5.0.1 is outdated on Google Play https://www.nowsecure.com/blog/2015/08/10/world-writable-code-is-bad-mmmmkay/
vitamio > 5.0.1 dont have support for OpenSSL vitamio < 5.0.0 have outdated OpenSSL, Google reject it too.
we need a severals changes, i cant compile my own ffmpeg, because libvplayer not compatible with custom versions of ffmpeg.
now, you only can continue on vitamio if u dont need Google play. https://github.com/yixia/VitamioBundle/issues/367
@FloridaStream hey buddy, i want to put my app on play store in which i need to play rtmp streaming. pleases give me best solution. I am new in android as well this streaming and android native things.. Please help me out....
Guys, start to use ExoPlayer from Google. This player is lightweight and is very fast.
@iosifnicolae2 hi buddy, Does ExoPlayer supports RTMP streaming ?
@iosifnicolae2 can u check if you can play this stream rtmp://znstv1.sunisp.net:1935/live/zns1 using exoplayer. please
I can't test, download that all and change rtmp stream..
@iosifnicolae2 Hi buddy again, i successfully run the exo-player sample project. But the problem i'm facing is blowing up my mind. I can successfully play this one "rtmp://ossrs.net:1935/live/livestream" this is the link which is given in sample itself but when i try to play this "rtmp://znstv1.sunisp.net:1935/live/zns1" i am only getting audio no video. But this link is working and showing video if I use Vulnerable Vitamio library.. Can you help me out why is this happening.
I cannot use audio streaming with vitamio 5.0 Test url: http://46.252.33.58:9410
logcat: 12-16 01:07:19.387: I/Vitamio[5.0.0]Player: OPEN FILE http://46.252.33.58:9410 12-16 01:07:19.397: D/VitamioPlayer: CPU implementer:0x41 12-16 01:07:19.397: D/VitamioPlayer: CPU architecture:7 12-16 01:07:19.397: D/VitamioPlayer: processor:3 12-16 01:07:19.397: D/VitamioPlayer: BogoMIPS:1592.52 12-16 01:07:19.397: D/VitamioPlayer: Revision:0002 12-16 01:07:19.397: D/VitamioPlayer: CPU revision:0 12-16 01:07:19.397: D/VitamioPlayer: Serial:93e39fed42f78601 12-16 01:07:19.397: D/VitamioPlayer: Hardware:SMDK4x12 12-16 01:07:19.397: D/VitamioPlayer: Chip revision:0011 12-16 01:07:19.397: D/VitamioPlayer: CPU variant:0x3 12-16 01:07:19.397: D/VitamioPlayer: Processor:ARMv7 Processor rev 0 (v7l) 12-16 01:07:19.397: D/VitamioPlayer: Features:swp half thumb fastmult vfp edsp neon vfpv3 tls 12-16 01:07:19.397: D/VitamioPlayer: CPU part:0xc09 12-16 01:07:19.397: D/VitamioPlayer: CPU architecture: 7 12-16 01:07:19.397: D/VitamioPlayer: GET CPU FATURE: V5TE V6 VFP V7A VFPV3 NEON 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: Input #0, mp3, from 'http://46.252.33.58:9410': 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: Metadata: 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: icy-notice1 : 12-16 01:07:21.392: D/Vitamio[5.0.0]Player:
This stream requires http://www.winamp.com/">Winamp 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: icy-notice2 : //some info omitted for easy reading 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: : Audio: mp3, 22050 Hz, stereo, s16p, 64 kb/s 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: META AUDIO: 0. und, META SUBTITLE: 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: FIND CODEC_ID 86017 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: WOW: BRILLIANT C COUNT 4 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: OPEN CODEC mp3 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: OPEN STREAM AUDIO BEGIN 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: Copyright (c) YIXIA (http://yixia.com). 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: Vitamio Version 5.0.0 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: Application package name: com.xxx.yyy 12-16 01:07:21.392: I/Vitamio[5.0.0]Player: 2, 48000, 0 12-16 01:07:21.392: D/Vitamio[5.0.0]Player: THREAD AUDIO_DECODE START 12-16 01:07:21.412: I/VitamioPlayer: Info (704, 0)
It just stop there and never start play the stream. i.e. onPrepared never be called.
Can anyone help?