OK,

thank you anyway. You helped me to start with Melt.

I have found a configuration which more or less suits my needs.

I wanted to publish it here in case it can also help anyone.
I don't use audiomap filter since I am not getting good results with it
(not even wrapping the clip into a xml file).

I get best results doing this:

audio_index=all
channels=16
channels.0=2 channels.1=2 channels.2=2 channels.3=2 channels.4=2
channels.5=2 channels.6=2 channels.7=2

So the complete melt command I am using is:

For avformat output:

melt -profile atsc_1080i_50 test_TS_8_audios.ts audio_index=all -consumer
avformat:udp://224.168.225.202:2002?pkt_size=1316\&reuse=1 real_time=1
terminate_on_pause=0 f=mpegts vcodec=mpeg2video vb=5M s=1280x720 acodec=mp2
ab=256k channels=16 channels.0=2 channels.1=2 channels.2=2 channels.3=2
channels.4=2 channels.5=2 channels.6=2 channels.7=2

The same for decklink output but instead of -consumer avformat, -consumer
decklink:0

In Melted format, my config file has this for audio mapping:

USET U1 producer.audio_index=all
USET U1 consumer.channels.0=2
USET U1 consumer.channels.1=2
USET U1 consumer.channels.2=2
USET U1 consumer.channels.3=2
USET U1 consumer.channels.4=2
USET U1 consumer.channels.5=2
USET U1 consumer.channels.6=2
USET U1 consumer.channels.7=2
USET U1 consumer.acodec=mp2
USET U1 consumer.ab=256k


With this I get all input channels properly mapped in the output: up to 16
channels for avformat consumer and 8 channels for decklink consumer, with
the issues I described before when using decklink (impossible to do it with
an odd number of audio pairs).

Regards,

David



On 27 October 2016 at 01:56, Dan Dennedy <d...@dennedy.org> wrote:

> I am unable to help you any further. I do not use Melted as I do not use
> MLT for broadcast. I have not used the decklink consumer with more than 8
> channels. I simply provided some information in the hopes you can try to
> figure out what you can do with it.
>
>
> On Wed, Oct 26, 2016 at 8:38 AM David Alonso Grande <dalon...@gmail.com>
> wrote:
>
>> Hello Dan,
>>
>> thank you for your quick answer.
>>
>> I have made some progress but I don't have it working yet.
>>
>> I will split my reply in two (-consumer avformat and -consumer decklink)
>> because I am getting different behaviour on audiomap depending on the
>> consumer.
>>
>> I will reply in two different emails. I think it will be better to follow
>> up.
>>
>>
>> With -consumer decklink:
>>
>> I manage to get something close to a proper output when my input clip has
>> an even number of audio tracks (not channels, but tracks). I have made
>> tests using input clips with 2, 3, 4 and 8 audio tracks. Please see below
>> ffprobe details of the input clips I am using.
>>
>>
>> This is what I have seen so far:
>>
>>
>> - If I set: consumer.channels param to any value different than 2, I
>> always get 8 channels (4 tracks) in the output regardless of the number of
>> channels in the input clip.
>> For example: in my TEST 1 (see details below) I get four tracks in the
>> output: 0 --> eng, 1 --> spa, and then tracks 2 and 3 are the duplicated of
>> the first two ones: 2 --> eng, 3 --> spa.
>>
>> - If I use an input clip with an odd number of tracks (i.e in TEST 2,
>> with three tracks) I get a sound mix of all the three input tracks in every
>> output track. (one output track if I set: consumer.channels=2 or 4 if I
>> set, consumer.channels=16).
>>
>> - I don't manage to get more than 4 audio tracks in the output (even when
>> I use an 8 tracks input clip, in TEST 4). Theoretically, I should be able
>> to get up to 8 tracks (16 channels) in the SDI output, right?
>>
>> - Audiomap filter works for clips with an even number of tracks although
>> its use is not mandatory. Only when I want to change the matching between
>> the input and the output channels. If I don't use it, melt does a direct
>> mapping: 0=0, 1=1, 2=2...and so on. It does it right in TEST 3.
>>
>> - Audiomap filter does not fix my output when I use clips with odd number
>> of audio tracks. In TEST 2, I always get a sound mix in every output
>> channel no matter if I wrapp the input clip into a xml file with the
>> audiomap filter or not. I get the same behaviour from melt with and without
>> audiomap filter in this case.
>>
>> I am stuck with audio mapping at this point.
>>
>> - I would need to get the same number of audio tracks in the output as
>> the ones in the input, regardless of the number (even or odd).
>> - I would need to be able to get more than 4 audio tracks in the output.
>> Sometimes we use all of them (8) for regional languages.
>>
>> Any help would be appreciated.
>>
>> Thank you for your time,
>>
>> David
>>
>>
>>
>> MELTED CONFIG FILE:
>>
>> ###    ADD DECKLINK CARD    ####
>> UADD decklink:0
>>
>> ###   CONFIG U0 (DECKLINK) PLAYER PARAMS   ####
>> ###   INFINITE LOOP   ###
>> USET U0 eof=loop
>> USET U0 consumer.mlt_profile=atsc_1080i_50
>> USET U0 consumer.terminate_on_pause=0
>> USET U0 consumer.real_time=1
>> USET U0 consumer.channels=16
>> USET U0 producer.audio_index=all
>>
>>
>> See ffprobe info for each of the input clips below:
>>
>> TEST 1. Input clip: test_2_audios_dag.mp4
>>
>>   Metadata:
>>       handler_name    : VideoHandler
>>       timecode        : 01:00:00:00
>>     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s (default)
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:2(spa): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
>>     Metadata:
>>       handler_name    : TimeCodeHandler
>>       timecode        : 01:00:00:00
>>
>> TEST 2. Input clip: test_3_audios_dag.mp4
>>
>>     handler_name    : VideoHandler
>>       timecode        : 01:00:00:00
>>     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s (default)
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:2(spa): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:3(grc): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:4(eng): Data: none (tmcd / 0x64636D74)
>>     Metadata:
>>       handler_name    : TimeCodeHandler
>>       timecode        : 01:00:00:00
>>
>> TEST 3. Input clip: test_4_audios_dag.mp4
>>
>>
>>       handler_name    : VideoHandler
>>       timecode        : 01:00:00:00
>>     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s (default)
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:2(spa): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:3(grc): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:4(pol): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:5(eng): Data: none (tmcd / 0x64636D74)
>>     Metadata:
>>       handler_name    : TimeCodeHandler
>>       timecode        : 01:00:00:00
>>
>>
>> TEST 4: Input clip: test_8_audios.mp4
>>
>>      handler_name    : VideoHandler
>>       timecode        : 01:00:00:00
>>     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s (default)
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:2(spa): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:3(blg): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:4(grc): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:5(pol): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:6(fra): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:7(est): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:8(hrv): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 192 kb/s
>>     Metadata:
>>       handler_name    : SoundHandler
>>     Stream #0:9(eng): Data: none (tmcd / 0x64636D74)
>>     Metadata:
>>       handler_name    : TimeCodeHandler
>>       timecode        : 01:00:00:00
>>
>>
>>
>>
>> On 21 October 2016 at 06:05, Dan Dennedy <d...@dennedy.org> wrote:
>>
>> First, you need to configure the consumer with the desired number of
>> output channels you want, because the default is 2. In melted you do that
>> with something like "USET U0 consumer.channels=8" before starting the
>> consumer for playback. Why 8 instead of 6? See this
>> http://permalink.gmane.org/gmane.comp.video.mlt.devel/2346
>>
>> Next, the avformat producer defaults to the first audio track. You can
>> change that on the producer by setting the property audio_index=N where N
>> is an integer value corresponding to the stream index reported by meta
>> properties in the XML output, -1 to say no audio, or the special value
>> "all" to ask to read all of the audio tracks and their channels. For your
>> case, you want "all" and in melted you do something like "USET U0
>> producer.audio_index=all" _before_ loading a clip. This will make melted
>> set that property on all producers you load until you change that value.
>>
>> Lastly, you might need to remap the audio channels from input to output
>> and for that you use the "audiomap" filter: https://www.mltframework.org/
>> plugins/FilterAudiomap/
>> However, melted does not make it easy to add filters. I think if you need
>> to do this, you need to make a MLT XML wrapper for the clip wherein you
>> attach the filter. Then, you load the XML file in melted instead of the
>> clip directly. When making this XML file, you can also set the audio_index
>> instead of doing it through melted MVCP. You can use melt to generate the
>> XML:
>> melt -profile atsc_1080i_50 test_audio_3.mp4 audio_index=all -attach
>> audiomap 0=0 1=1 2=4 3=5 4=2 5=3 -consumer xml:test_audio_3.mlt
>>
>>
>> On Thu, Oct 20, 2016 at 10:24 AM David Alonso Grande <dalon...@gmail.com>
>> wrote:
>>
>> Hello,
>>
>> I am using melted as a playout server with outputs: a decklink monitor
>> card and avformat udp ouput.
>>
>>
>> I do not have any problems when my input clips have only one audio
>> channel, but if they have more than one I only get the first audio channel
>> in the output.
>> Can anyone help me?
>>
>> I provide *details below:*
>>
>> melt -version
>> melt 6.3.0
>>
>>
>> *INPUT CLIP:* test_audio_3.mp4
>>
>> *INPUT CLIP DETAILS:*
>>
>> mlt@OVE-DAG:~/test_files$ cat test_audio_3_details.txt
>> <?xml version="1.0"?>
>> <mlt LC_NUMERIC="en_US.UTF-8" version="6.3.0" title="test_audio_3.mp4">
>>   <profile description="automatic" width="1920" height="1080"
>> progressive="1" sample_aspect_num="1" sample_aspect_den="1"
>> display_aspect_num="1920" display_aspect_den="1080" frame_rate_num="25"
>> frame_rate_den="1" colorspace="709"/>
>>   <producer id="producer0" in="0" out="10136">
>>     <property name="length">10137</property>
>>     <property name="eof">pause</property>
>>     <property name="resource">./test_audio_3.mp4</property>
>>     <property name="meta.media.nb_streams">5</property>
>>     <property name="meta.media.0.stream.type">video</property>
>>     <property name="meta.media.0.stream.frame_rate">25</property>
>>     <property name="meta.media.0.stream.sample_aspect_ratio">0</property>
>>     <property name="meta.media.0.codec.width">1920</property>
>>     <property name="meta.media.0.codec.height">1080</property>
>>     <property name="meta.media.0.codec.rotate">0</property>
>>     <property name="meta.media.0.codec.frame_rate">25</property>
>>     <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
>>     <property name="meta.media.0.codec.sample_aspect_ratio">1</property>
>>     <property name="meta.media.0.codec.colorspace">709</property>
>>     <property name="meta.media.0.codec.name">h264</property>
>>     <property name="meta.media.0.codec.long_name">H.264 / AVC / MPEG-4
>> AVC / MPEG-4 part 10</property>
>>     <property name="meta.media.0.codec.bit_rate">4704236</property>
>>     <property name="meta.attr.0.stream.handler_name.markup">
>> VideoHandler</property>
>>     <property name="meta.attr.0.stream.timecode.markup">01:00:00:00</
>> property>
>>     <property name="meta.media.1.stream.type">audio</property>
>>     <property name="meta.media.1.codec.sample_fmt">fltp</property>
>>     <property name="meta.media.1.codec.sample_rate">48000</property>
>>     <property name="meta.media.1.codec.channels">2</property>
>>     <property name="meta.media.1.codec.name">aac</property>
>>     <property name="meta.media.1.codec.long_name">AAC (Advanced Audio
>> Coding)</property>
>>     <property name="meta.media.1.codec.bit_rate">192000</property>
>>     <property name="meta.attr.1.stream.handler_name.markup">
>> SoundHandler</property>
>>     <property name="meta.media.2.stream.type">audio</property>
>>     <property name="meta.media.2.codec.sample_fmt">fltp</property>
>>     <property name="meta.media.2.codec.sample_rate">48000</property>
>>     <property name="meta.media.2.codec.channels">2</property>
>>     <property name="meta.media.2.codec.name">aac</property>
>>     <property name="meta.media.2.codec.long_name">AAC (Advanced Audio
>> Coding)</property>
>>     <property name="meta.media.2.codec.bit_rate">192004</property>
>>     <property name="meta.attr.2.stream.handler_name.markup">
>> SoundHandler</property>
>>     <property name="meta.media.3.stream.type">audio</property>
>>     <property name="meta.media.3.codec.sample_fmt">fltp</property>
>>     <property name="meta.media.3.codec.sample_rate">48000</property>
>>     <property name="meta.media.3.codec.channels">2</property>
>>     <property name="meta.media.3.codec.name">aac</property>
>>     <property name="meta.media.3.codec.long_name">AAC (Advanced Audio
>> Coding)</property>
>>     <property name="meta.media.3.codec.bit_rate">192000</property>
>>     <property name="meta.attr.3.stream.handler_name.markup">
>> SoundHandler</property>
>>     <property name="meta.attr.major_brand.markup">isom</property>
>>     <property name="meta.attr.minor_version.markup">512</property>
>>     <property name="meta.attr.compatible_brands.markup">
>> isomiso2avc1mp41</property>
>>     <property name="meta.attr.encoder.markup">Lavf57.36.100</property>
>>     <property name="seekable">1</property>
>>     <property name="meta.media.sample_aspect_num">1</property>
>>     <property name="meta.media.sample_aspect_den">1</property>
>>     <property name="aspect_ratio">1</property>
>>     <property name="audio_index">1</property>
>>     <property name="video_index">0</property>
>>     <property name="mute_on_pause">1</property>
>>     <property name="mlt_service">avformat</property>
>>   </producer>
>>   <playlist id="playlist0">
>>     <entry producer="producer0" in="0" out="10136"/>
>>   </playlist>
>>   <tractor id="tractor0" title="test_audio_3.mp4" global_feed="1" in="0"
>> out="10136">
>>     <track producer="playlist0"/>
>>   </tractor>
>> </mlt>
>>
>> As you can see: there are three audio tracks in the input clip.
>>
>>
>> *MELT COMMAND:*
>>
>> melt eof=loop -profile atsc_1080i_50 test_audio_3.mp4 -consumer
>> avformat:udp://224.168.225.202:2002?pkt_size=1316\&reuse=1
>> <http://224.168.225.202:2002?pkt_size=1316%5C&reuse=1> real_time=1
>> terminate_on_pause=0 f=mpegts vcodec=mpeg2video vb=5M s=1280x720 acodec=mp2
>> ab=256k
>>
>>
>> This is the melt command I am using (the same in melted server) but in
>> udp://224.168.225.202:2002 multicast address I only get the first audio
>> track.
>>
>> Any help would be really appreciated.
>>
>> Regards,
>>
>> David
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot______
>> _________________________________________
>> Mlt-devel mailing list
>> Mlt-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mlt-devel
>>
>>
>>
------------------------------------------------------------------------------
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to