kevinGodell / mp4frag

Parser that works with ffmpeg to read piped data and fragment mp4 into an initialization segment and media segments. It can also get the codec info and generate an fmp4 HLS m3u8 playlist.
https://kevingodell.github.io/mp4frag/
MIT License
68 stars 15 forks source link

Found a bug that crashes NR #32

Closed WhiteLionATX closed 1 year ago

WhiteLionATX commented 1 year ago

I am not sure why this happens. What could be: I paused one of the video streams at about 14:30 accidently. Then I continued to play the paused stream and wanted to see how much is buffered. I expected that at the end of the buffered stream it will auto switch to live view or so. To I guess that this might not happened instead it crashed.

` pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/sbin/iwlist wlan0 scan pam_unix(sudo:session): session opened for user root by (uid=0) pam_unix(sudo:session): session closed for user root 21 Jan 16:39:59 - [red] Uncaught Exception: 21 Jan 16:39:59 - [error] RangeError: Array buffer allocation failed at new ArrayBuffer () at new Uint8Array () at new FastBuffer (node:internal/buffer:959:5) at createUnsafeBuffer (node:internal/buffer:1062:12) at allocate (node:buffer:410:10) at Function.allocUnsafe (node:buffer:375:10) at Function.concat (node:buffer:553:25) at Mp4Frag._findMdat (/home/pi/.node-red/node_modules/mp4frag/index.js:530:33) at Mp4Frag._transform (/home/pi/.node-red/node_modules/mp4frag/index.js:841:10) at Mp4Frag.Transform._write (node:internal/streams/transform:184:23) at writeOrBuffer (node:internal/streams/writable:389:12) at _write (node:internal/streams/writable:330:10) at Mp4Frag.Writable.write (node:internal/streams/writable:334:10) at Mp4fragNode.onInput (/home/pi/.node-red/node_modules/node-red-contrib-mp4frag/mp4frag.js:816:24) at /usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/usr/local/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13) nodered.service: Main process exited, code=exited, status=1/FAILURE nodered.service: Failed with result 'exit-code'. nodered.service: Service RestartSec=20s expired, scheduling restart. nodered.service: Scheduled restart job, restart counter is at 1. Stopped Node-RED graphical event wiring tool. Started Node-RED graphical event wiring tool. 21 Jan 16:40:24 - [info] Welcome to Node-RED

21 Jan 16:40:24 - [info] Node-RED version: v3.0.2 21 Jan 16:40:24 - [info] Node.js version: v16.16.0 21 Jan 16:40:24 - [info] Linux 5.10.103-v8+ arm LE `

kevinGodell commented 1 year ago

Sorry. This is posted on the wrong repo. Anything related to the use of node-red-mp4frag should be discussed on the node-red forum to better communicate the problem and how to duplicate it and fix it. This repo is just a dependency for node-red-mp4frag. Also, the error sounds like you ran out of memory. More can be discussed in the forum if you make a post and tag me there.