I tried the following tutorial and it works.
I changed the following line. But unfortunately it doesn’t work,
// old
("playbin uri=https://gstreamer.freedesktop.org/data/media/sintel_trailer-480p.webm",
// new
("playbin uri=sintel_trailer-480p.webm",
// or
("/home/tux/Schreibtisch/gstreamer_3/test.mp3",
When I try it with the MP3, I get the following message, including a SIGSEV.
You need to actually pass a URI to the uri property here.
Local file URIs should look like e.g. file:///home/tux/Schreibtisch/gstreamer_3/test.mp3.
There’s a gst_filename_to_uri() convenience function to turn a filename into a URI (with proper escaping etc.)
My guess is that the pipeline wasn’t actually constructed and you got a NULL pointer back perhaps (although I’m not sure why that would be the case here).
Thanks, now something is happening. ("playbin uri=file:/home/tux/desk/gstreamer_3/test.flac",
One slash is enough, you don’t need three.
But now the console is blocked until I press [CTRL-C].
I also suspect that there is something else besides loading a file via a URI?
I’m looking for an example where a FLAC or MP3 is played locally.
So far I’ve only seen examples that take the detour via URI.
Is this even possible, or does everything go via URI?
It will depend on the elements involved. The reason most examples “take the detour” via URIs is that that’s the way their API is defined, e.g. playbin(3), uridecodebin(3) etc.
You can build pipelines with filesrc of course that don’t take a URI, such as: