danielpetri1 / bbb-recording-exporter

A client- and server side script to generate BigBlueButton MP4 recordings.
MIT License
103 stars 50 forks source link

Integration with docker #27

Closed mokkin closed 3 years ago

mokkin commented 3 years ago

We are using BBB with the docker script. Unfortunately I cannot simply add the files there. Please try to integrate it in the docker script.

danielpetri1 commented 3 years ago

Hi @mokkin, Thank you for your suggestion - I wasn't aware of this docker installation. It certainly is a must-have once the script is done.

blu-IT commented 3 years ago

@mokkin Hi,

I have BBB 2.3 installed with docker (bbb-install-script) and it is no problem to copy the *.rb files ind the mentioned folder.

RPHr5TyZ commented 3 years ago

Hi Daniël,

I have a BBB 2.3 docker install, same as @mokkin and @blu-IT mentioned. I just copied the two ruby scripts into the mentioned folders and made them executable. No further tweaking. Yet no luck with my first conversion trial... (Please look at the very extensive message below).

Any suggestions?

Regards,

Peter --- :/usr/local/bigbluebutton/core/scripts/post_publish# ./export_presentation.rb -m --- sh: 1: --- : not found An error occurred rendering the video. root@meetings:/usr/local/bigbluebutton/core/scripts/post_publish# ffmpeg version 4.2.4-1ubuntu0.1bbb2~18.04 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version='1ubuntu0.1bbb2~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-librsvg --enable-librubberband --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libxml2 --enable-sdl2 --disable-decoders --enable-decoder='aac,ass,bmp,ffv1,ffvhuff,flac,flashsv,flashsv2,flv,gif,h264,huffyuv,libopus,librsvg,libspeex,mjpeg,mp3float,mpeg2video,opus,pcm_f32le,pcm_s16le,pcm_s16le_planar,png,rawvideo,srt,ssa,subrip,vorbis,vp6,vp6a,vp6f,vp8,vp9,webp,webvtt' --disable-encoders --enable-encoder='aac,ass,bmp,ffv1,ffvhuff,flac,flashsv,flashsv2,flv,gif,h264_vaapi,huffyuv,libmp3lame,libopus,libspeex,libvorbis,libvpx_vp8,libvpx_vp9,libx264,libx264rgb,mjpeg,mjpeg_vaapi,mpeg2_vaapi,mpeg2video,pcm_f32le,pcm_s16le,pcm_s16le_planar,png,rawvideo,srt,ssa,subrip,vp8_vaapi,vp9_vaapi,webvtt' --disable-hwaccels --enable-hwaccel='h264_vaapi,h264_vdpau,mjpeg_vaapi,mpeg2_vaapi,mpeg2_vdpau,vp8_vaapi,vp9_vaapi' --disable-parsers --enable-parser='aac,bmp,flac,gif,h264,mjpeg,mpegaudio,mpegvideo,opus,png,vorbis,vp8,vp9' --disable-demuxers --enable-demuxer='aac,alsa,ass,avi,bmp_pipe,caf,concat,dash,ffmetadata,flac,flv,gif,gif_pipe,h264,hls,image2,image2pipe,ivf,jpeg_pipe,kmsgrab,lavfi,matroska,mjpeg,mov,mp3,mpegts,mpegtsraw,nut,ogg,pcm_f32le,pcm_s16le,png_pipe,pulse,rawvideo,rtp,rtsp,srt,swf,w64,wav,webvtt,yuv4mpegpipe' --disable-muxers --enable-muxer='adts,ass,avi,caf,dash,ffmetadata,flac,flv,framecrc,framehash,framemd5,gif,h264,hash,hls,image2,image2pipe,ipod,ivf,matroska,matroska_audio,md5,mjpeg,mkvtimestamp_v2,mov,mp3,mp4,mpeg2video,mpegts,nut,oga,ogg,ogv,opus,pcm_f32le,pcm_s16le,rawvideo,rtp,rtp_mpegts,rtsp,segment,singlejpeg,srt,stream_segment,swf,tee,uncodedframecrc,w64,wav,webm,webm_chunk,webm_dash_manifest,webvtt,yuv4mpegpipe' --disable-protocols --enable-protocol='async,cache,concat,data,file,hls,http,httpproxy,https,icecast,md5,pipe,rtmp,rtmps,rtmpt,rtmpts,rtp,subfile,tcp,tee,tls,udp,unix' --disable-bsfs --enable-bsf='aac_adtstoasc,chomp,filter_units,h264_metadata,h264_mp4toannexb,h264_redundant_pps,mjpeg2jpeg,mpeg2_metadata,noise,null,vp9_metadata,vp9_raw_reorder,vp9_superframe,vp9_superframe_split' --disable-indevs --enable-indev='alsa,lavfi,v4l2,fbdev,xcbgrab,kmsgrab' --disable-outdevs --enable-outdev='alsa,sdl2,xv,fbdev,v4l2' --disable-libdc1394 --enable-libdrm --disable-libiec61883 --disable-chromaprint --disable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Trailing options were found on the commandline. Input #0, lavfi, from 'color=c=white:s=1920x1080': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc Input #1, concat, from '/var/bigbluebutton/published/presentation/525ded7cc26438f85b01b0597a0202d25980638d-1625158099592/timestamps/whiteboard_timestamps': Duration: N/A, start: 0.000000, bitrate: N/A Stream #1:0: Video: svg, bgra, 1600x1080, 25 tbr, 25 tbn, 25 tbc Input #2, image2, from '/var/bigbluebutton/published/presentation/525ded7cc26438f85b01b0597a0202d25980638d-1625158099592/cursor/cursor.svg': Duration: 00:00:00.10, start: 0.000000, bitrate: 5 kb/s Stream #2:0: Video: svg, bgra, 16x16, 10 fps, 10 tbr, 10 tbn, 10 tbc Input #3, image2, from '/var/bigbluebutton/published/presentation/525ded7cc26438f85b01b0597a0202d25980638d-1625158099592/chats/chat.svg': Duration: 00:00:01.00, start: 0.000000, bitrate: 43 kb/s Stream #3:0: Video: svg, bgra, 8000x32760, 1 fps, 1 tbr, 1 tbn, 1 tbc Input #4, matroska,webm, from '/var/bigbluebutton/published/presentation/525ded7cc26438f85b01b0597a0202d25980638d-1625158099592/video/webcams.webm': Metadata: COMPATIBLE_BRANDS: isomiso2avc1mp41 creation_time : 2021-07-01T19:46:08.000000Z MAJOR_BRAND : isom MINOR_VERSION : 512 ENCODER : Lavf58.29.100 Duration: 01:51:48.14, start: 0.000000, bitrate: 229 kb/s Stream #4:0: Video: vp9 (Profile 0), yuv420p(tv), 640x480, SAR 1:1 DAR 4:3, 15 fps, 15 tbr, 1k tbn, 1k tbc (default) Metadata: HANDLER_NAME : VideoHandler ENCODER : Lavc58.54.100 libvpx-vp9 DURATION : 01:51:48.137000000 Stream #4:1: Audio: vorbis, 48000 Hz, stereo, fltp Metadata: ENCODER : Lavc58.54.100 libvorbis DURATION : 01:51:48.073000000 Input #5, matroska,webm, from '/var/bigbluebutton/published/presentation/525ded7cc26438f85b01b0597a0202d25980638d-1625158099592/deskshare/deskshare.webm': Metadata: COMPATIBLE_BRANDS: isomiso2avc1mp41 creation_time : 2021-07-01T19:53:10.000000Z MAJOR_BRAND : isom MINOR_VERSION : 512 ENCODER : Lavf58.29.100 Duration: 01:51:48.20, start: 0.000000, bitrate: 176 kb/s Stream #5:0: Video: vp9 (Profile 0), yuv420p(tv), 1280x720, SAR 1:1 DAR 16:9, 5 fps, 5 tbr, 1k tbn, 1k tbc (default) Metadata: HANDLER_NAME : VideoHandler ENCODER : Lavc58.54.100 libvpx-vp9 DURATION : 01:51:48.200000000 Filter overlay has an unconnected output

danielpetri1 commented 3 years ago

Hi @RPHr5TyZ, Thanks for sharing the logs. A few questions:

Was Inwinteren - ZwarteBij.org part of the input somehow?

From the console output it looks like something is wrong with the linebreaks in FFmpeg command. Can you double-check that the script was copied over correctly?

Would you be able to share the link of the recording here so I can debug the problem?

Thanks in advance

RPHr5TyZ commented 3 years ago

Hi @danielpetri1

I downloaded the code with wget on my server, unzipped and copied the files to the indicated folders. (What could have gone wrong with that?) Double-checked with Beyond Compare just now and everything looks identical with the downloaded code on my laptop.

"Inwinteren - ZwarteBij.org" is the title of a lecture, and this is the link: ---

Thank you very much for your help! I really appriciate that!

Regards,

Peter

danielpetri1 commented 3 years ago

@RPHr5TyZ Bedankt! I could reproduce the problem, the "-" and ' ' in the title of the lecture were making the video renderer think it's a new command. Escaping it made it work, I'll push the fixed code soon after some more tests.

Here's your video file: ----

Let me know when you got it and I'll delete the link then. Cheers!

RPHr5TyZ commented 3 years ago

@danielpetri1

Great! I downloaded the file and watched for a few seconds. Looks promising! You can delete the link.

Sleep well!

danielpetri1 commented 3 years ago

Closing since it is compatible with the Docker install.

RPHr5TyZ commented 3 years ago

@danielpetri1

... I'll push the fixed code soon after some more tests. ...

Any indication when?

Best regards,

Peter

danielpetri1 commented 3 years ago

@RPHr5TyZ change line 591 to the following:

render << "-metadata title=\"#{meeting_name}\" #{BENCHMARK} #{@published_files}/meeting-tmp.mp4"

And make rendering quicker by setting CHAT_CANVAS_WIDTH = 640

Both in export_presentation.rb

RPHr5TyZ commented 3 years ago

@danielpetri1

I'll give it a try. Many thanks!!

RPHr5TyZ commented 3 years ago

@danielpetri1

I'll give it a try. Many thanks!!

RPHr5TyZ commented 3 years ago

@danielpetri1

Code change successful!