View previous topic :: View next topic |
Author |
Message |
mavmike
Joined: 07 Mar 2009 Posts: 15
|
Posted: Wed Sep 15, 2010 12:22 am Post subject: ices2 OGG song titles as filename? |
|
|
Hi, when I run Ices2 ogg files it sometimes fails to get the song title metadata.
How do I make it fall back on displaying the filename whenever it fails to make a song title? because it lists : "Current Song" as blank on ogg files that do not have metadata
atleast the filename is something |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Sep 15, 2010 1:39 am Post subject: |
|
|
You can use vorbiscomment to add tags to a file. The problem with using a filename for the setting is that it is vague.
karl. |
|
Back to top |
|
|
mavmike
Joined: 07 Mar 2009 Posts: 15
|
Posted: Wed Sep 15, 2010 2:49 am Post subject: |
|
|
can you please explain how vorbiscomment can add a song title where there would otherwise be none? I dont see how that helps. ty |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Sep 15, 2010 2:43 pm Post subject: |
|
|
check the args for specifics but you could use something like
vorbiscomment -a file.ogg -t "ARTIST=Some Guy" -t "TITLE=A Title"
karl. |
|
Back to top |
|
|
mavmike
Joined: 07 Mar 2009 Posts: 15
|
Posted: Wed Sep 15, 2010 9:15 pm Post subject: |
|
|
that wont work when I dont know what songs people will put on their playlists.
do you know of what line of code in the .c files I can perhaps add the filename as the song title, then if it finds metadata it could just update it again? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Sep 15, 2010 9:47 pm Post subject: |
|
|
modifying the code for that is not trivial, the trunk ices2 code only decodes the headers to get timing information, it won't rebuild the stream afterwards. The kh build does break down the comment packet but doesn't modify it but you would need to know the details of the handling for that.
I suspect the easiest solution would be to do a check of the new files (with ogginfo) and see which don't have a title (or whatever you require to be there). With that filtered list you then use vorbiscomment to add the filename into the comments.
karl. |
|
Back to top |
|
|
mavmike
Joined: 07 Mar 2009 Posts: 15
|
Posted: Wed Sep 15, 2010 10:09 pm Post subject: |
|
|
thanks Karl, that was very helpful. I added 'ogginfo' to all playlist entries then vorbiscomment TITLE=filename when they were missing a TITLE. That is sufficient enough for it to display a title when it gets to that song.
kinda sux that every song has to be checked for this, perhaps next ices2 release can fix that inside
kinda like shoutcast |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Sep 15, 2010 10:37 pm Post subject: |
|
|
Its not the job of ices2 to guess the title of a track, the file may have multiple tracks within the same file or may have a filename that does not correspond to the content within it. Icecast does allow for metadata to be inserted via a separate url like shoutcast but that facility is just as limiting and you really should store metadata within the files themselves.
As a side note, if you are providing a service that allows users to upload content, you should really be checking at the point of uploading, for consistency like, is it a valid file, does the samplerate/channels match the expected settings, maybe bitrate checks and maybe a metadata check. This way the checking that I suggested is not run at all.
karl. |
|
Back to top |
|
|
|