[Gambas-user] gstreamer and aac format

Claus Dietrich claus.dietrich at freenet.de
Fri Jan 12 14:34:11 CET 2024


Am 11.01.24 um 23:09 schrieb System64 Development:
> El 11/1/24 a las 19:52, vuott--- via User escribió:
>> cnv = New MediaControl(pl, "audioconvert")
>> faac = New MediaControl(pl, "faac")
>> flt = New MediaFilter(pl, "audio/mpeg,stream-format=adts")
>> snk = New MediaControl(pl, "filesink")
>
> Yes, this is the solution. I change a little because I use this to 
> record microphone input:
>
>       pl = New MediaPipeline
>       src = New MediaControl(pl, "pulsesrc")
>       src["device"] = $Device
>       cnv = New MediaControl(pl, "audioconvert")
>       faac = New MediaControl(pl, "faac")
>       flt = New MediaFilter(pl, "audio/mpeg,stream-format=adts")
>       snk = New MediaControl(pl, "filesink")
>       snk["location"] = $TempFilePath
>       src.LinkTo(cnv)
>       cnv.LinkTo(faac)
>       faac.LinkTo(flt)
>       flt.LinkTo(snk)
>
> Thanks Vuott.
I ended up with the following, which avoids additional installations for 
the faac encoder in my Mint distros (using voaacenc instead of faac):

      .....

      Else If $RecordingFormat = aac Then
         pl = New MediaPipeline
         src = New MediaControl(pl, "pulsesrc")
         src["device"] = $Device
         cnv = New MediaControl(pl, "audioconvert")
         enc = New MediaControl(pl, "voaacenc")
         flt = New MediaFilter(pl, "audio/mpeg,stream-format=adts")
         snk = New MediaControl(pl, "filesink")
         snk["location"] = $TempFilePath
         src.LinkTo(cnv)
         cnv.LinkTo(enc)
         enc.LinkTo(flt)
         flt.LinkTo(snk)
     End If

     .....

Best regards

Claus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240112/8cae7029/attachment.htm>


More information about the User mailing list