Media player from command line

asked 2015-01-27 19:09:37 +0200

ZioBilly gravatar image

Can someone tell me how to reproduce a sound file from command line on sailfish? I tried installing aplay, mpg123 but i can't make them work, and then i realized that maybe ther is already a player installed

edit retag flag offensive close delete

Comments

6

I'm not sure if you need to install some packages (maybe gstreamer0.10-ffmpeg-extra or something like that) from Openrepos, but following command does the thing.

# gst-launch-0.10 playbin2 uri=file:///path/to/file/music.mp3

oku ( 2015-01-27 21:26:45 +0200 )edit

I get this error

[nemo@Jolla ~]$ gst-launch-0.10 playbin2 uri=file:///home/nemo/Screenshot/screenshot.mp3
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin/GstPlaySinkAudioConvert:aconv/GstAudioConvert:conv: not negotiated
Additional debug info:
gstbasetransform.c(2541): gst_base_transform_handle_buffer (): /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin/GstPlaySinkAudioConvert:aconv/GstAudioConvert:conv:
not negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

[EDIT]

I got it working with another file, so the problem was of that particular file, sorry ;)

ZioBilly ( 2015-01-27 22:21:15 +0200 )edit

care to share your working code @ZioBilly ? :)

Spam Hunter ( 2015-01-28 15:23:54 +0200 )edit
1

Is the one posted by @oku right above ;)

ZioBilly ( 2015-01-28 15:54:17 +0200 )edit

I couldn't make GST-LAUNCH work that way, so here is another option:

gst-launch-0.10 -v uridecodebin uri=file:///home/nemo/whatever.ogg ! audioconvert ! audioresample ! alsasink
Mced ( 2018-04-01 10:35:40 +0200 )edit