[PATCH] mp4 and ipod metadata

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] mp4 and ipod metadata

Baptiste Coudurier
Hi all,

Atm current mp4 muxer writes non standard and itunes specific metadata.
I intend to change this behaviour and to writes these metadata only for
-f ipod output format.

3GP tags are not supported, but standardized, patch welcome ;)

If anyone can quote specs were metadata tags are defined for mp4, I'll
reenable metadata writing.

Thanks.

--
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA

Index: libavformat/movenc.c
===================================================================
--- libavformat/movenc.c (revision 13736)
+++ libavformat/movenc.c (working copy)
@@ -1187,15 +1187,18 @@
             break;
         }
 
-    if (!bitexact && (s->title[0] || s->author[0] || s->album[0] || s->year ||
+    if (!bitexact && (mov->mode == MODE_IPOD || mov->mode == MODE_MOV) &&
+        (s->title[0] || s->author[0] || s->album[0] || s->year ||
                       s->comment[0] || s->genre[0]  || s->track)) {
         offset_t pos = url_ftell(pb);
 
         put_be32(pb, 0); /* size */
         put_tag(pb, "udta");
 
+        if (mov->mode == MODE_IPOD) {
         /* iTunes meta data */
         mov_write_meta_tag(pb, mov, s);
+        } else
 
         if(mov->mode == MODE_MOV){ // the title field breaks gtkpod with mp4 and my suspicion is that stuff is not valid in mp4
             mov_write_string_tag(pb, "\251nam", s->title         , 0);

_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user