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

Is there a way to retrieve metadata from a shoutcast stream? #11

Closed
romainpiel opened this issue Feb 26, 2013 · 17 comments
Closed

Is there a way to retrieve metadata from a shoutcast stream? #11

romainpiel opened this issue Feb 26, 2013 · 17 comments

Comments

@romainpiel
Copy link

First, thanks for this great lib, it's awesome!
I'm currently trying to retrieve Metadata from a Icy/Shoutcast. I could do it with a parallel request but I'd love to make it more convenient. Are you planning to make something like:

MediaPlayer player = new MediaPlayer(this);
player.setOnMetadataListener(this);

Cheers

@crossle
Copy link
Contributor

crossle commented Feb 27, 2013

You can use io.vov.vitamio.MediaMetadataRetriever ? is it satisfy you ?

@romainpiel
Copy link
Author

Oh does this work with icy/shoutcast streams?

@crossle
Copy link
Contributor

crossle commented Feb 27, 2013

streams? what you wanna do ?

@romainpiel
Copy link
Author

Basically I'm streaming audio with your media player. It is working very well but I'd like to retrieve the metadata as well. This is usually described in the headers of the stream (Icy-MetaData and icy-metaint). See the Shoutcast metadata protocol description for more details.

@romainpiel
Copy link
Author

Anyway, the app is crashing on this line in an activity:

MediaMetadataRetriever retriever = new MediaMetadataRetriever(this);

@crossle
Copy link
Contributor

crossle commented Feb 27, 2013

error log? you wanna get Titles?

@romainpiel
Copy link
Author

Yeah I wanna get the stream titles.
I'm not sure what line to give you from the error log. Maybe that will help: https://gist.github.com/RomainPiel/5047214

@romainpiel
Copy link
Author

Apparently I'm missing that class:

java.lang.NoClassDefFoundError: io/vov/vitamio/MediaScanner

@crossle
Copy link
Contributor

crossle commented Feb 27, 2013

It's a bug...

@romainpiel
Copy link
Author

Ok, no problem.
One thing, it would be good to have some kind of listener instead of the extractMetadata way. A live stream can update its metadata constantly and we wouldn't know when to check whereas the listener would notify when a metadata has be found.

@crossle
Copy link
Contributor

crossle commented Feb 27, 2013

But you can try add /src/io/vov/vitamio/MediaScanner.java to VitamioBundle ?

@romainpiel
Copy link
Author

Ok, where do I find this class?
Oh, do you mean an empty file?

@crossle
Copy link
Contributor

crossle commented Feb 27, 2013

ok. empty file , you can try? I not sure if get title?

@romainpiel
Copy link
Author

Ok if I use an empty file it doesn't crash but I've got an exception after when running extractMetadata:

Native method not found: io.vov.vitamio.MediaMetadataRetriever.extractMetadata:(I)Ljava/lang/String;

@0proto
Copy link

0proto commented May 14, 2013

I've faced similar issue when trying to generate Thumbnail for video file:

Bitmap thumb = ThumbnailUtils.createVideoThumbnail(this,f.getAbsolutePath(),ThumbnailUtils.MINI_KIND);

When i'm trying it without empty MediaScanner class, following error appearing:

05-14 13:13:53.205: ERROR/dalvikvm(10499): ERROR: couldn't find native method
05-14 13:13:53.205: ASSERT/libc(10499): Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1)

I've created the empty MediaScanner.java class in io.vov.vitamio package, then i get following errors:

05-14 13:17:14.454: ERROR/dalvikvm(10657): ERROR: couldn't find native method
05-14 13:17:14.454: ERROR/dalvikvm(10657): Requested: Lio/vov/vitamio/MediaScanner;.processDirectory:(Ljava/lang/String;Ljava/lang/String;)V
05-14 13:17:14.464: ERROR/Vitamio[Player](10657): UNLOAD FFMPEG Symbol not found:
05-14 13:17:18.514: ERROR/Vitamio[Scanner](10657): avformat_open_input: Is a directory : -21

Could you please suggest any workaround for this?

@0proto
Copy link

0proto commented May 14, 2013

Sorry, i've noticed from the faq this is not supported in vitamio.
http://www.vitamio.org/en/docs/FAQ/2013/0509/11.html

@cedricfung
Copy link

Checkout Vitamio 4.0 https://github.com/yixia/VitamioBundle/tree/v4.

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