podlove / podlove-publisher

Podlove Podcast Publisher for WordPress
https://wordpress.org/plugins/podlove-podcasting-plugin-for-wordpress/
MIT License
299 stars 84 forks source link

Read chapter marks from audio XMP metadata #891

Closed cloo closed 7 years ago

cloo commented 7 years ago

Expected behavior

You provide an asset with XMP metadata, containing chapter marks (e.g. generated by Adobe Audition). Podlove recognizes them and automatically uses for player, without need to manually enter names and miliseconds.

Actual behavior

Podlove does not search XMP metadata for chapter marks.

System information (see Podlove > Support menu)

Website http://aiksteje.lt PHP Version 5.6.24 WordPress Version 4.6.1 WordPress Theme Aikštėje v0.0.1 Publisher Version 2.4.0.build259 Web Player Version 2.1.0 Twig Version 1.28.1 open_basedir /home/archfond/:/tmp:/usr/share/pear curl Version 7.19.7 iconv available simplexml ok max_execution_time 300 upload_max_filesize 64M memory_limit 256M disable_classes
disable_functions link, symlink, exec, passthru, proc_close, proc_get_status, proc_open, shell_exec, system, popen, pclose permalinks ok (/%year%/%monthnum%/%day%/%postname%/) podlove_permalinks ok podcast_settings ok web_player ok podlove_cache on assets
  - mp3 audio/mpeg http://aiksteje.lt/feed/mp3/ cron ok

0 errors 1 NOTICE (no dealbreaker, but should be fixed if possible):

eteubert commented 7 years ago

Duration should be extracted automatically, no matter which metadata format is used.

However, other metadata like chapter marks in XMP oder id3tags require the whole file (or at least a significant portion). Since most of the time the audio files are on a different server than the Podlove Publisher, downloading them just to extract metadata is not feasible.

timpritlove commented 7 years ago

Can Adobe Audition export XMP data to a separate XMP file?

cloo commented 7 years ago

Can't find or gogle out how to export xmpp separately. I suppose you can't.
If I understand well, to read metadata from the file body, you only need a buffer to process the file once, so you don't have to store the file permanently. And I'm not so sure that most of time audio files are on different server. In my case they aren't. Maybe this feature could be optional?

timpritlove commented 7 years ago

Parsing binary files is much more complicated and error prone than parsing pure XML. If there is a wa to export XMP as a pure XML file, we mught be able to put it in the list of our import file formats for chapter files (a new UI for this is coming in Publisher 2.5). If it can't be exported I don't see we can reliably integrate this.

cloo commented 7 years ago

Oh, there actually is something like that in Audition: File>Export>"FCP XML interchange format", which does contain chapter data. Attaching sample file (renamed to .txt, because .xml uploads not allowed).

sample.xml.txt

cloo commented 7 years ago

And even more: .sesx files, which are native Audition session files, are also xml-ish, and also contain chapter data. Attaching another sample, .txt -ified again. However, both methods provide different timestamps, and none of them seem to be in miliseconds.. I'd go for some more testing, if encouraged.

sample.sesx.txt

timpritlove commented 7 years ago

The Audition session file is a step forward and it actually contains the XMP data. But Unfortunately it is (for whatever reason) encapsulated in a CDATA section and therefore needs to be imported in an unnecessary and weird two-step process (extracting the CDATA section, writing it to a file, re-importing that file). The chapter information is in there (in RDF).

The "FCP XML Interchange format" (XMEML) is actually much easier to parse and might be an easier approach to supporting this. It's actually a legacy file format as Final Cut Pro X has moved forward to a new format (FCPXML).

Please note that GitHub is not the place for feature requests (but I am happy to discuss this with you). But I am going to close this thread now and have opened a feature request for the XMEML format here: https://community.podlove.org/t/feature-request-import-chapter-information-from-final-cut-pro-xmeml-files/773