[FFmpeg-devel] [PATCH] Add four metadata tags to 3gp files

Derk-Jan Hartman hartman
Tue Sep 9 12:38:51 CEST 2008


On 9 sep 2008, at 10:48, John Kelley wrote:
>>
> FFmpeg is writing the strings in Unicode and AtomicParsely is writing
> them in plain ASCII.

This might depend on the language code. If the language code is in QT  
style, than the languagecode also determines the encoding (Mac Carbon  
style). If it is an ISO code, than the strings should be UTF-8 (or  
UTF-16 with BOM)

from VLC:

     if( p_mdhd->data.p_mdhd->i_language_code < 0x800 )
     {
         /* We can convert i_language_code into iso 639 code,
          * I won't */
         strcpy( language, MP4_ConvertMacCode( p_mdhd->data.p_mdhd- 
 >i_language_code ) );
         p_track->b_mac_encoding = true;
     }
     else
     {
         for( i = 0; i < 3; i++ )
             language[i] = p_mdhd->data.p_mdhd->i_language[i];
         language[3] = '\0';
     }

Note that all mp4/3gp files should be using UTF-8 and ISO language  
codes as far as I know. Still it might be possible that some use the  
QT style regardless.

DJ




More information about the ffmpeg-devel mailing list