Interleaving into AC3

John P Poet jppoet at gmail.com
Thu Sep 15 23:48:48 UTC 2016


While working on adding multi-channel audio support to gstdecklinkaudiosrc,
I tried to come up with a pipeline which throws away all but the first six
channels, and encodes them into AC3.  The following pipeline works:

```
gst-launch-1.0 decklinkvideosrc device-number=${DEVICE} mode=0 ! fakesink \
   decklinkaudiosrc device-number=${DEVICE} audio-channels=8 ! audioconvert
! \
   deinterleave name=d  interleave name=i ! audioconvert !
"audio/x-raw,channels=6" ! \
   wavenc ! wavparse ! audioconvert ! avenc_ac3 bitrate=640000 ! queue !
ac3parse ! \
   filesink location=dest.wav   \
   d.src_0 ! queue ! audioconvert ! i.sink_0   \
   d.src_1 ! queue ! audioconvert ! i.sink_1   \
   d.src_2 ! queue ! audioconvert ! i.sink_2   \
   d.src_3 ! queue ! audioconvert ! i.sink_3   \
   d.src_4 ! queue ! audioconvert ! i.sink_4   \
   d.src_5 ! queue ! audioconvert ! i.sink_5
```

I would like to understand why the `wavenc ! wavparse` is necessary,
though.  Without that extra conversion step, I get:

```
ERROR: from element
/GstPipeline:pipeline0/GstDecklinkAudioSrc:decklinkaudiosrc0: Internal data
stream error.
```

I also discovered that trying to remap the channels also fails with a
message like:

```
could not link audioconvert8 to i
```

I tried the first "Example launch line" @
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-interleave.html

and it fails exactly the same way.  Is this a regression?

For the end result, I want a transport stream.  PCM is not allowed in a TS,
so AC3 seems like the best choice.  However, avenc_ac3 only accepts 6
channels.   If my SDI source has more than 6 channels, it will be
"secondary" audio anyway, so having a second (or more) AC3 track should be
fine.

Thank you for any insight.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160915/5df15d7e/attachment.html>


More information about the gstreamer-devel mailing list