[Gambas-user] media component syntax and the gstreamer filesink
Benoît Minisini
gambas at ...1...
Sat Feb 15 02:49:14 CET 2014
Le 15/02/2014 02:23, Dominique Michel a écrit :
>>
>> That solve the duration issue with mplayer and alsaplayer:
>> $hAudio["is-live"] = "1"
>> but not the 0 length file issue.
>
> That solve it only partly. Both players play it with the wanted
> duration, but they display a file length of 0 seconde.
>
> I get the same problem with the following command line:
> gst-launch-1.0 audiotestsrc is-live=1 ! flacenc ! filesink
> location=generated.flac
>
> But I get the correct duration display with:
> gst-launch-1.0 -e audiotestsrc is-live=1 ! flacenc ! filesink
> location=generated.flac
I think I can add the same trick to gb.media. I will tell you.
>
> Another issue is that ideally, I want to be able to use such a pipeline
> with gambas:
>
> gst-launch-1.0 -e audiotestsrc is-live=1 !
> audio/x-raw,channels=2,rate=48000 ! flacenc ! filesink
> location=generated.flac
>
> and if I try something like:
>
> $hAudio["is-live"] = "1"
> $hRaw = New MediaControl($hPlayer, "audio/x-raw")
> $hConv = New MediaControl($hPlayer, "flacenc")
> $hOutput["location"] = "wavegenerator.flac"
> $hOutput["append"] = "1"
> $hAudio.LinkTo($hRaw)
> $hRaw.LinkTo($hConv)
> $hConv.LinkTo($hOutput)
>
> it fail at $hRaw = New MediaControl($hPlayer, "audio/x-raw")
>
> How I can get it to work?
'audio/x-raw' is actually a special syntax for the 'capsfilter'
GStreamer plugin.
It is handled by the MediaFilter object, not just the MediaControl object:
$hRaw = New MediaFilter($hPlayer, "audio/x-raw,channels=2,rate=48000")
That should work. You will tell me.
--
Benoît Minisini
More information about the User
mailing list