Bug 58532 - Editing tags of oggs or mp3s with no tags at all fails
Summary: Editing tags of oggs or mp3s with no tags at all fails
Status: RESOLVED DUPLICATE of bug 57644
Alias: None
Product: kfile-plugins
Classification: Applications
Component: ogg (show other bugs)
Version: unspecified
Platform: FreeBSD Ports Linux
: NOR normal
Target Milestone: ---
Assignee: Multimedia Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-15 17:16 UTC by groot
Modified: 2004-10-19 16:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description groot 2003-05-15 17:16:24 UTC
Version:            (using KDE KDE 3.1.1a)
Installed from:    FreeBSD Ports

If you have an ogg file with no tags at all, or an mp3 file similar [1], then KMetaFileInfo cannot edit the tags on that file. In particular, you cannot set the tags on that file. This manifests itself particularly with juk which uses KMetaFileInfo(Item?) to set modified tags in the file. Way deep down in kdecore, when untagged files are opened to change the tags, the vc_something_open() call fails and the tags are not changed in the file.

This might be a bug in the underlying library. I'll file a wishlist for id3lib support as well.

[1] For example, oggenc track.wav will produce an ogg file with no tag information at all; oggenc track.wav -a "KDE" sets the artist tag to "KDE" and this file is editable normally.
Comment 1 Lauri Watts 2003-05-15 17:26:10 UTC
Seems to be the same with mp3 id3 tags - using lame with no options to encode a wav to an mp3, results 
in a file that you can't edit the metatags on with the right click -> properties dialog. 
 
I also managed to come up with a png file that has non-editable metainfo, so it doesn't seem to be an ogg 
only thing. 
Comment 2 Stephan Kulow 2003-05-15 19:14:23 UTC
Subject: Re:  New: Editing tags of oggs or mp3s with no tags at all fails

Am Thursday 15 May 2003 17:16 schrieb Adriaan De Groot:
>          Platform: FreeBSD Ports
>         OS/Version: Linux

You really shouldn't use FreeBSD ports on linux :)

Greetings, Stephan

Comment 3 groot 2003-05-15 23:21:25 UTC
Subject: Re:  Editing tags of oggs or mp3s with no tags at all fails

On Thursday 15 May 2003 19:14, you wrote:
> Am Thursday 15 May 2003 17:16 schrieb Adriaan De Groot:
> >          Platform: FreeBSD Ports
> >         OS/Version: Linux
>
> You really shouldn't use FreeBSD ports on linux :)

Why not? It's a tarball with an automatic configure script, some patches that 
help portability, and nothing else. It should build fine. Hey, if there's a 
debian userland for the FreeBSD kernel, we can make a KDE port for some linux 
variant. 

The problem for ogg files occurs in bool KOggPlugin::writeInfo(const 
KFileMetaInfo& info) const, in 
./kdemultimedia/kfile-plugins/ogg/kfile_ogg.cpp. The call to vcedit_open() 
fails with an ogg file with no tags. Following that leads to code in 
vcedit.c,

        if(ogg_sync_pageout(state->oy, &og) != 1)
        {
                if(bytes<CHUNKSIZE)
                        state->lasterror = "Input truncated or empty.";
                else
                        state->lasterror = "Input is not an Ogg bitstream.";
                goto err;
        }

but here I get lost in ogg internals.


Comment 4 groot 2003-05-16 01:00:46 UTC
Subject: Re:  New: Editing tags of oggs or mp3s with no tags at all fails

As part of the bugfix, perhaps we could add id3 support to the ogg file plugin 
(and similarly to the mp3 plugin). At least id3lib is a standard port on 
FreeBSD and seems pretty generic; it has sensible C++ bindings and a 
prototype implementation is now on my HDD. How about a HAVE_ID3LIB check, 
which would make the MetaFileInfo plugin work as follows:

(reading): if there is id3 data, use that, otherwise fallback to the (older?) 
ogg tags. Read the technical data from the ogg stream with the current code.

(writing): write id3 tags. The technical stuff never changes, so that doesn't 
need rewriting.

Comment 5 Scott Wheeler 2003-12-11 02:25:59 UTC
A few comments here:

An Ogg without a comment header is invalid -- you can't even play it.  Even if the comment header is empty it has to be there.

Second id3lib sucks.  Fortunately there's now TagLib.

And last writing id3 tags to an Ogg file is all kinds of bad.

Anyway -- I'm looking into this issue now, but it's a dupe of a bug reported earlier.

*** This bug has been marked as a duplicate of 57644 ***