Multilanguage (Simultaneous translation) Lecture recording

107 views
Skip to first unread message

Rein L.

unread,
Mar 24, 2022, 5:30:29 AM3/24/22
to Opencast Users
Hello friends

In our school (EMKTS, Estonia) we would like to set up OC pyca agent for recoding lecture with 3 languages as simultaneous translation. At the moment we are using Zoom for (Hybrid education) lectures with simultaneous translation and would like to record this. 
  1. Presenter video + audio (original language)
  2. Presentation
  3. Translation 1 audio
  4. Translation 2 audio
We would like to have final recording with option to choose between 3 languages
(Eng, Rus, Eng). 

Our studengs are studieng both in place and in online with zoom + OBS recording at the moment, but it will create a lot of work in producing 3 language videos later. 

Fror this, as we undestrand we need speacial profile and workflows, plus proper pyca setup. We would like to have two options. 
    a) Record with 3 language to Opencast (as described above)
    b) Upload media files with 3 languages, resulting same option (from OBS recording)

Can somebody share experiences and help for setup we need to start to build for our need. 

(Using server Centos 8 Stream, Opencast 10.4)

With best wishes to OC community

Rein Laaneser 


Rein L.

unread,
Apr 23, 2022, 4:03:59 AM4/23/22
to Opencast Users, Rein L.
Hello

In uploading, i could do test with two video files (presenter and presentation)
and 3 separate language files. 
The test works. 
Can somebody, please,  give some comments to improving or optimizing. 

What i did was this: 

Steps in case of media files upload , with presenter video (mp4), presentation video (mp4)
and 3 language files (m4a). Language files with this config are: estonian – et, russian – ru, english – en. 

 # 1st step -  changes in Paella json config file 

By Documentation
https://docs.opencast.org/r/11.x/admin/#modules/paella.player/plugins/es.upv.paella.opencast.loader
 Changes needed in
/etc/opencast/ui-config/mh_default_org/paella/config.json   

... 
{ 
    "audioTag": { 
        "audio_et/delivery" : "et", 
        "audio_ru/delivery" : "ru", 
        "audio_en/delivery" : "en" 
    } 
} 
... 

 Complete config file  
https://pastebin.com/MLGwn2Vt 

 

 # 2nd step -  Asset manual upload 

 By documentation 
https://docs.opencast.org/r/11.x/admin/#configuration/admin-ui/asset-upload/#how-to-enable-preconfigured-asset-options 
changes needed in 
/etc/opencast/listproviders/event.upload.asset.options.properties  

... 
EVENTS.EVENTS.NEW.SOURCE.UPLOAD.AUDIO_ET=
{"id": 
"track_audio_et", 
"type":"track", 
"flavorType": "audio_et",
"flavorSubType": "source", 
"multiple":false, 
"displayOrder":16, 
"accept": ".m4a"}
EVENTS.EVENTS.NEW.SOURCE.UPLOAD.AUDIO_RU=
{"id":  "track_audio_ru", 
"type":"track", 
"flavorType": "audio_ru",
"flavorSubType": "source", 
"multiple":false, 
"displayOrder":17, 
"accept": ".m4a"}
EVENTS.EVENTS.NEW.SOURCE.UPLOAD.AUDIO_EN=
{"id": 
"track_audio_en", 
"type":"track", 
"flavorType": 
"audio_en", 
"flavorSubType": 
"source", 
"multiple":false, 
"displayOrder":18, 
"accept": ".m4a"} 

  ... 
 Complete file:  

  

# 3rd step – Test with Fast Testing Workflow - fast.xml 

By documentation 
https://docs.opencast.org/r/11.x/admin/#workflowoperationhandlers/tag-woh/ 
Changes needed in
/etc/opencast/workflows/fast.xml 

 … 
   <!-- before encode operation --> 
    <operation 
    id="tag" 
    description="Tag audio sorce files"> 
      <configurations> 
        <configuration key="source-flavors">audio_et/source,audio_ru/source,audio_en/source</configuration>
<configuration key="target-flavors">*/delivery</configuration>
<configuration key="target-tags">engage-download,engage-streaming,rss,atom</configuration> 
      </configurations> 
    </operation>
… 

 Complete file 

 

Thank you ahead for some comments to improving or optimizing. 


Rein L. 


Yannis Marti

unread,
Apr 23, 2022, 5:53:18 AM4/23/22
to Opencast Users, Rein L.
Dear Rein,

The method you choose is a good solution, but unfortunately not the best for sync and mobile streaming as audio and video are in separate streams.

What i have experienced with success also was to record one file with multiple languages inside. Then have a first pass on the workflow to create the selected languages and created separated languages files (copy video/split audio). Then we can process multiple languages and at the displaying it in paella as you do, but with something like presenter_ru, presenter_en,... The issue of this solution is the player load who's going very high with 6 or 8 languages.

The best solution would be to process an HLS multi-audio file but unfortunately, the opencast dev team choose a method for HLS production who make impossible the usage of advanced filter in ffmpeg - then it's impossible to produce the type of HLS file with an Opencast workflow.

I cannot find a work around unfortunately, but i still hope a day this problem would take in consideration by our great dev team. ;-)

Do not hesitate if you have more specific questions.
Best,
Yannis

Rein L.

unread,
Apr 24, 2022, 12:50:07 AM4/24/22
to Opencast Users, y...@oul.ch, Rein L.
Dear Yannis

Thank you for comments! I keep it in mind. 

Seems HLS is coming to OC with paella player 7, as i understood.
This above method now with Fast Workflow is probably indeed not for production yet, but for study. 
Better I would like to take Upload and Shedule default workflow. With changes for multiaudio need, 
so that indeed, at some point in workflow, would have  videos presenter_et, presenter_ru,presenter_en to make them availible for download 
with links inside paella. Also need of editing event sources with video editor. 

If Upload and Shedule workflow works with multiaudio then, next step is then Pyca ffmpeg configuration with 2 video and 3 audio inputs. 
Plus same with OBS Studio plugin (3 video streams, each in different audio: et, en, ru). 

Any code examples would help ;-) 

Can somebody have visual block scheme / diagram for OC default workflow "Upload and Shedule", to understand and study it through. Would be so helpful. 

With best wishes.  

Carlos Turro Ribalta

unread,
Apr 25, 2022, 1:52:24 AM4/25/22
to us...@opencast.org, y...@oul.ch, Rein L.

Hi Yannis and Rein

 

I can confirm that for Paella Player 7, HLS is the way to have multiple language audio. Until PP6 we have been supporting other options, but results are a bit disappointing since web browsers actively try to kill the audio change, probably for ad reasons. Rein’s PP6 config looks ok to me, so it should be working at least with some browsers. Seems that we have removed the PP6 demos, but if you really need it working in PP6 send me a mail so I can help in checking check the actual config.

 

What PP7 needs is a HLS .m3u8 file that references all the audio tracks.

 

The best solution would be to process an HLS multi-audio file but unfortunately, the opencast dev team choose a method for HLS production who make impossible the usage of advanced filter in ffmpeg then it's impossible to produce the type of HLS file with an Opencast workflow.

I am not fully aware of this. Of course, we are currently using HLS with Opencast, but not in multiaudio. Could you elaborate a bit on this?. Having multiaudio in production is also in our roadmap, so I’d like to know more about that issue.

 

Thanks!

 

Carlos

--
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.

Yannis Marti

unread,
Apr 25, 2022, 2:51:29 AM4/25/22
to Opencast Users, tu...@cc.upv.es, Yannis Marti, Rein L.
Dear Carlos and Rein,

Thanks for this discussion.

To quickly answer Carlos' question: you can find about in the documentation and also in the source on github. https://docs.opencast.org/r/10.x/admin/#workflowoperationhandlers/process-smil-woh/#notevery-important

Rein, we can discuss specific point on multi-languages workflow with pleasure, unfortunately i do not have specific workflow to share at this time - hope in few times it would be possible.

About the workflow visualization, did you have a look at https://github.com/opencast/workflow-editor ?

Have a nice Monday :)
Yannis

Rein L.

unread,
Apr 25, 2022, 3:10:26 PM4/25/22
to Opencast Users, y...@oul.ch, tu...@cc.upv.es, Rein L.
HI Carlos and Yannis

Thank you again. I will definitely look workflow-editor.
First I thought this is for creating workflows from scratch,
but indeed, it will visualize existing ones also. 

Yes, Carlos, i would love to have working PP6 multiaudio config indeed. Thank you in advance. 
In editing the "Upload and Schedule" workflow, partial-preview.xml, my test is working only partly. 

With all the best wishes!

Rein

Yannis Marti

unread,
Jun 6, 2022, 12:27:08 PM6/6/22
to Opencast Users, Rein L., Yannis Marti, tu...@cc.upv.es

Hi Everyone,

After longtime talking multilingual production issue, I finally found a discussion on a pull request in the opencast github ( https://github.com/opencast/opencast/pull/3128 ). Thanks for this Lars ;-)

Based on this example, I adapted it to handle multiple audio processing… and yes, it’s working. We can maybe do it better, but at the end, it’s a start :-)

Unfortunately, as the name parameter in -var_stream_map is override during the process, Paella shows me group and name in place of the correct name or the language who’s been setup.

So my question (maybe for Carlos): Is it possible to show the language (language code or dictionary) in the Audioselector?

audioselector.jpg

I share here a 7 languages version who process a 6 pid source file with audio pan on channel 0/1 (typical OBS rec file with multiple audio selected) and 4 videos quality.

profile.hls-7lang-4v.multi.name = HLS multi output 7audio+4video
profile.hls-7lang-4v.multi.input = visual
profile.hls-7lang-4v.multi.output = visual
profile.hls-7lang-4v.multi.suffix = .m3u8
profile.hls-7lang-4v.multi.ffmpeg.command = -i #{in.video.path} \
-filter_complex:v [0:v]scale=1280:-2,fps=30[vout0] \
-map [vout0] \
-force_key_frames:v:0 expr:eq(mod(n,60),0) \
-x264opts:v:0 rc-lookahead=60:keyint=120:min-keyint=60:no-open-gop=1 \
-preset:v:0 veryfast \
-pix_fmt:v:0 yuv420p \
-c:v:0 libx264 \
-maxrate:v 4900k \
-bufsize:v 4M \
-b:v:0 4500k \
-filter_complex:v [0:v]scale=960:-2,fps=30[vout1] \
-map [vout1] \
-force_key_frames:v:1 expr:eq(mod(n,60),0) \
-x264opts:v:1 rc-lookahead=60:keyint=120:min-keyint=60:no-open-gop=1 \
-preset:v:1 veryfast \
-pix_fmt:v:1 yuv420p \
-c:v:1 libx264 \
-maxrate:v 2700k \
-bufsize:v 2M \
-b:v:1 2500k \
-filter_complex:v [0:v]scale=640:-2,fps=30[vout2] \
-map [vout2] \
-force_key_frames:v:2 expr:eq(mod(n,60),0) \
-x264opts:v:2 rc-lookahead=60:keyint=120:min-keyint=60:no-open-gop=1 \
-preset:v:2 veryfast \
-pix_fmt:v:2 yuv420p \
-c:v:2 libx264 \
-maxrate:v:2 1320k \
-bufsize:v:2 1M \
-b:v:1 1200k \
-filter_complex:v [0:v]scale=320:-2,fps=15[vout3] \
-map [vout3] \
-force_key_frames:v:3 expr:eq(mod(n,30),0) \
-x264opts:v:3 rc-lookahead=30:keyint=60:min-keyint=30:no-open-gop=1 \
-preset:v:3 veryfast \
-pix_fmt:v:3 yuv420p \
-c:v:3 libx264 \
-minrate:v:3 90k \
-maxrate:v:3 110k \
-bufsize:v:3 100k \
-b:v:3 100k \
-filter_complex:a [0:a:0]pan=mono|c0=c0[aout0];[0:a:1]pan=mono|c0=c0[aout1];[0:a:2]pan=mono|c0=c0[aout2];[0:a:3]pan=mono|c0=c0[aout3];[0:a:4]pan=mono|c0=c0[aout4];[0:a:5]pan=mono|c0=c0[aout5];[0:a:0]pan=mono|c0=c1[aout6] \
-map [aout0] \
-map [aout1] \
-map [aout2] \
-map [aout3] \
-map [aout4] \
-map [aout5] \
-map [aout6] \
-c:a aac \
-b:a 96k \
-var_stream_map "a:0,agroup:hls-7lang-4v,default:yes,language:mul,name:Floor a:1,agroup:hls-7lang-4v,language:eng,name:english a:2,agroup:hls-7lang-4v,language:fra,name:french a:3,agroup:hls-7lang-4v,language:spa,name:spanish a:4,agroup:hls-7lang-4v,language:ara,name:arabic a:5,agroup:hls-7lang-4v,language:rus,name:russian a:6,agroup:hls-7lang-4v,language:zho,name:chinese v:0,agroup:hls-7lang-4v,name:1280 v:1,agroup:hls-7lang-4v,name:960 v:2,agroup:hls-7lang-4v,name:640 v:3,agroup:hls-7lang-4v,name:320" \
-hls_time 6 \
-flags +global_header+cgop \
-movflags +faststart \
-err_detect compliant \
-copyts \
-muxdelay 0 \
-hls_segment_type fmp4 \
-f hls \
-hls_list_size 0 \
-hls_playlist_type vod \
-hls_flags single_file+program_date_time+independent_segments+round_durations \
-hls_segment_filename #{out.dir}/#{out.name}_segment_%v.mp4 \
-master_pl_name #{out.name}-master.m3u8 \
#{out.dir}/#{out.name}_variant_%v#{out.suffix}

Miguel Escriva Gregori

unread,
Jun 7, 2022, 7:11:45 AM6/7/22
to Opencast Users
Hi Yannis!

Are you using paella 6 or paella 7?

I think it should work on paella 7 as it is similar to what is done in paella documentation https://paellaplayer.upv.es/#/doc/ffmpeg_multiple_audio_tracks_hls.md


Miguel


El 6 jun 2022, a las 18:27, Yannis Marti <y...@oul.ch> escribió:

Hi Everyone,

After longtime talking multilingual production issue, I finally found a discussion on a pull request in the opencast github ( https://github.com/opencast/opencast/pull/3128 ). Thanks for this Lars ;-)

Based on this example, I adapted it to handle multiple audio processing… and yes, it’s working. We can maybe do it better, but at the end, it’s a start :-)

Unfortunately, as the name parameter in -var_stream_map is override during the process, Paella shows me group and name in place of the correct name or the language who’s been setup.

So my question (maybe for Carlos): Is it possible to show the language (language code or dictionary) in the Audioselector?

<audioselector.jpg>

<audioselector.jpg>

y...@oul.ch

unread,
Jun 7, 2022, 7:29:53 AM6/7/22
to us...@opencast.org

Hi Miguel,

 

Thanks for your kind update. I’m using Opencast in 11.7 so it’s Paella 6.5.6 who’s actually bundle.

If I’m correct, Paella 7 will come with the version 12 of Opencast. I presume I will need to wait for this update to fix this issue in this case. I have exactly the same kind of master.m3u8 as you describe in your documentation. With a “NAME=”audio_X” and the language information. Except I’m using three letters code for language but normally will not impact.

 

Do you think possible in Paella 7 to specify which data need to be shown ? (group, name, language) or it’s something defined on your side ? As actually : “title: track.groupId + " " + track.name

 

Thanks for your time on this issue.

Best,

Yannis

 

De : us...@opencast.org <us...@opencast.org> De la part de Miguel Escriva Gregori
Envoyé : mardi, 7 juin 2022 13:12
À : Opencast Users <us...@opencast.org>
Objet : Re: [OC Users] Multilanguage (Simultaneous translation) Lecture recording

Miguel Escriva Gregori

unread,
Jun 7, 2022, 8:23:19 AM6/7/22
to Opencast Users
Hi!

The label to show is hardcoded in the paella code.

You can test paella 7 in your current opencast. You need to follow these instructions:

1.- Clone opencast repository

$ git clone https://github.com/opencast/opencast.git

2.- Go to paella 7 module

$ cd opencast/modules/engage-paella-player-7

3.- Build paella 7

$ npm ci
$ npm run build

4.- Run paella in develop mode using your own opencast server as backend

$ npm run dev -- --env server=https://develop.opencast.org

5.- Open the engage page

http://localhost:7070/engage/ui/index.html


If you found an error, you can fill an issue to https://github.com/polimediaupv/paella-core

Or you can try to fix it and make a pull-request.
Relevant source code:
https://github.com/polimediaupv/paella-core/blob/main/src/js/videoFormats/es.upv.paella.hlsVideoFormat.js#L304-L309



Miguel

El 7 jun 2022, a las 13:29, y...@oul.ch escribió:

Hi Miguel,
 
Thanks for your kind update. I’m using Opencast in 11.7 so it’s Paella 6.5.6 who’s actually bundle.

If I’m correct, Paella 7 will come with the version 12 of Opencast. I presume I will need to wait for this update to fix this issue in this case. I have exactly the same kind of master.m3u8 as you describe in your documentation. With a “NAME=”audio_X” and the language information. Except I’m using three letters code for language but normally will not impact.
 
Do you think possible in Paella 7 to specify which data need to be shown ? (group, name, language) or it’s something defined on your side ? As actually : “title: track.groupId + " " + track.name
 
Thanks for your time on this issue.
Best,
Yannis
 
De : us...@opencast.org <us...@opencast.org> De la part de Miguel Escriva Gregori
Envoyé : mardi, 7 juin 2022 13:12
À : Opencast Users <us...@opencast.org>
Objet : Re: [OC Users] Multilanguage (Simultaneous translation) Lecture recording
 
Hi Yannis! 
 
Are you using paella 6 or paella 7?
 
I think it should work on paella 7 as it is similar to what is done in paella documentation https://paellaplayer.upv.es/#/doc/ffmpeg_multiple_audio_tracks_hls.md
 
 
Miguel
El 6 jun 2022, a las 18:27, Yannis Marti <y...@oul.ch> escribió:
 
Hi Everyone,
After longtime talking multilingual production issue, I finally found a discussion on a pull request in the opencast github ( https://github.com/opencast/opencast/pull/3128). Thanks for this Lars ;-)

Miguel Escriva Gregori

unread,
Jun 8, 2022, 8:43:34 AM6/8/22
to Opencast Users
Hi Yannis!

Fernando has updated the paella-core library, and now you can customize the audio label using the `audioTrackLabel` setting in the config.json.


In the following days, I will make a pull request to update the player in opencast.

Miguel

Yannis Marti

unread,
Jun 8, 2022, 9:57:25 AM6/8/22
to us...@opencast.org
Hi Miguel,

Thank you for sharing all this information. I have to setup a test environement to play with your setup and i prefer not do it into my production opencast :-)

I know we are a very small group who are using Opencast with multiple languages content, so that's so kind from you to take this issue and our discussion in consideration. 

Will really enjoy to test it a soon as it's published. 🌻

Best regards,
Yannis

Yannis Marti

unread,
Jun 17, 2022, 4:14:00 PM6/17/22
to Opencast Users
Hi Miguel,
I finally installed today a version 12 and start playing with Paella 7.
It's look like it's too hurly to be able to test it. Video quality don't list anything and audio selector just never appear.
I'm sure it will come better on next release and i will comeback to you.
If you want some video link for testing on your side, do not hesitate to contact me directly.
Best regards,
YannisCapture d’écran 2022-06-17 220700.png

Miguel Escriva Gregori

unread,
Jun 18, 2022, 10:38:13 AM6/18/22
to us...@opencast.org
Hi Yannis,

Yes! Send me a link and I will test it.

Miguel

El 17 jun 2022, a las 22:14, Yannis Marti <y...@oul.ch> escribió:

Hi Miguel,
I finally installed today a version 12 and start playing with Paella 7.
It's look like it's too hurly to be able to test it. Video quality don't list anything and audio selector just never appear.
I'm sure it will come better on next release and i will comeback to you.
If you want some video link for testing on your side, do not hesitate to contact me directly.
Best regards,
Yannis<Capture d’écran 2022-06-17 220700.png>

Rein L.

unread,
Jul 13, 2022, 11:53:55 AM7/13/22
to Opencast Users, Miguel Escriva Gregori
Hello everyone

Thank you, Yannis, for example. 
I am testing also opencast 12 (085d2c6 ) with paella 7.

I have a question with HLS multiaudio encoding.
I have a challenge to make hls encoding profile working in in opencast, even this silmilar ffmpeg  works in local terminal command. 
 
Encoding works well in local terminal ffmpeg command, with 1 audiovideo input + 2 audio iputs.
Local srpript to test in terminal, is here: https://pastebin.com/e9c7ySwa 
Result log is here:   https://pastebin.com/5ZTbMd3z

 But i'm confused with opencast, basicly with same encoding, wiht changes for inputs and outputs. 
Workflow starts but stands in "Running" state, in encondig operation, without result. 
Process stand with last following log: 
          "2022-07-13T11:10:27,752 | INFO  | (ComposerServiceImpl:573) - Starting parallel encode with
    profile fast-paellateam.multi with job load 1.5"

Longer log is here: https://pastebin.com/ATXT8PNR 
Input listprovider: https://pastebin.com/5ibDAqvM

Yannis, I tried your 7 audio example as welll, made for this 7 audio track MKV file for input.
(Suppose you did have, multitrack audio MKV) 
But result is same, as workflow above - process stands with following  log:  https://pastebin.com/rnBCVnt9
     "2022-07-13T10:45:34,133 | INFO  | (ComposerServiceImpl:573) - Starting parallel encode with
     profile hls-yannis.multi with job load 1.5"
and does not move futher. 

Can anybody help with this information in hand. Can somebody try this encoding, or share working one, with OC 12, 
What would I miss here?

Sincerely 

Rein L.
--
EMKTS.ee, Tallinn

y...@oul.ch

unread,
Jul 13, 2022, 1:19:51 PM7/13/22
to us...@opencast.org

Hi Rein,

 

From what I see in your files, it’s look like you mix two different approaches.

 

Old one: separated language rec file uploaded with different “presenter_langXX” tag

New one: multi-hls encoding from simple presenter

 

If you try the workflow I share with a default opencast installation, it will work. But if you have multiple separated file with English.mp4 / Russian.mp4 / … you have to first create a single file with all your language in relation with the map you set on your encoding profile.

 

This encoding process expect only one file with all language inside.

 

Hope this help,

Best,

Yannis

 

De : us...@opencast.org <us...@opencast.org> De la part de Rein L.
Envoyé : mercredi, 13 juillet 2022 17:54
À : Opencast Users <us...@opencast.org>
Cc : Miguel Escriva Gregori <mie...@upv.es>

--
To unsubscribe from this topic, visit https://groups.google.com/a/opencast.org/d/topic/users/6vSU4M3Q9t0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to users+un...@opencast.org.

Rein L.

unread,
Jul 16, 2022, 2:58:13 AM7/16/22
to Opencast Users, y...@oul.ch
Hello Yannis

Thank you so much for answer! I understand the possibility that multiple input can be problem. 

As  you see, i did test your 7 audio example with one input file, where are multiple audio tracks in one MKV container. 
Result is same as with multiple input test - process will stay wihtout moving forward and 
Log will say:   Starting parallel encode with profile 123.http with job load 1.5
and it not moving forward. 
So both encoding example - Yours and Palle team example the ending process will stop in my setting in one same place. 
And as log is not giving more information, 
i do not know how to move forward. 

But same time,  I hope that multiple input will work also in HLS encoding as Palla team has this example 
https://github.com/polimediaupv/paella-core/blob/main/doc/ffmpeg_multiple_audio_tracks_hls.md
and it has 1 video + 3 audio input. 
I tested this and it works locally
I did put log about this result https://pastebin.com/5ZTbMd3z abd indeed result will be encoded files with smil with m3u8 and encoded vide segments 

Question remains. How to find out why encoding stops in both examples in my setting (Opencast 12, CentOS 8)  in yours and in Paella team example
For any case i copy my example data here

Is there a debug mode, or something, to see more why it stops. 

In hope ;-)
Sincerely 

Rein
Reply all
Reply to author
Forward
0 new messages