aau-zid / BigBlueButton-liveStreaming

Streams a given BBB Meeting to an RTMP Server.
GNU General Public License v3.0
200 stars 159 forks source link

Failed to start livestream #34

Closed julienrat closed 4 years ago

julienrat commented 4 years ago

Trying to start livestream .... but doesn't work for me ... ideas ? liveStreaming | libpostproc 55. 5.100 / 55. 5.100 liveStreaming | false: No such file or directory liveStreaming | INFO:root:Open BBB and hide elements!! liveStreaming | INFO:root:create_meeting... liveStreaming | INFO:root:A meeting already exists with that meeting ID. Please use a different meeting ID. liveStreaming | INFO:root:get_join_url... liveStreaming | Traceback (most recent call last): liveStreaming | File "stream.py", line 157, in <module> liveStreaming | bbb_browser() liveStreaming | File "stream.py", line 75, in bbb_browser liveStreaming | WebDriverWait(browser, selelnium_timeout).until(element) liveStreaming | File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until liveStreaming | raise TimeoutException(message, screen, stacktrace) liveStreaming | selenium.common.exceptions.TimeoutException: Message: liveStreaming | liveStreaming exited with code 1 root@ns3127147:~#

mtsonline commented 4 years ago

"liveStreaming | false: No such file or directory liveStreaming |" what exactly are you doing and what does your config look like?

mtsonline commented 4 years ago

"liveStreaming | false: No such file or directory liveStreaming |"

What exactly are you doing? and what does your config look like?

julienrat commented 4 years ago

Like this : version: '3.3' services: bbb-streamer: image: aauzid/bigbluebutton-livestreaming container_name: liveStreaming environment:

BigBlueButton Server url:

  - BBB_URL=https://bbbdbloc.ovh/bigbluebutton/api
  # BigBlueButton secret:
  - BBB_SECRET=2SyuA0KGcmQtTXXXXXXXXXXXXXXXXXXXXXYlzsbNw
  # BigBlueButton meetingID:
  - BBB_MEETING_ID=09XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  # start meeting (optional):
  - BBB_START_MEETING=false
  # attendee password (optional - has to be set to the attendee password of moodle/greenlight or any other frontend to allow joining via their links):
  - BBB_ATTENDEE_PASSWORD=XXXXXXXXXXXXXX
  # moderator password (optional - has to be set to the moderator password of moodle/greenlight or any other frontend to allow joining via their links):
  - BBB_MODERATOR_PASSWORD=XXXXXXXXXXXXXXXX
  # meeting title (optional):
  - BBB_MEETING_TITLE=liveStreaming Test
  # download / save BigBlueButton meeting
  - BBB_DOWNLOAD_MEETING=false
  # play intro file (can be a local file in videodata folder e.g. /video/intro.mp4 or a url of a mediastream e.g. https://my.intro.stream)
  - BBB_INTRO=false
  # begin the intro at position (optional, e.g. 00:00:05)
  - BBB_BEGIN_INTRO_AT=04:40
  # end intro after (optional, e.g. 01:00:00 - after one hour)
  - BBB_END_INTRO_AT=
  # Media server url:
  - BBB_STREAM_URL=rtmp://a.rtmp.youtube.com/live2/XXXXXXXXXXXXXXXXXX
  # Timezone (default: Europe/Vienna):
  - TZ=Europe/Vienna

volumes:

julienrat commented 4 years ago

I'm trying to stream on youtube

erenilhan commented 4 years ago

Hi @mtsonline I have a same problem. I use Turkish and changed stream.py file in docker (aria-label). But I get an error. The user named "Live" join in but about 1 mins later it leave. Errors log output is here;

INFO:root:get_join_url...
Traceback (most recent call last):
File "stream.py", line 157, in <module>
bbb_browser()
File "stream.py", line 75, in bbb_browser
WebDriverWait(browser, selelnium_timeout).until(element)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
mtsonline commented 4 years ago

@erenilhan your bbb has to provide english language because selenium relys on the english labels. If you do not remove english and the browser decides which language to use it should work, even if you have turkish as second language available.

@julienrat please give the exact commands you try to use. thanks

erenilhan commented 4 years ago

@mtsonline thank you very much. I will try.

julienrat commented 4 years ago

@mtsonline I have followed your instructions in README file, and i launch with docker compose up

mtsonline commented 4 years ago

@julienrat ...I guess yur streamer searches for the intro file named "false"

  • BBB_INTRO=false

try to remove the "false" I guess then it should work. cheers Martin

erenilhan commented 4 years ago

yes @mtsonline its working now! 👍 thanks. also @julienrat BBB_STREAM_URL

julienrat commented 4 years ago

image

julienrat commented 4 years ago

now ! No false error ;)

julienrat commented 4 years ago

I have the impression that the selenium browser is waiting for click ... and the timeout takes over

ontimond commented 4 years ago

@erenilhan your bbb has to provide english language because selenium relys on the english labels. If you do not remove english and the browser decides which language to use it should work, even if you have turkish as second language available.

@julienrat please give the exact commands you try to use. thanks

Where can I adjust the settings for the language?

mtsonline commented 4 years ago

the liveStreaming docker container uses english language - you cannot change this and the browser even will show the english labels.

why would you need to change it? It won't hurt to not remove english language from bbb - you do not have to use it if you do not need it though.

ontimond commented 4 years ago

Ok now I understand it, I assumed that it must be configured somewhere, even so I still have the same problem, the echo test is activated also

$ docker-compose up
Recreating liveStreaming ... done
Attaching to liveStreaming
liveStreaming   | INFO:root:Starting browser!!
liveStreaming   | INFO:root:Open BBB and hide elements!!
liveStreaming   | INFO:root:create_meeting...
liveStreaming   | INFO:root:get_join_url...
liveStreaming   | Traceback (most recent call last):
liveStreaming   |   File "stream.py", line 157, in <module>
liveStreaming   |     bbb_browser()
liveStreaming   |   File "stream.py", line 75, in bbb_browser
liveStreaming   |     WebDriverWait(browser, selelnium_timeout).until(element)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/support/wait.py", line 80, in until
liveStreaming   |     raise TimeoutException(message, screen, stacktrace)
liveStreaming   | selenium.common.exceptions.TimeoutException: Message: 
liveStreaming   | 
liveStreaming exited with code 1

and this is my docker-compose

version: '3.3'
services:
  bbb-streamer:
    image: aauzid/bigbluebutton-livestreaming
    container_name: liveStreaming
    environment:
      # BigBlueButton Server url:
      - BBB_URL=https://live.xxxx.com/bigbluebutton/api
      # BigBlueButton secret:
      - BBB_SECRET=xxxxxx
      # BigBlueButton meetingID:
      - BBB_MEETING_ID=1#test+streaming+3
      # start meeting (optional):
      - BBB_START_MEETING=false
      # attendee password (optional - has to be set to the attendee password of moodle/greenlight or any other frontend to allow joining via their links):
      - BBB_ATTENDEE_PASSWORD=kDQE8
      # moderator password (optional - has to be set to the moderator password of moodle/greenlight or any other frontend to allow joining via their links):
      - BBB_MODERATOR_PASSWORD=DpSpZQuT
      # meeting title (optional):
      - BBB_MEETING_TITLE=liveStreaming Test
      # download / save BigBlueButton meeting
      - BBB_DOWNLOAD_MEETING=false
      # play intro file (can be a local file in videodata folder e.g. /video/intro.mp4 or a url of a mediastream e.g. https://my.intro.stream)
      # - BBB_INTRO=false
      # begin the intro at position (optional, e.g. 00:00:05)
      # - BBB_BEGIN_INTRO_AT=04:40
      # end intro after (optional, e.g. 01:00:00 - after one hour)
      # - BBB_END_INTRO_AT=
      # Media server url:
      - BBB_STREAM_URL=rtmp://a.rtmp.youtube.com/live2/stream/xxxxxx
      # Timezone (default: Europe/Vienna):
      - TZ=Europe/Vienna

    volumes:
      - ./videodata:/video
mtsonline commented 4 years ago

which version of bbb are you using? are you sure you did not do any changes? This still shows, that selenium cannot find the label it expects.

ontimond commented 4 years ago
$ bbb-conf --version

ii  bbb-apps                              1:2.2.0-45                                      amd64        BigBlueButton applications for Red5
ii  bbb-apps-akka                         2.2.0-87                                        all          BigBlueButton Apps (Akka)
ii  bbb-apps-screenshare                  1:2.2.0-45                                      amd64        BigBlueButton screenshare module for Red5
ii  bbb-apps-sip                          1:2.2.0-11                                      amd64        BigBlueButton SIP module for Red5
ii  bbb-apps-video                        1:2.2.0-42                                      amd64        BigBlueButton video module for Red5
ii  bbb-apps-video-broadcast              1:2.2.0-8                                       amd64        BigBlueButton video broadcast module for Red5
ii  bbb-client                            1:2.2.0-40                                      amd64        BigBlueButton Flash client
ii  bbb-config                            1:2.2.0-191                                     amd64        BigBlueButton configuration utilities
ii  bbb-demo                              1:2.2.0-9                                       amd64        BigBlueButton API demos
ii  bbb-etherpad                          1:2.2.0-51                                      amd64        The EtherPad Lite components for BigBlueButton
ii  bbb-freeswitch-core                   2:2.2.0-112                                     amd64        BigBlueButton build of FreeSWITCH
ii  bbb-freeswitch-sounds                 1:1.6.7-6                                       amd64        FreeSWITCH Sounds
ii  bbb-fsesl-akka                        2.2.0-65                                        all          BigBlueButton FS-ESL (Akka)
ii  bbb-html5                             1:2.2.0-937                                     amd64        The HTML5 components for BigBlueButton
ii  bbb-mkclean                           1:0.8.7-3                                       amd64        Clean and optimize Matroska and WebM files
ii  bbb-playback-presentation             1:2.2.0-30                                      amd64        BigBluebutton playback of presentation
ii  bbb-record-core                       1:2.2.0-66                                      amd64        BigBlueButton record and playback
ii  bbb-red5                              1:1.0.10-16                                     amd64        The Red5 server for BigBlueButton
ii  bbb-transcode-akka                    2.2.0-8                                         all          BigBlueButton Transcoder
ii  bbb-web                               1:2.2.0-130                                     amd64        BigBlueButton API
ii  bbb-webrtc-sfu                        1:2.2.0-99                                      amd64        BigBlueButton WebRTC SFU
ii  bigbluebutton                         1:2.2.0-5                                       amd64        Open source web conferencing platform (bbb)
ii  ffmpeg                                7:4.2.2-1bbb1~ubuntu16.04                       amd64        Tools for transcoding, streaming and playing of multimedia files
ii  libavcodec58:amd64                    7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice58:amd64                   7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter7:amd64                    7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library containing media filters - runtime files
ii  libavformat58:amd64                   7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample4:amd64                  7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg compatibility library for resampling - runtime files
ii  libavutil56:amd64                     7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library with functions for simplifying programming - runtime files
ii  libopusenc0                           0.2.1-1bbb1                                     amd64        High-level API for encoding Ogg Opus audio streams
ii  libpostproc55:amd64                   7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for post processing - runtime files
ii  libswresample3:amd64                  7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale5:amd64                     7:4.2.2-1bbb1~ubuntu16.04                       amd64        FFmpeg library for image scaling and various conversions - runtime files
mtsonline commented 4 years ago

please do bbb-conf --check and have a look at the top, there is the correct bbb version - and please only post the version not the whole output

ontimond commented 4 years ago

Ok sorry, the version is 2.2.17

mtsonline commented 4 years ago

hm... this should work - did not hear about any problems with the recent versions. so it really looks as if there is a setting other than the default, that interfears. how do you create the meeting? via greenlight? did you try to configure LiveStreaming to join as moderator and let it start the meeting itself?

ontimond commented 4 years ago

When I create and start the conference by greenlight, I copy the meeting id in the docker-compose and live works without problems, but when I try to create a conference from the docker-compose itself, assigning a random meeting id, that's when it generates the error

mtsonline commented 4 years ago

would have been helpful if you had described this earlier.

so the problem is not, that streaming does not work, but that you where not able to configure the liveStreaming to create and start a meeting. how does your docker-compose configuration look like? how did you generate the id or didn't you specify one? Did you set passwords?...

ontimond commented 4 years ago
version: '3.3'
services:
  bbb-streamer:
    image: aauzid/bigbluebutton-livestreaming
    container_name: liveStreaming
    environment:
      # BigBlueButton Server url:
      - BBB_URL=https://live.xxxx.com/bigbluebutton/api
      # BigBlueButton secret:
      - BBB_SECRET=xxxxxx
      # BigBlueButton meetingID:
      - BBB_MEETING_ID=1#test+streaming+3
      # start meeting (optional):
      - BBB_START_MEETING=false
      # attendee password (optional - has to be set to the attendee password of moodle/greenlight or any other frontend to allow joining via their links):
      - BBB_ATTENDEE_PASSWORD=kDQE8
      # moderator password (optional - has to be set to the moderator password of moodle/greenlight or any other frontend to allow joining via their links):
      - BBB_MODERATOR_PASSWORD=DpSpZQuT
      # meeting title (optional):
      - BBB_MEETING_TITLE=liveStreaming Test
      # download / save BigBlueButton meeting
      - BBB_DOWNLOAD_MEETING=false
      # play intro file (can be a local file in videodata folder e.g. /video/intro.mp4 or a url of a mediastream e.g. https://my.intro.stream)
      # - BBB_INTRO=false
      # begin the intro at position (optional, e.g. 00:00:05)
      # - BBB_BEGIN_INTRO_AT=04:40
      # end intro after (optional, e.g. 01:00:00 - after one hour)
      # - BBB_END_INTRO_AT=
      # Media server url:
      - BBB_STREAM_URL=rtmp://a.rtmp.youtube.com/live2/stream/xxxxxx
      # Timezone (default: Europe/Vienna):
      - TZ=Europe/Vienna

    volumes:
      - ./videodata:/video

It is this same configuration, before executing the docker-compose there was no meeting with that id, so in this case I put 1#test+streaming+3, I ran it and got the error, then I checked if it was created the meeting and yes it was created, I confirmed it with the meeting list using the api.

mtsonline commented 4 years ago

ok. could you try to leave / comment the meeting ID and passwords and check what happens?

ontimond commented 4 years ago

When I comment or leave the meeting id option blank I get the following error:

Recreating liveStreaming ... done
Attaching to liveStreaming
liveStreaming   | INFO:root:Starting browser!!
liveStreaming   | INFO:root:Open BBB and hide elements!!
liveStreaming   | INFO:root:create_meeting...
liveStreaming   | INFO:root:You must specify a meeting ID for the meeting.
liveStreaming   | INFO:root:get_join_url...
liveStreaming   | Traceback (most recent call last):
liveStreaming   |   File "stream.py", line 157, in <module>
liveStreaming   |     bbb_browser()
liveStreaming   |   File "stream.py", line 73, in bbb_browser
liveStreaming   |     browser.get(get_join_url())
liveStreaming   |   File "stream.py", line 105, in get_join_url
liveStreaming   |     minfo = bbb.get_meeting_info(args.id)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/bigbluebutton_api_python/bigbluebutton.py", line 69, in get_meeting_info
liveStreaming   |     response = self.__send_api_request(ApiMethod.GET_MEETING_INFO, params)
liveStreaming   |   File "/usr/local/lib/python3.6/dist-packages/bigbluebutton_api_python/bigbluebutton.py", line 149, in __send_api_request
liveStreaming   |     rawXml["message"])
liveStreaming   | bigbluebutton_api_python.exception.bbbexception.BBBException: You must specify a meeting ID for the meeting.
liveStreaming exited with code 1

When I comment or leave blank some of the two passwords I get the following error:

Recreating liveStreaming ... done
Attaching to liveStreaming
liveStreaming   | usage: stream.py [-h] [-s SERVER] [-p SECRET] [-i ID] [-I INTRO]
liveStreaming   |                  [-B BEGININTROAT] [-E ENDINTROAT] [-l] [-d] [-m] [-S]
liveStreaming   |                  [-A ATTENDEEPASSWORD] [-M MODERATORPASSWORD]
liveStreaming   |                  [-T MEETINGTITLE] [-u USER] [-t TARGET] [-c]
liveStreaming   | stream.py: error: unrecognized arguments:  
liveStreaming exited with code 2

I was reviewing the meeting that is created when I get the initial error, I don't know if it has to do with the problem but the maxUsers parameter is at 0:

<meeting>
   <meetingName>liveStreaming Test</meetingName>
   <meetingID>1#test+streaming+3</meetingID>
   <internalMeetingID>76976ec8dc3cd306f651ab2a431384781f1f4224-1597267023203</internalMeetingID>
   <createTime>1597267023203</createTime>
   <createDate>Wed Aug 12 23:17:03 CEST 2020</createDate>
   <voiceBridge>14870</voiceBridge>
   <dialNumber>613-555-1234</dialNumber>
   <attendeePW>kDQE8</attendeePW>
   <moderatorPW>DpSpZQuT</moderatorPW>
   <running>false</running>
   <duration>0</duration>
   <hasUserJoined>false</hasUserJoined>
   <recording>false</recording>
   <hasBeenForciblyEnded>false</hasBeenForciblyEnded>
   <startTime>1597267023242</startTime>
   <endTime>0</endTime>
   <participantCount>0</participantCount>
   <listenerCount>0</listenerCount>
   <voiceParticipantCount>0</voiceParticipantCount>
   <videoCount>0</videoCount>
   <maxUsers>0</maxUsers>
   <moderatorCount>0</moderatorCount>
   <attendees />
   <metadata />
   <isBreakout>false</isBreakout>
</meeting>
mtsonline commented 4 years ago

ok I noticed two things ... if you do not start the meeting via greenlight you will have to set

and you may need BBB_AS_MODERATOR being set to true as well. can you try this?

ontimond commented 4 years ago

I changed the value of BBB_START_MEETING to true and add BBB_AS_MODERATOR = true, the error persists

mtsonline commented 4 years ago

I really have no more ideas what you could try. maybe set up a new bbb server and test with it ... :-/