WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: No decoder available for audio/mpeg or audio/x-wma when played with GStreamer  (Read 4335 times)

Offline duncanmead

  • Newbie
  • *
  • Posts: 10
Hi. I have spent many days trying to get Mopidy working on tinycore on a Raspberry pi Zero. After many attempts, I am very nearly there - I can play .flac files through Mopidy (which uses GStreamer1.0) on the Pirate audio board, and control this with mpc. However, I cannot play mp3 or wma files. The error message states that it does not have a decoder. I have loaded the main plugins:
gst-plugins-bad, good and ugly, and also tried libav, libavfilter, and libavutil (and many others). tce-status shows many extensions loaded, including alsa, alsa-modules-4.19.81-piCore, alsa-utils, flac, gst-libav, gst-plugins-bad, gst-plugins-base, gst-plugins-gir, gst-plugins-good, gst-plugins-ugly, gstreamer, gstreamer-gir, lame, libasound, libavcodec, libavfilter, libmpeg2, mpg123, pulseaudio, wavpack.
I feel that I must be very close to completing this, but I seem to be stuck at the last post. Any help would be much appreciated. I will post all the steps that I took if I complete this, should it be of any help to any other poor souls trying the same thing. I am using tinycore 11.x on armv6. Linux version 4.19.83-piCore. Thanks.

Offline duncanmead

  • Newbie
  • *
  • Posts: 10
Further information: The command mopidy deps shows:

GStreamer: 1.16.2.0 from /usr/local/lib/python3.8/site-packages/gi
  Detailed information:
    Python wrapper: python-gi 3.36.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
      Not found:
        pulsesink
        flump3dec
        mad
        mpg123audiodec
        shout2send

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
If you add plugins after the first time an app accesses gstreamer, you need to force it to rescan for plugins by deleting the cache:
Code: [Select]
$ rm ~/.cache/gstreamer-1.0/*.bin
This being said, I don't see that gst-plugins-good was compiled against mpg123 or that gst-plugins-ugly was compiled against libmad - I'm not sure if the libmpeg2 plugin will play mp3 or not.

The gst-libav extension should play mp3 and wma files.

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 799
right,

sorry but i don't fully understand your goal......is the goal to play various types of audio file on pi zero?

i believe mpg123 works on pi zero.

thx

v


Offline duncanmead

  • Newbie
  • *
  • Posts: 10
Juanito - Thanks. I have cleared the cache, and re-started Mopidy. This shows some warnings for missing plugins, but nothing significant. However, the mp3 files still will not play. gst-libav is loaded, along with the other gst-plugins.

vinceASPECT - I am trying to use the Pirate Audio board on a pi Zero to play music in the car. This works on Raspbian, but I would like to use tinycore for speed, and to tolerate the power being disconnected when the engine is turned off. The Mopidy python modules control the buttons on the board, and display the title and artist on the screen, so I would have to work out how to do that if I chose a different player.

Duncan

Offline duncanmead

  • Newbie
  • *
  • Posts: 10
Actually, there is one message related to libgstlibav.so (which proves that it is loaded):
(gst-plugin-scanner:2251): GStreamer-WARNING **: 16:50:06.640: Failed to load plugin '/usr/local/lib/gstreamer-1.0/libgstlibav.so': libswscale.so.5: cannot open shared object file: No such file or directory

Would this cause all of the gst-libav extension to fail to load?

Duncan

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Yes, it would prevent get-libav from working - can you load libswscale manually, delete the gstreamer cache and try again?

Offline duncanmead

  • Newbie
  • *
  • Posts: 10
Yes, just tried that - it then complained about libspostproc, then libswresample, then libass, then libwebp, then  librsvg, then libcroco ... but then it loaded, and yes - it will now play both mp3 and wma files.

Thank you very much for your help

Duncan

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Is the dep file for gst-libav missing or corrupted?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Hi duncanmead
... it then complained about libspostproc, then libswresample, then libass, then libwebp, then  librsvg, then libcroco ...
According to this:
http://tinycorelinux.net/11.x/armv6/tcz/librsvg.tcz.dep
loading  librsvg.tcz  should load  libcroco.tcz.

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 799
hello,

i don't know if it's any help to you, but according to the armv6 repo for pi zero on tcl......the
 "ffmpeg" tool is available.


ffmpeg tool contains (among other tools) the "ffplay" tool .......ffplay is a full multimedia player.

https://ffmpeg.org/ffplay.html
http://tinycorelinux.net/12.x/armv6/tcz/

the man page above shows it playing flac music files and mp3 etc.
it can play files such as audio or video files as local files or http streams.

thx

v
« Last Edit: November 04, 2020, 08:08:55 AM by vinceASPECT »

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 799
Sir/madam,

i looked into the tool named "ffplay" multimedia player that is a tool sitting inside "ffmpeg" tool from the armv6 pi zero repo.
It's also available in all regular TcL repo's such as x86

You may also want to instal the "sdl" dep and also the "lame" dep from the repo.

The following command allowed my machine to use the "ffplay" media player to play any live internet radio streams.

tcl$ .............. SDL_AUDIODRIVER="alsa" AUDIODEV="hw:1,0" ffplay https://vprbbc.streamguy
s1.com/vprbbc24.mp3

(bbc world service live radio)........24 kbps live stream


the command above is telling "ffplay" tool where your "alsa" audio hardware card is located.......you may want to use "hw:0" instead of "hw:1,0" or use "hw:1"

There is a flag command inside "ffplay" tool to see your hardware devices. ....... it's the flag  "-devices" and it's in the help menu.

The pi zero can take any usb soundcard. They are 50 cents new on ebay.....then this post holds true.
i don't know how you specify the HDMI audio output of the pi zero.
Also there is a gpio pin on the pi zero........ that actually outputs analogue audio.

"ffplay" media player  should act as a full multimedia player on the $5 pi zero computer.......it should be able to play any internet streaming videos(with sound) and local videos or music .......

video streams such as youtube  should work correct if you have a correct video file format for the video link. 

You can get various video file formats using youtube-dl......or a reflector website that gives you various video file format stream link options...... such as genyt.net web site.

thanks

v

« Last Edit: November 05, 2020, 07:08:08 AM by vinceASPECT »

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 799
users may not actually need such endeavors as the post above.


just


tcl$........  ffplay <input media file.mp3>........or...... <url stream link>
-----------------------------------------------------------------------------------------

Also, for users to get networking on pi zero you can just use an "ethernet to usb" adapter off ebay  (50 cents new)

you may want to install "freetype.tcz" and "fontconfig.tcz" deps so that "ffmpeg" installs correct.


the streaming video playback with sound also works for web videos.............see  below

tcl$.................SDL_AUDIODRIVER="alsa" AUDIODEV="hw:1,0" ffplay
"https://redirector.googlevideo.com/videoplayback?expire=1604601751&ei=N_OjX8rZINmI2LYP85OJiAk&ip=104.153.82.35&id=o-ALqMGyqRBSfdFyKectRjZq6olJ72zpAkDwY4FKgpOB_c&itag=17&source=youtube&requiressl=yes&mh=Y_&mm=31%2C29&mn=sn-p5qs7ner%2Csn-p5qlsnsk&ms=au%2Crdu&mv=m&mvi=6&pl=22&initcwndbps=2635000&vprv=1&mime=video%2F3gpp&gir=yes&clen=1040013&dur=119.768&lmt=1601120012639257&mt=1604580042&fvip=6&c=MWEB&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAIxbGPJXP82RHavrWnSYHr2bLsF6OcTx10dV6R0FjF4SAiEApeqKbhWwO9uvPbqDkNKoDw6WQsnv_cLiMT7-2WW2lOw%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgUojr0Gh23-h9P1UlR3PG5Bc28edEprqiFRjSPt43bUYCIQCQDS319D4hSjAWZQBUdMzwktr0UvWLgKIog3H_jLihzQ%3D%3D&ratebypass=yes&utmg=ytap1_64R2MYUt394&title=David_Attenborough_A_Life_on_Our_Planet__Official_Trailer__Netflix.3gp"

with the video link coming off genyt.net web site..........and putting the link in quotes preceded by a space.

thx

v
« Last Edit: November 05, 2020, 07:51:35 AM by vinceASPECT »

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 799
ignore any accelerated renderer error when trying to play............unless your on advanced graphics
« Last Edit: November 05, 2020, 09:03:36 AM by vinceASPECT »