C0D3D3V / bbb-dl

Downlaod BigBlueButton recordings. A simple scrapper for Big Blue Button lessons. Download and merge the audio and video files of a BigBlueButton conference from the conference replay url.
MIT License
68 stars 17 forks source link

FFMPEG Error #54

Closed andrejpejovski closed 7 months ago

andrejpejovski commented 7 months ago

Here is whole view of my CMD:

C:\Users\andre>bbb-dl https://bbb-lb.finki.ukim.mk/playback/presentation/2.3/9c324378580aafeec7ed24def7b92c4e18052799-1647848486122 Output directory for the final video is: C:\Users\andre Directory for the temporary files is: C:\Users\andre\AppData\Local\bbb-dl\4bf17cfd151cef6690622265f60f708c Downloading meta information metadata.xml is already present shapes.svg is already present Downloading webcams / deskshare cursor.xml is already present panzooms.xml is already present captions.json is already present deskshare.xml is already present Downloading events.xml... presentation_text.json is already present slides_new.xml is already present Downloading notes.html... Downloading polls.json... Downloading external_videos.json... video/webcams.webm is already present Downloading video/webcams.mp4... Downloading deskshare/deskshare.webm... Downloading deskshare/deskshare.mp4... notes.html could not be downloaded: 404 Not Found video/webcams.mp4 could not be downloaded: 404 Not Found polls.json could not be downloaded: 404 Not Found external_videos.json could not be downloaded: 404 Not Found events.xml could not be downloaded: 404 Not Found deskshare/deskshare.webm could not be downloaded: 404 Not Found deskshare/deskshare.mp4 could not be downloaded: 404 Not Found Downloading slides presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-2.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-3.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-4.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-5.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-6.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-7.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-8.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-9.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-10.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-11.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-12.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-13.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-14.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-15.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-16.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-17.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-18.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-19.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-20.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-21.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-22.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-23.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-24.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-25.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-26.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-27.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-28.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-30.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-31.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-32.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-33.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-34.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-35.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-36.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-37.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-38.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-39.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-40.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-41.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-42.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-43.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/poll_result319.svg is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-44.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/poll_result328.svg is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-45.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/poll_result341.svg is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/poll_result342.svg is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/slide-46.png is already present presentation/52776a4916d2099203cef3d0c33ac506d23a271a-1647848525352/poll_result362.svg is already present Recording title: Предавања - група 10 - доц. д-р Христина Михајлоска Трпческа Recording date: 2022-03-21T08-41-26 Recording duration: 1:24:07 No desk was shared in this session Start capturing frames... Output directory for frames is: C:\Users\andre\AppData\Local\bbb-dl\4bf17cfd151cef6690622265f60f708c\frames Initialization takes a few seconds...

Done: 00000 / 18303 Frames | 000 / 096 Parts / Partition already finished: 7:12 to 9:58

Partition already finished: 22 to 6:23

Partition already finished: 9:58 to 13:25

Partition already finished: 6:23 to 6:25

Partition already finished: 0 to 22

Partition already finished: 13:25 to 13:30

Partition already finished: 6:25 to 7:12

Partition already finished: 20:36 to 20:43

Partition already finished: 13:30 to 13:33

Partition already finished: 13:33 to 20:36

Partition already finished: 20:43 to 21:17

Partition already finished: 21:17 to 21:34

Partition already finished: 22:26 to 22:49

Partition already finished: 21:34 to 21:57

Partition already finished: 21:57 to 22:26

Partition already finished: 22:49 to 22:57

Partition already finished: 22:57 to 23:32

Partition already finished: 23:32 to 23:45

Partition already finished: 23:45 to 24:03

Partition already finished: 24:03 to 24:06 Done: 05312 / 18303 Frames | 020 / 096 Parts | Partition already finished: 24:06 to 25:01

Partition already finished: 25:01 to 25:15

Partition already finished: 25:15 to 25:20

Partition already finished: 25:32 to 26:03

Partition already finished: 25:20 to 25:32

Partition already finished: 26:03 to 26:18

Partition already finished: 26:18 to 27:30

Partition already finished: 29:36 to 30:31

Partition already finished: 27:30 to 29:36

Partition already finished: 30:31 to 30:31

Partition already finished: 30:31 to 30:31

Partition already finished: 30:31 to 30:32

Partition already finished: 30:32 to 30:33

Partition already finished: 30:34 to 30:34

Partition already finished: 30:33 to 30:34

Partition already finished: 30:34 to 30:34

Partition already finished: 30:34 to 30:34

Partition already finished: 30:35 to 30:35

Partition already finished: 30:34 to 30:35

Partition already finished: 30:35 to 30:35 Done: 06808 / 18303 Frames | 040 / 096 Parts \ Partition already finished: 30:35 to 30:36

Partition already finished: 30:36 to 30:36

Partition already finished: 30:36 to 30:37

Partition already finished: 30:37 to 30:46

Partition already finished: 30:46 to 31:10

Partition already finished: 31:10 to 31:15

Partition already finished: 31:15 to 31:23

Partition already finished: 31:23 to 32:31

Partition already finished: 32:31 to 33:30

Partition already finished: 33:30 to 33:40

Partition already finished: 33:41 to 33:45

Partition already finished: 33:40 to 33:41

Partition already finished: 33:45 to 34:12

Partition already finished: 34:12 to 34:16

Partition already finished: 34:16 to 34:42

Partition already finished: 34:42 to 35:19

Partition already finished: 35:19 to 35:27

Partition already finished: 35:38 to 35:54

Partition already finished: 35:54 to 36:16

Partition already finished: 35:27 to 35:38 Done: 08441 / 18303 Frames | 060 / 096 Parts - Partition already finished: 36:16 to 40:29

Partition already finished: 40:29 to 43:41

Partition already finished: 43:41 to 47:52

Partition already finished: 47:56 to 48:06

Partition already finished: 47:52 to 47:56

Partition already finished: 48:06 to 48:40

Partition already finished: 48:40 to 48:54

Partition already finished: 48:54 to 50:58

Partition already finished: 50:58 to 54:18

Partition already finished: 54:18 to 58:17

Partition already finished: 58:17 to 59:50

Partition already finished: 59:50 to 1:00:02

Partition already finished: 1:00:02 to 1:00:02

Partition already finished: 1:00:02 to 1:00:05

Partition already finished: 1:00:05 to 1:00:05

Partition already finished: 1:00:05 to 1:00:29

Partition already finished: 1:00:29 to 1:00:45

Partition already finished: 1:00:45 to 1:00:48

Partition already finished: 1:00:48 to 1:01:22

Partition already finished: 1:01:22 to 1:01:23

Partition already finished: 1:01:23 to 1:01:25 Done: 14495 / 18303 Frames | 081 / 096 Parts / Partition already finished: 1:01:25 to 1:01:34

Partition already finished: 1:01:34 to 1:01:34

Partition already finished: 1:01:34 to 1:01:35

Partition already finished: 1:01:35 to 1:02:05

Partition already finished: 1:02:05 to 1:03:11

Partition already finished: 1:03:11 to 1:03:20

Partition already finished: 1:03:20 to 1:06:58

Partition already finished: 1:06:58 to 1:07:38

Partition already finished: 1:07:38 to 1:07:41

Partition already finished: 1:07:41 to 1:11:34

Partition already finished: 1:11:34 to 1:12:47

Partition already finished: 1:12:47 to 1:14:51

Partition already finished: 1:14:51 to 1:18:04

Partition already finished: 1:18:04 to 1:21:46

Partition already finished: 1:21:46 to 2:08:16

Frames capturing is finished and took: 5. Start creating slideshow... Please run bbb-dl again with the extra option --verbose to get the ffmpeg error message. Then add the log output to a new issue on https://github.com/C0D3D3V/bbb-dl/issues Error: FFMpeg failed and returned error code invalid literal for int() with base 10: '0KiB' Exception ignored in: <function BaseSubprocessTransport.del at 0x000002419D5FDA80> Traceback (most recent call last): File "C:\Python312\Lib\asyncio\base_subprocess.py", line 126, in del self.close() File "C:\Python312\Lib\asyncio\base_subprocess.py", line 104, in close proto.pipe.close() File "C:\Python312\Lib\asyncio\proactor_events.py", line 109, in close self._loop.call_soon(self._call_connection_lost, None) File "C:\Python312\Lib\asyncio\base_events.py", line 795, in call_soon self._check_closed() File "C:\Python312\Lib\asyncio\base_events.py", line 541, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000002419D5FF240> Traceback (most recent call last): File "C:\Python312\Lib\asyncio\proactor_events.py", line 116, in del _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ^^^^^^^^ File "C:\Python312\Lib\asyncio\proactor_events.py", line 80, in repr info.append(f'fd={self._sock.fileno()}') ^^^^^^^^^^^^^^^^^^^ File "C:\Python312\Lib\asyncio\windows_utils.py", line 102, in fileno raise ValueError("I/O operation on closed pipe") ValueError: I/O operation on closed pipe Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000002419D5FF240> Traceback (most recent call last): File "C:\Python312\Lib\asyncio\proactor_events.py", line 116, in del _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ^^^^^^^^ File "C:\Python312\Lib\asyncio\proactor_events.py", line 80, in repr info.append(f'fd={self._sock.fileno()}') ^^^^^^^^^^^^^^^^^^^ File "C:\Python312\Lib\asyncio\windows_utils.py", line 102, in fileno raise ValueError("I/O operation on closed pipe") ValueError: I/O operation on closed pipe

C0D3D3V commented 7 months ago

can you please rerun with the --verbose option like: bbb-dl --verbose https://bbb-lb.finki.ukim.mk/playback/presentation/2.3/9c324378580aafeec7ed24def7b92c4e18052799-1647848486122

And then send the output.

C0D3D3V commented 7 months ago

You do not need to run it again, I have done it for you:

Start creating slideshow...
Running command: ffmpeg -hide_banner -f concat -i C:\Users\Virtual\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Local\bbb-dl\4bf17cfd151cef6690622265f60f708c\frames\slideshow.txt -framerate 24 -r 24 -pix_fmt yuv420p -strict experimental -crf 23 -preset fast C:\Users\Virtual\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Local\bbb-dl\4bf17cfd151cef6690622265f60f708c\slideshow.mp4
Input #0, concat, from 'C:\Users\Virtual\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Local\bbb-dl\4bf17cfd151cef6690622265f60f708c\frames\slideshow.txt':
  Duration: 01:24:07.80, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: png, rgba(pc, gbr/bt709/iec61966-2-1), 1600x1200, 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0000022083a80dc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000022083a80dc0] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0000022083a80dc0] 264 - core 164 r3190 7ed753b - H.264/MPEG-4 AVC codec - Copyleft 2003-2024 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:\Users\Virtual\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Local\bbb-dl\4bf17cfd151cef6690622265f60f708c\slideshow.mp4':
  Metadata:
    encoder         : Lavf61.1.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(unknown/bt709/iec61966-2-1, progressive), 1600x1200, q=2-31, 24 fps, 12288 tbn
      Metadata:
        encoder         : Lavc61.3.100 libx264
      Side data:
        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Error: FFMpeg failed and returned error code invalid literal for int() with base 10: '0KiB'
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x000001E63AB65580>
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_subprocess.py", line 126, in __del__
    self.close()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 109, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 793, in call_soon
    self._check_closed()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 540, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001E63AB66DE0>
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 116, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
                               ^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 80, in __repr__
    info.append(f'fd={self._sock.fileno()}')
                      ^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_utils.py", line 102, in fileno
    raise ValueError("I/O operation on closed pipe")
ValueError: I/O operation on closed pipe
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001E63AB66DE0>
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 116, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
                               ^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 80, in __repr__
    info.append(f'fd={self._sock.fileno()}')
                      ^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_utils.py", line 102, in fileno
    raise ValueError("I/O operation on closed pipe")
ValueError: I/O operation on closed pipe
andrejpejovski commented 7 months ago

Also i didnt mention that when i try manual to concatenate the frames with the audio from webcam it works perfectly fine.

Am using this command: ffmpeg -y -f concat -i "Filepath of slideshow.txt" -i "Filepath of webcams.webm" -c:v h264_nvenc -preset default -c:a aac -strict experimental -vf "fps=25,format=yuv420p" output.mp4

C0D3D3V commented 7 months ago

I see. I already found the bug. We will wait till upstream fixed it. (maybe we should move upstream some day into our repo) See https://github.com/jonghwanhyeon/python-ffmpeg/issues/53#issuecomment-2056318809

andrejpejovski commented 7 months ago

Good. Is there any way to get a reminder when all of this is going to be fixed or just you can reply to this message and let me know :). Also is there a way to download the session files (frames, audio) everything like right now but avoiding ffmpeg to auto create the video and get errors like at the moment.

C0D3D3V commented 7 months ago

Try v1.0.10. (run pip install -U bbb-dl to update) You can use the --backup option to only download files, and not generating anything. In case of an error, generated files will be stored for next execution, Use --keep-tmp-files to also keep the files if bbb-dl finished sucessfully.