GithubHelp home page GithubHelp logo

trahay / bbb-downloader Goto Github PK

View Code? Open in Web Editor NEW
106.0 7.0 23.0 55 KB

a few scripts for downloading BBB videos

License: GNU General Public License v3.0

Shell 49.89% Python 43.62% JavaScript 4.73% Dockerfile 1.76%
bigbluebutton docker ffmpeg

bbb-downloader's People

Contributors

gdarko avatar mahanmmi avatar olberger avatar trahay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bbb-downloader's Issues

Problem downloading a BBB presentation (maybe due to login needed)

As stated in the title, I tried downloading a university presentation, for which I need a username and password to access.Trying to download the presentation resulted in the next error (I included thw whole process, from the command to the error):

sudo bash capture-full-replay.sh https://manager.didaktik-bigblue.rwu.de/playback/presentation/2.0/playback.html?meetingId=fa8c2d3e6b6816ea4fa13adcc3f0f4fed44469c5-1587016732599
Traceback (most recent call last):
File "/home/nhd/bbb-downloader/bbb.py", line 127, in
extractor._real_extract(url)
File "/home/nhd/bbb-downloader/bbb.py", line 69, in _real_extract
root = ET.fromstring(metadata)
File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: mismatched tag: line 8, column 6

Any ideas guys?

Add a way to crop the full replay capture to the window contents only

The capture of the replays made with Selenium captures the whole of the X display, including the Firefox windows, decorations, etc.

Unfortunately, there doesn't seem to be a way to switch the Firefox window contents to fullscreen with the Selenium marionette driver (or I haven't check well).

An option would then be to automatically crop the video to only deliver the inner part of the window.
Haven't investigated the post-processing options.

Of course, there would also be a need for cutting start/end of screen capture.

Error connecting to docker

Hello,

I got an error since I updated Docker, here it is :

Waiting for docker-selenium to be ready...
...................................................
Container docker internal IP: 172.17.0.2
Selenium all done and ready for testing!

Please wait for 5117 seconds, while we capture the playback...

/opt/bbb-downloader/node_modules/selenium-webdriver/lib/promise.js:2626
throw error;
^

Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:49159
at ClientRequest. (/opt/bbb-downloader/node_modules/selenium-webdriver/http/index.js:238:15)
at ClientRequest.emit (events.js:198:13)
at Socket.socketErrorListener (_http_client.js:401:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
From: Task: WebDriver.createSession()
at Function.createSession (/opt/bbb-downloader/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/opt/bbb-downloader/node_modules/selenium-webdriver/firefox/index.js:521:41)
at createDriver (/opt/bbb-downloader/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/opt/bbb-downloader/node_modules/selenium-webdriver/index.js:632:16)
at Object. (/opt/bbb-downloader/bbb-downloader/selenium-play-bbb-recording.js:21:6)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Add the possibility to select the video resolution

Thank you very much.
Can I set higher resolution and h.264 main profile?
After a download I have only 520 pixels like vertical resolution and I can open the file only with vlc (due to high 4:4:4 profile).
I can convert them manually with commamd "ffmpeg -i input.mp4 -profile:v main -pix_fmt yuv420p out.mp4" to solve the issue, but can you do anything while downloading?

Originally posted by @gioluca2 in #16 (comment)

I do not seem to be able to install the python requirements

I tried implementing the steps mentioned in the readme section, after I reach the "pip3 install -r python-requirements.txt" command, I get the following error:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'python-requirements.txt'
I have Ubuntu 20.04.2 LTS.
Any solution guys ?
Thanks in advance.

Issue with selenium webdriver on mac when using capture-full-replay.sh

I have this issue when using capture-full-replay.sh on mac OSX,

Can any one help please :(

Thanks in advance

Please wait for 4288 seconds, while we capture the playback...

/Users/user/node_modules/selenium-webdriver/lib/error.js:539
let err = new ctor(data.message)
^

NoSuchElementError: Unable to locate element: .acorn-play-button
at Object.throwDecodedError (/Users/user/node_modules/selenium-webdriver/lib/error.js:539:15)
at parseHttpResponse (/Users/user/node_modules/selenium-webdriver/lib/http.js:647:13)
at Executor.execute (/Users/user/node_modules/selenium-webdriver/lib/http.js:573:28)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async thenableWebDriverProxy.execute (/Users/user/node_modules/selenium-webdriver/lib/webdriver.js:735:17)
at async toWireValue (/Users/user/node_modules/selenium-webdriver/lib/webdriver.js:140:15)
at async /Users/user/node_modules/selenium-webdriver/lib/webdriver.js:190:16
at async forEachKey (/Users/user/node_modules/selenium-webdriver/lib/webdriver.js:184:9)
at async convertKeys (/Users/user/node_modules/selenium-webdriver/lib/webdriver.js:189:3)
at async thenableWebDriverProxy.execute (/Users/user/node_modules/selenium-webdriver/lib/webdriver.js:733:22) {
remoteStacktrace: 'WebDriverError@chrome://marionette/content/error.js:181:5\n' +
'NoSuchElementError@chrome://marionette/content/error.js:393:5\n' +
'element.find/</<@chrome://marionette/content/element.js:306:16\n'
}

Videos from BBB serveur use MP4 and not webm

Hello

If the video stored on bbb serveur use mp4 and not webm nothing is downloaded and there is an error.
To solve this problem you just need to replace all the webm by mp4 call in the bbb.py file
same thing to do in capture-full-replay.sh file

Probably it could be intersting to add a parameter to select webm/mp4 from command line
Regards
Fabrice

Cannot capture several videos in parallel

Running several instances of capture-full-replay.sh causes the recorded videos to be buggous.
It seems that this is due to the naming of the container that is constant.

Introduce slide chapter to capture-full-replay.sh?

Hello everyone,

Is it possible to add slide's timestamp (or chapter) from bbb meeting to the downloaded mp4 ? The videos I'm downloading are very long and it can be a very useful to jump from one slide to another. It will be a nice feature too if it isn't too difficult to implement.

Thanks again for those nice scripts !

error 2626 promise js

Hello
If you have this error :

node_modules/selenium-webdriver/lib/promise.js:2626                                                                                                     │ 0%
        throw error;
        ^
ElementNotInteractableError: Element <button class="acorn-play-button"> could not be scrolled into view

it's because the browser didn't display the replay page, you need to increase the delay before record and wait the replay page is correctly show, just increase this parameter in the file selenium-play-bbb-recording.js on line 35

driver.sleep(1000 * 4);
Regards
Fabrice

error while ./capture-full-replay

Hi!

I get this error while trying
./capture-full-replay.sh -o testJu005.mp4 https://scalelite.cloud68.co/playback/presentation/2.0/playback.html\?meetingId\=1b1aacc345b2050c4d62b2f1475734f89494a8e8-1590695733699

│(standard_in) 1: parse error
progress_bar.sh: line 38: [: -gt: unary operator expected
(standard_in) 1: parse error
progress_bar.sh: line 48: [: -ne: unary operator expected
(standard_in) 1: parse error                                              │ 0%
(standard_in) 1: illegal character: N
(standard_in) 1: illegal character: N
usage: sleep seconds
progress_bar.sh: line 29: [: -lt: unary operator expected

i ended up with an empty mp4 file, and i can’t find how to make it work.

running on osx catalina, using python 3

capture-full-replay error loader.js

Hello,

I tried to download a video using the script capture-full-replay.sh but it failed: it creates a 4 seconds video containing only the image "Docker Selenium". This is the command I launched:

./capture-full-replay.sh 'https://scalelite.lal.cloud.math.cnrs.fr/playback/presentation/2.0/playback.html?meetingId=7773cd6626d11404b2918c757753225938c246b0-1610022254792'

I tried to comment everything concerning progressbar.sh, but this didn't solve my problem (don't really know what I'm doing but anyway :) )

There are somes error in the logs:

Container docker internal IP: 172.17.0.2
Selenium all done and ready for testing!

Please wait for 3997 seconds, while we capture the playback...

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'selenium-webdriver'

And

Error response from daemon: Cannot kill container: grid66361: No such container: grid66361

Here is a pastebin of the logfile

Does someone has an idea? Thanks a lot!

Should it helps, I'm on Ubuntu 20.04.

which URL & more info & example in README

Hello,
I can't run the scripts
I tried "download_bbb_data.py https://bbb-1.wsweet.cloud/playback/presentation/2.0/playback.html?meetingId=5be6398e0ccb303cf079a3cb52a6ba4f2bd26a81-1592392602906" et
"capture-full-replay.sh https://bbb-1.wsweet.cloud/playback/presentation/2.0/playback.html?meetingId=5be6398e0ccb303cf079a3cb52a6ba4f2bd26a81-1592392602906"
sans succès.
Le README.sh dit "To download BBB videos and slides, simply pass its URL to the download_bbb_data.py:" mais pas quel URL utiliser fourni par greenlight. Et dans celui-ci la vidéo de Olivier n'est pas claire non plus.
Idée par exempe :

  • une doc avec un exemple qui marche
  • une vidéo d'aide sur cet exemple que chacun peut tester en partant juste de greenlight
    Merci bcp

wrong duration reported by bbb.py

bbb.py uses the metadata to compute the duration of a video. In some cases, the duration does not correspond to the actual video duration.
For instance, with this video:
https://rooms.imtbs-tsp.eu/playback/presentation/2.0/playback.html?meetingId=20c59579a50a715e8d6dc692df996dceb8d788f8-1588578942194

bbb.py computes 406 seconds, while the actual duration is 99 minutes.

Here's a subset of the metadata for this video:

<recording>
  <id>20c59579a50a715e8d6dc692df996dceb8d788f8-1588578942194</id>
  <state>published</state>
  <published>true</published>
  <start_time>1588578942194</start_time>
  <end_time>1588591047175</end_time>
  <participants>30</participants>
  <raw_size>156982456</raw_size>
  <meeting 
  id="20c59579a50a715e8d6dc692df996dceb8d788f8-1588578942194" externalId="3cd33a0d0288664ed51ffe5082eaa892fcc548c8-157-538" name="Salle de TP ASR" breakout="false">
</meeting>
  <meta>
    <bbb-origin-tag>moodle-mod_bigbluebuttonbn (2019042008)</bbb-origin-tag>
    <bbb-recording-tags/>
    <bbb-origin-server-common-name/>
    <bbb-origin-version>3.8.2 (Build: 20200309)</bbb-origin-version>
    <bbb-recording-name>CI3 - cours et corrigé du TP</bbb-recording-name>
    <bbb-context>Systèmes d’exploitation</bbb-context>
    <meetingName>Salle de TP ASR</meetingName>
    <meetingId>3cd33a0d0288664ed51ffe5082eaa892fcc548c8-157-538</meetingId>
    <bbb-recording-description/>
    <bbb-origin>Moodle</bbb-origin>
    <isBreakout>false</isBreakout>
    <bbb-origin-server-name>moodle.imtbs-tsp.eu</bbb-origin-server-name>
  </meta>
  <playback>
    <format>presentation</format>
    <link>
      https://rooms.imtbs-tsp.eu/playback/presentation/2.0/playback.html?meetingId=20c59579a50a715e8d6dc692df996dceb8d788f8-1588578942194
    </link>
    <processing_time>5453648</processing_time>
    <duration>5955342</duration>
    <size>151506934</size>

Add documentation on what URL to pass

The following doesn't seem to work (URL from the bbb regular web viewer):

./bbb_downloader.sh 'https://bbb.some.where/playback/presentation/2.0/playback.html?meetingId=xxx-yyy

What URL should be provided to bbb_downloader.sh ?

TimeoutError: Socket timeout reading Marionette handshake data: Resource temporarily unavailable (os error 11)

Just for the record, creating a new issue, instead of a discussion in another one

Originally posted by @trahay in #11 (comment)

Hi,
This looks like a problem similar to this one:
mozilla/geckodriver#1470

You can try upgrading selenium, which may fixe the problem:
$ docker pull elgalu/selenium

François

On 18/07/2020 19:33, @vebp wrote:

Hi, good day.

First of all, thanks a lot fro this wonderful tool.

Having said that, I though I was having the same problem described up
but it is somehow different.

I have a bigbluebutton test server with a test recording. When I do

sudo bash capture-full-replay.sh
https://bbb-example.cl/playback/presentation/2.0/playback.html?meetingId=6dfe6c3d663317795e670804599375901b91b849-1594864176258

a video does appear, but it only has the docker selenium logo.
I changed to

/sleep $(echo "$seconds - 10" | bc)/

but it didn’t work

the error that I get is:

_Please wait for 36 seconds, while we capture the playback...

/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/lib/promise.js:2626
throw error;
^

TimeoutError: Socket timeout reading Marionette handshake data: Resource
temporarily unavailable (os error 11)
Build info: version: '3.141.59', revision: '82b03c358b', time:
'2019-04-30T22:04:50'

Driver info: driver.version: unknown
remote stacktrace:
at Object.checkLegacyResponse
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/lib/http.js:509:13)
at
/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/lib/http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.createSession()
at Function.createSession
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/firefox/index.js:521:41)
at createDriver
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/node_modules/selenium-webdriver/index.js:632:16)
at Object.
(/home/vito/respaldo_proyectos_lin/p-software/about_bbb/test_mp4/bbb-downloader/selenium-play-bbb-recording.js:21:6)
at Module._compile (internal/modules/cjs/loader.js:1121:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module./load (internal/modules/cjs/loader.js:884:14)
at Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:67:12) {
name: 'TimeoutError',
remoteStacktrace: ''
}
video-rec: stopped
Waiting for video to stop recording...
video-rec STOPPED Jul 18 07:24 PM
Done waiting for video recording to stop.
Video recording stopped/

I’m using an ubuntu 18.04

Thanks a lot for the time

Problem when integrating soundtrack

Hi all,

When integrating soundtrack by ./integrate_soundtrack command, I get an error from ffmpeg.

First, I download:
./download_bbb_data.py https://bbb-aep2.ulpgc.es/playback/presentation/2.0/playback.html\?meetingId\=bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868

Then, I integrate soundtrack:
./integrate_soundtrack.sh bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos last
And I get:

# Extracting sound from bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/webcams.webm to bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/output.opus
# running ffmpeg -i bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/webcams.webm -vn -acodec copy bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/output.opus
# Merging video (bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/deskshare.webm) and audio (bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/output.opus) into last
# Running ffmpeg -i bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/deskshare.webm -i bbb32bb487132b4493676126412c2a4c2d37771e-1614796183868/Videos/output.opus -map 0:v -map 1:a -c copy -y last
Failed !

Can anyone help?
thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.