Can't get Vorbis comment data out of HTTP stream

About encoding, codec settings, muxers and filter usage
Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 23 Nov 2007 18:03

Hi everyone,

The question is this: How do you display changing real-time Vorbis Comment data - Title, Artist, Album, etc. from an ogg-vorbis music file coming in via an HTTP stream to a browser?

Here's the back story and configuration information to assist you:

I have completed the set up of VLC on the remote server running Linux Red Hat and am streaming music files from a music directory via HTTP on port 8080 without issue. I have also successfully implemented the javascript on an HTML page to enable vlc.playlist.play(), vlc.playlist.togglePause() and vlc.playlist.stop(). So far so good.

Now we are ready to implement the next feature of the page and have hit a roadblock. We would like to add a "Now playing..." feature that shows:
1. The name of the track that is currently playing, with any other meta data attached to the file, and,
2. Be able to push the change out to the browser when the playlist moves to the next track.

We are working with ogg-vorbis music files encoded by oggenc. I have ensured that the ogg files do indeed have meta data of artist, title, album, etc. as part of the stream by opening the files from our remote Linux server via the Open Network... command (I'm running VLC locally on my office Mac as well) and I do see the meta data in the VLC Advanced Information panel under the "Vorbis Comment" drop down. All the data about the song is in this Vorbis Comment area. I just can't get a javascript function to work to pull the data.

I have noticed that typing help in the terminal brings up several interesting candidates to use in a javascript function to grab data. The methods "title" and "get_title" looked like what we needed and we tried hard to use them, but we have been unsuccessful at getting them to work.

Where should we look next for the answer to pulling the meta data, Title, Artist, Album, et al, from the ogg-vorbis comment area of an HTTP stream?

Thank you very much for your help!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can't get Vorbis comment data out of HTTP stream

Postby Jean-Baptiste Kempf » 23 Nov 2007 19:20

Do you have a sample ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Re: Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 23 Nov 2007 19:39

The html test page is:

http://www.triadinv.com/radio.html

I launched the stream with the command:

vlc -vvv /server-path/assets/_ogg/ --loop --sout '#standard{access=http,mux=ogg,dst=:8080}'

Thanks very much!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can't get Vorbis comment data out of HTTP stream

Postby Jean-Baptiste Kempf » 23 Nov 2007 19:47

Ok. I am afraid you will need to code those feature for the browser plugin.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can't get Vorbis comment data out of HTTP stream

Postby Jean-Baptiste Kempf » 23 Nov 2007 19:47

Btw, --sout-keep is your friend.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Re: Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 23 Nov 2007 20:44

Okay - I understand I will need to code that feature - where would you suggest I look for a sample implementation or idea of where to start?

Would this be done in javascript? Do I need to use a VLC macro? What would you suggest as a way to get started?

Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Re: Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 23 Nov 2007 21:31

For instance - when typing help in the command line while running vlc - the following is returned :

Code: Select all

+----[ Remote control commands ] | | add XYZ . . . . . . . . . . add XYZ to playlist | enqueue XYZ . . . . . . . queue XYZ to playlist | playlist . . . show items currently in playlist | play . . . . . . . . . . . . . . . . play stream | stop . . . . . . . . . . . . . . . . stop stream | next . . . . . . . . . . . . next playlist item | prev . . . . . . . . . . previous playlist item | goto . . . . . . . . . . . . goto item at index | clear . . . . . . . . . . . clear the playlist | status . . . . . . . . . current playlist status | title [X] . . . . set/get title in current item | title_n . . . . . . next title in current item | title_p . . . . previous title in current item | chapter [X] . . set/get chapter in current item | chapter_n . . . . next chapter in current item | chapter_p . . previous chapter in current item | | seek X . seek in seconds, for instance `seek 12' | pause . . . . . . . . . . . . . . toggle pause | fastforward . . . . . . . set to maximum rate | rewind . . . . . . . . . . set to minimum rate | faster . . . . . . . . faster playing of stream | slower . . . . . . . . slower playing of stream | normal . . . . . . . . normal playing of stream | f [on|off] . . . . . . . . . . toggle fullscreen | info . . . information about the current stream | get_time . . seconds elapsed since stream's beginning | is_playing . . 1 if a stream plays, 0 otherwise | get_title . . . the title of the current stream | get_length . . the length of the current stream
Are the below methods that are returned from the help command the place to start? I can't seem to get them to work for an http stream. Are they for CD's only?
get_title . . . the title of the current stream
title [X] . . . . set/get title in current item
title_n . . . . . . next title in current item
title_p . . . . previous title in current item

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can't get Vorbis comment data out of HTTP stream

Postby Jean-Baptiste Kempf » 23 Nov 2007 21:37

Btw, --sout-keep is your friend.
emphasis on that one.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can't get Vorbis comment data out of HTTP stream

Postby Jean-Baptiste Kempf » 23 Nov 2007 21:37

Yes, look at the mozilla and activex folder.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Re: Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 23 Nov 2007 21:51

Many thanks JB - will do.

Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Re: Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 23 Nov 2007 21:53

Forgive me - but when you refer to the ActiveX and Mozilla folders - where exactly are you referring to?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Can't get Vorbis comment data out of HTTP stream

Postby Jean-Baptiste Kempf » 23 Nov 2007 23:11

Forgive me - but when you refer to the ActiveX and Mozilla folders - where exactly are you referring to?
source code...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Nexco
New Cone
New Cone
Posts: 8
Joined: 22 Nov 2007 06:27

Re: Can't get Vorbis comment data out of HTTP stream

Postby Nexco » 24 Nov 2007 04:34

source code...
OK - are you talking about the source code for VLC? Many thanks.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests