lbry-desktop icon indicating copy to clipboard operation
lbry-desktop copied to clipboard

Player: display the embedded image for OGG audio files

Open belikor opened this issue 2 years ago • 6 comments

The OGG file format is normally used for audio files with the Vorbis audio codec.

The OGG format can also contain an image. So, it would be good if the player could display the image contained in the OGG file if it's available. This has been requested a few times in Discord.

belikor avatar Sep 26 '21 20:09 belikor

The test file is this https://odysee.com/@isaiah:5/Mozart_Die.Zauberflote-Overture_Solti.VPO:a

Inspecting the file with ffprobe.

  Duration: 00:07:10.96, start: 0.000000, bitrate: 888 kb/s
    Stream #0:0: Audio: vorbis, 176400 Hz, stereo, fltp, 4294967 kb/s
    Metadata:
      album           : Mozart: Die Zauberflöte
      album_artist    : Sir Georg Solti, Vienna Philharmonic
      artist          : Mozart
      date            : 2014-25-10
      disc            : 1
      genre           : Classical
      title           : Ouvertüre
      track           : 1
    Stream #0:1: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 1467x1467, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Cover (front)

The audio track uses the Vorbis codec at 888 kb/s, which actually is quite high for an audio file. A typical mp3 has 128 kb/s, and a high quality file is like 320 kb/s.

The second track is a static 1467x1467 jpeg image apparently, but it isn't displayed.

belikor avatar Oct 01 '21 16:10 belikor

Thank you for highlighting this issue. The same is requested for FLAC files. At present the thumbnail image is displayed like a wallpaper for the media player box. If the same could be done for OGG files it would be an improvement, while we wait for display of the embedded image to be worked out.

Here is a test FLAC file: https://odysee.com/@isaiah:5/Wes.w.Wynton.Kelly.Trio_Unit.7:2?r=DpQUWnbQMwzUAeTfT8Kmvb7FNvsLkP6L

isaiah36 avatar Oct 03 '21 18:10 isaiah36

Ogg seems to work lbry://RuMaksHopefully#8fcb42b398ab92a8c8521f50dee61b454e87a87d Flac seems to work lbry://@LO_MEJOR_PARA_TI_AYER_Y_HOY#8/01.-Stars-On-45#7 Can you give me a hint about why the above one does not work?

jessopb avatar Jul 11 '22 18:07 jessopb

The images being displayed are the thumbnails. I downloaded both your examples. The OGA has no embedded image. The FLAC does have an embedded image, but it is not being displayed. It turns out, I was mistaken about embedded images being displayed in MP3 files. Here is a test: https://odysee.com/@isaiah:5/01-James-Bond-Theme:2?r=J16VZNm6VL39biLG7XVENoW4ZCAjAMPz It displays the thumbnail as a background, but not the image embedded in the file. Here is an OGG file: https://odysee.com/@classical:4/Schumann_Nouvellette.F-Toccata.C_Richter:8?r=J16VZNm6VL39biLG7XVENoW4ZCAjAMPz It displays a black screen while the audio streams. Neither embedded image nor thumbnail.

isaiah36 avatar Jul 11 '22 21:07 isaiah36

I renamed an OGG file to OGA, and now the thumbnail is being displayed, same as MP3 and FLAC. So, it looks like the behavior is coded to recognized extensions. Here is the test: https://odysee.com/@isaiah:5/01-The-James-Bond-Theme_oga:6?r=J16VZNm6VL39biLG7XVENoW4ZCAjAMPz

isaiah36 avatar Jul 11 '22 22:07 isaiah36

Thanks!

jessopb avatar Jul 12 '22 20:07 jessopb