#11275: (Audio) Metadata is wrongly exported and reimported with current format
resulting in data loss
--------------------------------------+----------------------------------
             Reporter:  mytait        |                     Type:  defect
               Status:  new           |                 Priority:  normal
            Component:  undetermined  |                  Version:  7.1
             Keywords:  ffmetadata    |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+----------------------------------
 Summary of the bug:

 i want to export audio metadata using the metadata muxer and reimport it
 later after processing and possibly re-enconding.

 https://ffmpeg.org/ffmpeg-all.html#ffmetadata

 Data is exported but the metadataformat reads only one key=value line at a
 time
 However, embedded metadata in files can be multi-line: e.g. song lyrics.
 that metadata is exported like this:

 {{{
 ;FFMETADATA1
 title=test title
 artist=test artist
 album_artist=test album artits
 lyrics=Lyrics line1
 Lyricsline2
 Lyricsline3
 comment=test song
 encoder=Lavf61.7.100
 }}}

 The "Lyricsline2" and "Lyricsline3" are exported to a new line and the
 import function ignores them as they seem to be keys without a value.
 Therefore the new file ends with only the first line "Lyrics line1".

 POSSIBLE FIX

 I found out that if i modify the resulting metadata export (it is a text
 file) adding unix like line continues then all lyrics are imported
 correctly:


 {{{
 ;FFMETADATA1
 title=test title
 artist=test artist
 album_artist=test album artits
 lyrics=Lyrics line1\
 Lyricsline2\
 Lyricsline3
 comment=test song
 encoder=Lavf61.7.100
 }}}





 How to reproduce:
 {{{
 % #extract metadata from mp3 with multiline lyrics to txt file
 % ffmpeg -i in_file_embedded.mp3 -c copy -map_metadata 0 -map_metadata:s
 0:s -map_metadata:s:a 0:s:a -f ffmetadata 1out_export.txt

 #embed metadata to another metadata empty mp3 file
 ffmpeg -i in_test_no_metadata.mp3 -f ffmetadata -i 1out_export.txt -c copy
 -map_metadata 1 out_embedded.mp3

 #extract the metadata again from the new embeddeed file. Lines are missing
 ffmpeg -i out_embedded.mp3 -c copy -map_metadata 0 -map_metadata:s 0:s
 -map_metadata:s:a 0:s:a -f ffmetadata 2out_export_missinglines.txt


 ffmpeg version
 ffmpeg version 7.1-full_build-www.gyan.dev
 }}}

 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11275>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to