Gtk.MediaControls not showing seek bar
Kip Warner
kip at thevertigo.com
Tue Jul 23 18:57:41 UTC 2024
Hello list,
I noticed in one of my applications that the Gtk.MediaControls widget
doesn't always display a seek bar when I load an MP3. I made inquiries
in #gtk on Libera.Chat where it was recommended I make inquiries with
GStreamer.
It looks as though this may be a GStreamer issue, perhaps in how audio
files' metadata are being read. It doesn't happen with all MP3s, only a
few. But I noticed that if I try playback with gst-launch-1.0(1), I
notice slightly different behaviour on the problematic MP3s. Here is an
example:
$ gst-launch-1.0 filesrc location="5-Um Adeus (Kim Ribeiro - Joao do Cavaco)-Kim Ribeiro.mp3" ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! autoaudiosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstPulseSinkClock
0:00:00.0 / 99:99:99
Note the time index on the last line. For the first two seconds or so
the total time for that song is read as 99:99:99. mpv(1) doesn't appear
to have this issue and I don't see anything unusual with ffprobe(1):
$ ffprobe "05-Um Adeus (Kim Ribeiro - Joao do Cavaco)-Kim Ribeiro.mp3"
ffprobe version 6.1.1-3ubuntu5+esm1 Copyright (c) 2007-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/usr --extra-version=3ubuntu5+esm1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
[mp3 @ 0x5f7740de6640] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/media/kip/Kip-4TB/Magnatune/Songs/05-Um Adeus (Kim Ribeiro - Joao do Cavaco)-Kim Ribeiro.mp3':
Metadata:
composer : Kim Ribeiro
iTunPGAP : 0
encoded_by : iTunes 9.0.2
iTunNORM : 000005D3 000005BF 000030FD 00002B9E 0000C6FA 0000FCF5 00007B0F 00006E2F 000153CB 000110C1
iTunSMPB : 00000000 00000210 00000A08 0000000000521868 00000000 001DC054 00000000 00000000 00000000 00000000 00000000 00000000
iTunes_CDDB_IDs : 14+C52C7D03CD55B064B249F616D9D92A2F+8357219
ID3v1 Comment : 0
TLEN : 122000
comment : Magnatune artist page: http://magnatune.com/artists/kim_ribeiro
TBPM : 104
track : 5
title : Um Adeus (Kim Ribeiro - Joao do Cavaco)
artist : Kim Ribeiro
album : 40 anos de Musica
genre : Jazz
Tagging time : 2013-06-17T11:08:58
grouping : magnatune
date : 2006
Duration: 00:02:02.08, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 300x300 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn (attached pic)
Metadata:
comment : Cover (front)
Any suggestions welcome.
--
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20240723/80aab997/attachment.sig>
More information about the gstreamer-devel
mailing list