#446427 id3v2: shouldn't try to add tags to things that aren't MP3s

Package:
id3v2
Source:
id3v2
Description:
command line id3v2 tag editor
Submitter:
Petter Reinholdtsen
Date:
2026-06-20 20:43:03 UTC
Severity:
normal
Tags:
#446427#5
Date:
2007-10-07 19:55:38 UTC
From:
To:
Package: hpodder
Version: 0.5.8

When using the video pod from
<URL:http://podkast.nrk.no/program/dagsrevyen.video.rss>, hpodder
download the files but corrupt them and rename them to drop the .mpeg
ending.  Todays file ended up as
'nrk_dagsrevyen_2007-1007-0700_14454.mp4.mp3' and file report 'MP3
file with ID3 version 2.3.0 tag' as the file content.  The file should
be an MPEG video file.

Happy hacking,

#446427#10
Date:
2007-10-07 21:26:50 UTC
From:
To:
I believe hpodder is doing the right thing.  If you look inside the RSS file,
you see:

      <enclosure
url="http://podkast.nrk.no/filer/dagsrevyen/nrk_dagsrevyen_2007-1001-0700_14319.mp4"
length="190822793" type="audio/mpeg" />


That is, the RSS feed is indicating that it's an MP3 audio file by virtue of
the audio/mpeg content type indication.

A completely user-controllable mechanism to manage the file renaming process
is in the works for a future version, but for now, I believe it is obeying
the information in the podcast feed.

#446427#15
Date:
2007-10-12 16:46:41 UTC
From:
To:
[John Goerzen]

Thanks for bringing this to my attention.  I've sent an email to NRK
asking them to change the type to video/mpeg, but suspect it might
take forever before a change.

But I must admit I do not share your belief that hpodder is doing the
right thing.  It is taking a working video file and corrupting it,
when it could see if the file actually was a MP3 or not, and only
modify it if it is an MP3.  Blindly trusting the mime type as reported
by the RSS file is obviously not completely safe, and detecting if the
file is an MP3 or not is fairly easy (for example by using the file
utility).

Happy hacking,

#446427#20
Date:
2007-10-12 17:45:35 UTC
From:
To:
I haven't seen anything that hpodder is actually corrupting the file.  Just
changing its name, right?

hpodder is not restricted to Linux, and things like that involve third-party
libraries that are not as portable as hpodder is.  Not to mention that this
approach is not completely reliable, either.  hpodder is naming things based
on what type the feed says they are, which I think is the best it can do.

I think that giving users the option to disable or alter the renaming on a
per-podcast basis is the best option here.  Wouldn't that solve it for you?

#446427#25
Date:
2007-10-12 18:10:09 UTC
From:
To:
[John Goerzen]

Ah, then I failed to explain the problem.  The files as downloaded
from NRK can be played as video files using vlc.  The files as stored
by hpodder can not.

'file' report "MP3 file with ID3 version 2.3.0 tag" after hpodder
saved the files, and "ISO Media, MPEG v4 system, 3GPP" when I fetch
the file.  This get me to conclude that hpodder corrupted the file, as
the file is no longer a video file.

The renaming isn't the problem.  The file content is the problem.  A
option per source to disable the rewriting of the file would solve the
problem, I suspect.

Happy hacking,

#446427#30
Date:
2007-10-12 18:48:28 UTC
From:
To:
Ahh.  Perhaps the problem is that id3v2 is actually accepting a file as
input, which it shouldn't.  Tagging may need to be disabled on this
entirely.  That is probably a bug both in hpodder and id3v2, which certainly
shouldn't tag something that's not an mp3.

You could verify this by temporarily symlinking id3v2 to /bin/true, and see
if you get the files OK after that.

#446427#35
Date:
2007-10-12 22:32:38 UTC
From:
To:
[John Goerzen]

Seem like it.

I tried this, and replacing id3v2 with /bin/true avoid corrupting the
video files.  After this change I was able to play the video files.

Happy hacking,

#446427#50
Date:
2026-06-20 20:41:24 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
id3v2, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 446427@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin A. Godisch <godisch@debian.org> (supplier of updated id3v2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 20 Jun 2026 21:17:11 +0200
Source: id3v2
Architecture: source
Version: 0.1.12+dfsg-10
Distribution: unstable
Urgency: low
Maintainer: Martin A. Godisch <godisch@debian.org>
Changed-By: Martin A. Godisch <godisch@debian.org>
Closes: 271311 390781 446427 681847 690543 782767 784064 848425 849558 849559
Changes:
 id3v2 (0.1.12+dfsg-10) unstable; urgency=low
 .
   * debian/patches/09_exit-code-on-error.patch: exit with a non-zero status
     when a file operand cannot be processed; a failing stat() now continues
     with the remaining operands instead of aborting the run. The list (-l/-R),
     strip (-d/-s/-D), remove-frame (-r) and convert (-C) paths likewise report
     failure through the exit status instead of always returning 0.
     Closes: #784064.
   * debian/patches/10_escape-colons-in-split-frames.patch: allow a literal
     colon to be embedded in the comment, lyrics, user-text and terms-of-use
     options by escaping it as "\:", and document the colon-separated syntax in
     the manual page. Closes: #390781, #681847. Thanks to John Jetmore for the
     patch.
   * debian/patches/11_skip-non-mpeg-files.patch: refuse to write a tag to
     files whose header matches a known non-audio container (MP4, Ogg, RIFF,
     FLAC, Matroska, ASF), which prepending an ID3v2 tag would corrupt.
     Closes: #446427.
   * debian/patches/12_manpage-document-standard-and-encoding.patch: document
     in the manual page that id3lib writes ID3 v2.3.0 (not v2.4) and how text
     fields are encoded. Closes: #849558.
   * debian/patches/13_manpage-reference-mid3v2.patch: mention mid3v2(1) as an
     actively maintained alternative in the manual page. Closes: #849559.
   * debian/rules: enable Large File Support (abi=+lfs) so that stat() succeeds
     on files with 64-bit inode numbers (e.g. on CIFS mounts) on 32-bit
     architectures. Closes: #690543.
   * debian/patches/14_txxx-keep-distinct-descriptions.patch: keep TXXX frames
     with distinct descriptions instead of replacing the first one regardless
     of description. Closes: #271311.
   * debian/patches/15_picture-cover-tagging.patch: add a -p/--picture option
     to set the front cover image (APIC), detecting the JPEG/PNG/GIF MIME type
     from the file contents without depending on libmagic. The new image is
     validated before any existing cover is removed and a failed -p aborts the
     file without rewriting it, so an unreadable or unsupported image can no
     longer destroy the picture already stored in the file. Closes: #782767.
     Thanks to Laurence Richert for the patch.
   * debian/patches/16_listing-newlines.patch: terminate the POPM and ENCR/GRID
     lines in the tag listing with a newline so the following frame no longer
     runs into the same line. Closes: #848425.
   * debian/tests/control: add regression tests covering the exit status on a
     missing operand, distinct TXXX descriptions, escaped colons, the non-MPEG
     refusal and cover-art round-tripping.
   * debian/control: set Rules-Requires-Root: no (the build needs no root).
Checksums-Sha1:
 74cfa1a053df96467a15cf020df97f3126c6d3e2 1906 id3v2_0.1.12+dfsg-10.dsc
 9652f12b91c0af7d0e3b9394d1a357de38b55354 29032 id3v2_0.1.12+dfsg-10.debian.tar.xz
 2c39b638ef42743a3fdefcb1c999e936e1eea669 6073 id3v2_0.1.12+dfsg-10_amd64.buildinfo
Checksums-Sha256:
 cafe03fcdc15e6f4dbae40e404c67be4011d686b7d59fe7d2059ce2f8aea78bc 1906 id3v2_0.1.12+dfsg-10.dsc
 9cb3ddb0814256468a3a6c1dfd6a5e390787af9dffc00d14675919755fc62132 29032 id3v2_0.1.12+dfsg-10.debian.tar.xz
 9bc3b15ca9446e8bf604c98ec46c8266e92a9e072dc0321265842d69e4dba43d 6073 id3v2_0.1.12+dfsg-10_amd64.buildinfo
Files:
 78d330d2612ee6a4e5c5017aa1afe36d 1906 sound optional id3v2_0.1.12+dfsg-10.dsc
 c40ef5a2a8626ec33fb5e90028bc7b8c 29032 sound optional id3v2_0.1.12+dfsg-10.debian.tar.xz
 401ce2bcf191fc87b02a0dabb2154916 6073 sound optional id3v2_0.1.12+dfsg-10_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJHBAEBCgAxFiEEGEIyO0/Pm5CZX6F/o1C5kfBaSFcFAmo26BgTHGdvZGlzY2hA
ZGViaWFuLm9yZwAKCRCjULmR8FpIV1LvD/40TA3ZCawTzk2IK0ZmVp6OL7LAs1iB
u8f9jXN0xyee4ZjqzFJL/cJ117BYJHKYNFeJaC3uJjaqOQbCFnScA4oi/KB0hbVS
dehCef6HrF609swFeMsgJT8pZyllDGvRTaES+v+WIzBQx3Zb1LhjJvqNX1S66qqR
temxPDgqEfNPR6Qu2QxUWyXO12KwyvBSPUoHrsDjJEbuou/sJprZQZzv76HGCDEJ
Hq+HhpalnJ3UYWdAeSNt7MUQAxZFeQKQjT58BLi2//J7QSgGbcLixrvPqmb3LZG5
/6QWhvJ+6M5yZBFoCcLb+EAXJZsd31u2OdK/d6IlUWcneNGsFbx4EK1AF4WyBVkX
0S8gmB//qNnKL9QltQPSZn5ZT2dET2tDE3KGGqzlMX9jU0VYlewJZT9JZro/TA0a
QDtt50oM0SLr3+mjDUkyUcqxfm6eE8/zLxrqHRA6H9i4qWC2qRb+4dU1bh11Axc3
M8anItNOgDMqG71ua8msFC7Lt6zdsPAxv5wQ3u5kPUqfALm6U4n1GGrS+ijiFKSd
EeWmQg5FNgsmwTcEzSJoP7Rfuk+xbQzPS+CS02pPNzmI2l49IKIpTr8n04GuAw2J
2VqFGgXWGoCSNj8Ct9Zvp6XcSXJaN3vNG1UhWlSIp8app1aI8Esqb9m24wzYoEBE
ihIOj0IRFxQPRQ==
=JRb+
-----END PGP SIGNATURE-----