Project

General

Profile

Actions

Bug #86934

closed

No rendering of audio files with "Text & Media" when they contain cover art

Added by Jeff C about 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid Styled Content
Target version:
-
Start date:
2018-11-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The issue https://forge.typo3.org/issues/86834 still exists.

It will work with simple mp3s, but not with files, that have cover art embedded, e.g. the windows example sounds. They are registered with file type "5".


Files

Tchaikovsky_Rococo_Var_orch.mp3 (3.01 MB) Tchaikovsky_Rococo_Var_orch.mp3 Working mp3 file Jeff C, 2018-11-19 11:08
1914_Redon_Zyklop_anagoria.JPG (6.75 MB) 1914_Redon_Zyklop_anagoria.JPG Attached Cover Art Image Jeff C, 2018-11-19 11:09
Tchaikovsky_Rococo_Var_orch_IMAGE.mp3 (9.75 MB) Tchaikovsky_Rococo_Var_orch_IMAGE.mp3 Not working mp3 file Jeff C, 2018-11-19 11:09

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #86834: No rendering of audio files with "Text & Media"Closed2018-11-02

Actions
Related to TYPO3 Core - Bug #71474: No rendering of audio files with "Text & Media"Closed2015-11-11

Actions
Actions #1

Updated by Jeff C about 6 years ago

  • Related to Bug #86834: No rendering of audio files with "Text & Media" added
Actions #2

Updated by Jeff C about 6 years ago

  • Related to Bug #71474: No rendering of audio files with "Text & Media" added
Actions #3

Updated by Guido Schmechel about 6 years ago

Can you add an example file?

I can't reproduce it with a test file and 9.5.1.

Updated by Jeff C about 6 years ago

I attached the three files, that I used for testing this on Typo3 9.5.1.

The original mp3 file works. Then I added the JPG as Cover Art to the mp3 file – now Typo3 will register it as an Image rather than an audio file.

Actions #5

Updated by Jonas Eberle about 6 years ago

Basically if you can make \TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::canRender() (or your own implementation that is registered with \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::registerRendererClass() ) return true on that file it is rendered in an <audio> tag.

Normal filetype-sniffers report application/octet-stream on that file. So to achieve that it would need reading ID3-tags on those files.

EDIT: typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Type.html would need adjustment, too. With the current type=5 (FILETYPE_APPLICATION) it never gets rendered as an audio file.

A minimal approach would be to react to application/octet-stream in \TYPO3\CMS\Core\Resource\Driver\LocalDriver::getSpecificFileInformation() and resolve to mimetype=audio/mpeg if some better content sniffer detects audio inside the file. This would set type=3 (audio).

Is this an edge case or are there other media file types that don't get well detected by TYPO3?

Actions #6

Updated by Jonas Eberle about 6 years ago

  • Complexity deleted (easy)

Just looked around and found that e.g. Symfony's https://github.com/symfony/http-foundation/blob/master/File/MimeType/FileinfoMimeTypeGuesser.php is in the same boat with PHP's finfo (and Unix's command "file" which also reports application/octet-stream in this case). "mp3 application/octet-stream" reveals some insight in that this is not trivial.

Played around with https://packagist.org/packages/james-heinrich/getid3 which correctly identifies the files as format MP3.

I as an audio nerd am all up to make TYPO3 a nice audio delivery platform, but I do not see this as a "Must have" in TYPO3 core.

Actions #7

Updated by Guido Schmechel over 5 years ago

With which tool do you add the cover art? I use https://www.mp3tag.de/ and i have no problems with this mp3 and image.

Actions #8

Updated by Christian Eßl about 5 years ago

  • Category set to Fluid Styled Content
Actions #9

Updated by Susanne Moog over 4 years ago

  • Status changed from New to Closed

Please use "$GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType']" setting in this case. To reliably natively identify all mp3 versions / mime-types is currently more or less impossible, and we have that configuration setting for exactly this kind of case.

(In addition, if you don't need the info from the ID3 tag you could also think about building a post-upload processor stripping the ID3 tags).

Actions

Also available in: Atom PDF